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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 290313002: Use RecalcStyleDeferred for inspector style changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index c08a5738caddfd6a7cedd663feb63d3dc2bac96d..811967c1b869bb282aaaa26127e2bd689135874b 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -1157,7 +1157,7 @@ void InspectorPageAgent::updateViewMetrics(bool enabled, int width, int height,
Document* document = mainFrame()->document();
if (document) {
- document->styleResolverChanged(RecalcStyleImmediately);
+ document->styleResolverChanged(RecalcStyleDeferred);
document->mediaQueryAffectingValueChanged();
}
InspectorInstrumentation::mediaQueryResultChanged(document);
@@ -1224,7 +1224,7 @@ void InspectorPageAgent::setEmulatedMedia(ErrorString*, const String& media)
document = m_page->mainFrame()->document();
if (document) {
document->mediaQueryAffectingValueChanged();
- document->styleResolverChanged(RecalcStyleImmediately);
+ document->styleResolverChanged(RecalcStyleDeferred);
document->updateLayout();
rune 2014/05/18 10:28:43 I don't think this updateLayout() call needs to be
ojan 2014/05/18 17:50:39 My guess is that it's there to trigger this code:
}
}
« no previous file with comments | « no previous file | Source/core/inspector/InspectorStyleSheet.cpp » ('j') | Source/core/inspector/InspectorStyleSheet.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698