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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 888503003: Only need to re-evaluate MQ on resize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 6633b1be6850dcd7980e7b7834dfd6b6f8b44d55..82df1a4b4f298f20497c06059b0b5e073a868040 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -816,15 +816,16 @@ void FrameView::performPreLayoutTasks()
m_inSynchronousPostLayout = false;
}
+ bool wasResized = wasViewportResized();
Document* document = m_frame->document();
- if (wasViewportResized())
+ if (wasResized)
document->notifyResizeForViewportUnits();
// Viewport-dependent media queries may cause us to need completely different style information.
- if (!document->styleResolver() || document->styleResolver()->mediaQueryAffectedByViewportChange()) {
+ if (!document->styleResolver() || (wasResized && document->styleResolver()->mediaQueryAffectedByViewportChange())) {
document->styleResolverChanged();
document->mediaQueryAffectingValueChanged();
- } else {
+ } else if (wasResized) {
document->evaluateMediaQueryList();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698