Title: [152568] trunk/Source/WebCore
Revision
152568
Author
[email protected]
Date
2013-07-11 07:45:45 -0700 (Thu, 11 Jul 2013)

Log Message

Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
<rdar://problem/14277905>

Rubber-stamped by Antti Koivisto.

This changed caused more harm than good. setFrameRect() is not the only path in FrameView
that can cause media queries to need invalidation.

* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::layout):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (152567 => 152568)


--- trunk/Source/WebCore/ChangeLog	2013-07-11 12:43:14 UTC (rev 152567)
+++ trunk/Source/WebCore/ChangeLog	2013-07-11 14:45:45 UTC (rev 152568)
@@ -1,3 +1,17 @@
+2013-07-11  Andreas Kling  <[email protected]>
+
+        Revert r149313: Don't check for @media rules affected by viewport changes in every layout.
+        <rdar://problem/14277905>
+
+        Rubber-stamped by Antti Koivisto.
+
+        This changed caused more harm than good. setFrameRect() is not the only path in FrameView
+        that can cause media queries to need invalidation.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::setFrameRect):
+        (WebCore::FrameView::layout):
+
 2013-07-11  Kangil Han  <[email protected]>
 
         Introduce isHTMLTitleElement and toHTMLTitleElement

Modified: trunk/Source/WebCore/page/FrameView.cpp (152567 => 152568)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-07-11 12:43:14 UTC (rev 152567)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-07-11 14:45:45 UTC (rev 152568)
@@ -480,18 +480,6 @@
     }
 #endif
 
-    // Viewport-dependent media queries may cause us to need completely different style information.
-    if (m_frame) {
-        if (Document* document = m_frame->document()) {
-            if (StyleResolver* resolver = document->styleResolverIfExists()) {
-                if (resolver->affectedByViewportChange()) {
-                    document->styleResolverChanged(DeferRecalcStyle);
-                    InspectorInstrumentation::mediaQueryResultChanged(document);
-                }
-            }
-        }
-    }
-
     sendResizeEventIfNeeded();
 }
 
@@ -1199,7 +1187,12 @@
             m_inSynchronousPostLayout = false;
         }
 
-        document->evaluateMediaQueryList();
+        // Viewport-dependent media queries may cause us to need completely different style information.
+        if (document->ensureStyleResolver()->affectedByViewportChange()) {
+            document->styleResolverChanged(DeferRecalcStyle);
+            InspectorInstrumentation::mediaQueryResultChanged(document);
+        } else
+            document->evaluateMediaQueryList();
 
         // If there is any pagination to apply, it will affect the RenderView's style, so we should
         // take care of that now.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to