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(); |
} |