Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(67)

Issue 9595009: Merge 108574 - REGRESSION (r104060): Web font is not loaded if specified by link element dynamicall… (Closed)

Created:
8 years, 6 months ago by Yuzo
Modified:
8 years, 6 months ago
Reviewers:
Yuzo
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Visibility:
Public.

Description

Merge 108574 - REGRESSION (r104060): Web font is not loaded if specified by link element dynamically inserted https://bugs.webkit.org/show_bug.cgi?id=79186 Reviewed by Andreas Kling. Source/WebCore: Test: fast/css/font-face-insert-link.html If a dynamically inserted stylesheet contains @font-face rules, we may fail to update the rendering. Before r104060 the style selector was destroyed on every style change, and the font selector along with it. This is no longer the case and we can't rely on comparing font selector pointers when comparing Fonts for equality. This patch adds version number to the font selector and checks it in Font::operator==. The version number is incremented when new font-face rules are added to the font selector. FontFallbackList is an object shared between Fonts so the extra field shouldn't matter much in terms of memory. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::CSSFontSelector): (WebCore::CSSFontSelector::addFontFaceRule): * css/CSSFontSelector.h: (CSSFontSelector): * platform/graphics/Font.cpp: (WebCore::Font::operator==): * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): (WebCore::FontFallbackList::invalidate): * platform/graphics/FontFallbackList.h: (FontFallbackList): (WebCore::FontFallbackList::fontSelectorVersion): * platform/graphics/FontSelector.h: (FontSelector): LayoutTests: * fast/css/font-face-insert-link-expected.txt: Added. * fast/css/font-face-insert-link.html: Added. * fast/css/resources/ahem.css: Added. (@font-face): TBR=karen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=109700

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, --2 lines) Patch
A + LayoutTests/fast/css/font-face-insert-link.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/css/font-face-insert-link-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/css/resources/ahem.css View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/css/CSSFontSelector.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/WebCore/css/CSSFontSelector.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/Font.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M Source/WebCore/platform/graphics/FontFallbackList.h View 2 chunks +3 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/FontFallbackList.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/FontSelector.h View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Yuzo
8 years, 6 months ago (2012-03-05 03:44:18 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698