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

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

Issue 1669493006: Incorrect setHasMediaQueries() when @media rule is dropped. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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/StyleSheetContents.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index fc39002b67f4fddd0c88cdff4f051e99829a50e8..48bbc4c59a49b81ce4bcfcb23a77aedc12e56154 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -237,9 +237,6 @@ bool StyleSheetContents::wrapperInsertRule(PassRefPtrWillBeRawPtr<StyleRuleBase>
if (rule->isImportRule())
return false;
- if (rule->isMediaRule())
- setHasMediaQueries();
-
index -= m_importRules.size();
if (index < m_namespaceRules.size() || (index == m_namespaceRules.size() && rule->isNamespaceRule())) {
@@ -266,8 +263,11 @@ bool StyleSheetContents::wrapperInsertRule(PassRefPtrWillBeRawPtr<StyleRuleBase>
index -= m_namespaceRules.size();
- if (rule->isFontFaceRule())
+ if (rule->isMediaRule())
+ setHasMediaQueries();
+ else if (rule->isFontFaceRule())
setHasFontFaceRule(true);
+
m_childRules.insert(index, rule);
return true;
}
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698