Summary: | REGRESSION (r104060): Web font is not loaded if specified by link element dynamically inserted | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yuzo Fujishima <yuzo> | ||||||||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | ap, bashi, hyatt, kling, koivisto, sean | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||||
Hardware: | Unspecified | ||||||||||||||
OS: | Unspecified | ||||||||||||||
Attachments: |
|
Description
Yuzo Fujishima
2012-02-21 19:34:07 PST
This can be related to http://wkb.ug/79021 Created attachment 128115 [details]
Actual image
Created attachment 128116 [details]
Expected image
Hi Annti, Can you take a look? I confirmed that r104060 shows this issue http://trac.webkit.org/changeset/104060/ Analyze stylesheet scope to minimize style recalcs while 104052 doesn't. Sorry, Antti, not Annti. I've confirmed that applying the following patch fixes the issue. Document::analyzeStylesheetChange(...) is likely to have a bug. diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index 5125bbb..ac2b283 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -3273,7 +3273,6 @@ void Document::analyzeStylesheetChange(StyleSelectorUpdateFlag updateFlag, const if (m_styleSheets->item(i) != newStylesheets[i]) return; } - requiresStyleSelectorReset = false; // If we are already parsing the body and so may have significant amount of elements, put some effort into trying to avoid style recalcs. if (!body() || m_hasNodesWithPlaceholderStyle) Created attachment 128311 [details]
patch
Comment on attachment 128311 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=128311&action=review > Source/WebCore/ChangeLog:3 > + https://bugs.webkit.org/show_bug.cgi?id=79186 URL should show up before the summary. Comment on attachment 128311 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=128311&action=review > Source/WebCore/ChangeLog:8 > + Test: fast/css/font-face-insert-link.html This doesn't seem to be included in the patch. Created attachment 128323 [details]
now with the test case included
Comment on attachment 128323 [details] now with the test case included View in context: https://bugs.webkit.org/attachment.cgi?id=128323&action=review r=me. > LayoutTests/fast/css/font-face-insert-link.html:23 > + link.setAttribute("href", "resources/ahem.css"); If we were feeling maximally fancy, this could probably be done with a data: URL. > LayoutTests/fast/css/font-face-insert-link.html:34 > + 500 Long setTimeout() interval is long. > Long setTimeout() interval is long.
Font loading is unpredictable across platforms and I don't know of any good way to observe it.
*** Bug 79312 has been marked as a duplicate of this bug. *** |