[Webkit-unassigned] [Bug 181374] New: font-display:fallback can cause a visual flash (which is supposed to be impossible)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 8 00:23:06 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=181374

            Bug ID: 181374
           Summary: font-display:fallback can cause a visual flash (which
                    is supposed to be impossible)
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Text
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mmaxfield at apple.com
                CC: mmaxfield at apple.com

FontCascadeFonts::primaryFont() specifically hardcodes the first FontRange inside the FontCascade ("realizeFallbackRangesAt(description, 0)"), which could be loading. If it's in the middle of loading, this will result in the interstitial font (Times). All the other codepaths which call realizeFallbackRangesAt() will detect that it returned the interstitial font and keep iterating through the font-family list, but this codepath doesn't. This means that the metrics for the primary font (which is used for things like line-height) may disagree with all the rendered characters.

This is particularly problematic if the loading font transitions to the failed state, which is how font-display:fallback is implemented. If this situation, realizeNextFallback() will keep iterating past the failed font-family item, which means that the primary font will change. This can change things like line-height, and therefore cause a visual flash (which is contrary to the whole reason font-display:fallback exists in the first place).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180108/e63d8100/attachment.html>


More information about the webkit-unassigned mailing list