New issue
Advanced search Search tips

Issue 682117 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 530015



Sign in to add a comment

Re-run font-display logic whenever it is touched (via CSSOM or by removing/re-inserting a font-face rule)

Project Member Reported by kenjibaheux@chromium.org, Jan 18 2017

Issue description

Spec issue: https://github.com/tabatkins/specs/issues/69

Tentative resolution: when font-display is changed, either via CSSOM or removing/re-inserting a rule, the UA must re-run the font-display logic.

Exemplar Scenario:
 1. initial @font-face rule with font-display: optional
 2. web font is not readily available
 3. the UA downloads the web font for a future use
 4. the web font is downloaded but not used due to font-display: optional
 5. font-display is touched (either via CSSOM or by removing and re-inserting a font-face rule)
 6. the UA re-runs the logic (even if font-display wasn't actually modified*)


*: this specific aspect is tentative (discussion on-going in the spec bug).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5

commit 234fc1b55d82694a89ca31cd4b36b5a47da2d0e5
Author: Kunihiko Sakamoto <ksakamoto@chromium.org>
Date: Fri Dec 22 06:40:08 2017

Update fallback font visibility on FontFace.display change

This patch lets RemoteFontFaceSource recalculate font display period
when the FontFace's display attribute is changed. This gives a
workaround for crbug.com/777846, allowing developers to monkey patch
font faces from third party font services.

Bug: 682117, 762957, 777846
Change-Id: Ic25392b2d1bd240015e51cda52896415373afa97
Reviewed-on: https://chromium-review.googlesource.com/828227
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525947}
[add] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/LayoutTests/external/wpt/css/css-fonts/font-display/font-display-change-ref.html
[add] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/LayoutTests/external/wpt/css/css-fonts/font-display/font-display-change.html
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/LayoutTests/external/wpt/lint.whitelist
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/CSSFontFace.cpp
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/CSSFontFace.h
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/CSSFontFaceSource.h
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/FontFace.cpp
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
[modify] https://crrev.com/234fc1b55d82694a89ca31cd4b36b5a47da2d0e5/third_party/WebKit/Source/core/css/RemoteFontFaceSource.h

Sign in to add a comment