summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrune <rune@opera.com>2016-03-18 02:45:31 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-18 09:46:37 +0000
commitda608f1745bd044fa96b58c3e0c9aa7e53eed3dc (patch)
tree1883124b78071404aad404f13ccadb6ac8f90361
parenta548e7c490465d9c16e7697b3aaebb362ae55fce (diff)
downloadchromium_src-da608f1745bd044fa96b58c3e0c9aa7e53eed3dc.zip
chromium_src-da608f1745bd044fa96b58c3e0c9aa7e53eed3dc.tar.gz
chromium_src-da608f1745bd044fa96b58c3e0c9aa7e53eed3dc.tar.bz2
Moved resolverChanged for mq updates into StyleEngine.
The placement of resolverChanged() needs a bit of explanation. We incorrectly only clear the rulesets of active stylesheets when media query evaluation changes. That currently causes crbug.com/589083. Updating the active stylesheets (resolverChanged) before clearing the ruleset will at least make sure that rule set for @media rules inside sheets with a media attribute changing evaluation will be cleared correctly. Moving resolverChanged() would have made the effects of 589083 worse. BUG=567021 Review URL: https://codereview.chromium.org/1783913003 Cr-Commit-Position: refs/heads/master@{#381921}
-rw-r--r--third_party/WebKit/Source/core/dom/Document.cpp1
-rw-r--r--third_party/WebKit/Source/core/dom/StyleEngine.cpp1
2 files changed, 1 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 92c4893..9d85b65 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -643,7 +643,6 @@ MediaQueryMatcher& Document::mediaQueryMatcher()
void Document::mediaQueryAffectingValueChanged()
{
- styleEngine().resolverChanged(FullStyleUpdate);
m_evaluateMediaQueriesOnStyleRecalc = true;
styleEngine().clearMediaQueryRuleSetStyleSheets();
InspectorInstrumentation::mediaQueryResultChanged(this);
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index f01a0dc..983949d 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -270,6 +270,7 @@ void StyleEngine::clearMediaQueryRuleSetOnTreeScopeStyleSheets(UnorderedTreeScop
void StyleEngine::clearMediaQueryRuleSetStyleSheets()
{
+ resolverChanged(FullStyleUpdate);
documentStyleSheetCollection()->clearMediaQueryRuleSetStyleSheets();
clearMediaQueryRuleSetOnTreeScopeStyleSheets(m_activeTreeScopes);
}