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

Unified Diff: Source/core/css/StyleMedia.cpp

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Filter @viewport and @font-face in lazyAppend Created 7 years, 1 month 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: Source/core/css/StyleMedia.cpp
diff --git a/Source/core/css/StyleMedia.cpp b/Source/core/css/StyleMedia.cpp
index 7d66459a4d710a9bf012adc8ec8ab2e657776e53..9f5f31b1748ee76638a71e2e61af8bb7024c0a54 100644
--- a/Source/core/css/StyleMedia.cpp
+++ b/Source/core/css/StyleMedia.cpp
@@ -61,8 +61,8 @@ bool StyleMedia::matchMedium(const String& query) const
return false;
StyleResolver* styleResolver = document->styleResolver();
- if (!styleResolver)
- return false;
+ ASSERT(styleResolver);
+ appendPendingStyleSheetsIfNeeded(styleResolver);
RefPtr<RenderStyle> rootStyle = styleResolver->styleForElement(documentElement, 0 /*defaultParent*/, DisallowStyleSharing, MatchOnlyUserAgentRules);

Powered by Google App Engine
This is Rietveld 408576698