Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: third_party/WebKit/Source/core/css/FontFaceSet.cpp

Issue 2557533005: Collect active stylesheets and and apply asynchronously. (Closed)
Patch Set: [Mac] Missing style recalc for device scale change Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/FontFaceSet.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index 88b70caf84646c5249244896e128c193909d19cc..5dd61e33064eba7406d6bbd238ba1cc7d418cd36 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -310,9 +310,9 @@ bool FontFaceSet::hasForBinding(ScriptState*,
const HeapListHashSet<Member<FontFace>>& FontFaceSet::cssConnectedFontFaceList()
const {
- Document* d = document();
- d->ensureStyleResolver(); // Flush pending style changes.
- return d->styleEngine()
+ Document* document = this->document();
+ document->updateActiveStyle();
+ return document->styleEngine()
.fontSelector()
->fontFaceCache()
->cssConnectedFontFaces();
@@ -467,6 +467,7 @@ bool FontFaceSet::resolveFontStyle(const String& fontString, Font& font) {
style->font().update(style->font().getFontSelector());
+ document()->updateActiveStyle();
document()->ensureStyleResolver().computeFont(style.get(), *parsedStyle);
font = style->font();

Powered by Google App Engine
This is Rietveld 408576698