Title: [153595] trunk/Source/WebCore
Revision
153595
Author
[email protected]
Date
2013-08-01 12:19:42 -0700 (Thu, 01 Aug 2013)

Log Message

Layout should force a StyleResolver rebuild if there isn't one at all.
<http://webkit.org/b/119378>

Reviewed by Antti Koivisto.

We can't tell if viewport-dependent media queries have been invalidated at layout,
unless we have a StyleResolver to ask about this.
In case there isn't one, take the same path as we would with an invalidated query
instead of relying on ensureStyleResolver() to build it.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (153594 => 153595)


--- trunk/Source/WebCore/ChangeLog	2013-08-01 18:58:31 UTC (rev 153594)
+++ trunk/Source/WebCore/ChangeLog	2013-08-01 19:19:42 UTC (rev 153595)
@@ -1,3 +1,18 @@
+2013-08-01  Andreas Kling  <[email protected]>
+
+        Layout should force a StyleResolver rebuild if there isn't one at all.
+        <http://webkit.org/b/119378>
+
+        Reviewed by Antti Koivisto.
+
+        We can't tell if viewport-dependent media queries have been invalidated at layout,
+        unless we have a StyleResolver to ask about this.
+        In case there isn't one, take the same path as we would with an invalidated query
+        instead of relying on ensureStyleResolver() to build it.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+
 2013-08-01  Jacky Jiang  <[email protected]>
 
         [BlackBerry] Crash at absoluteClippedOverflowRect() in PluginView::calculateClipRect()

Modified: trunk/Source/WebCore/page/FrameView.cpp (153594 => 153595)


--- trunk/Source/WebCore/page/FrameView.cpp	2013-08-01 18:58:31 UTC (rev 153594)
+++ trunk/Source/WebCore/page/FrameView.cpp	2013-08-01 19:19:42 UTC (rev 153595)
@@ -1191,8 +1191,10 @@
         }
 
         // Viewport-dependent media queries may cause us to need completely different style information.
-        if (document->ensureStyleResolver()->affectedByViewportChange()) {
+        if (!document->styleResolverIfExists() || document->styleResolverIfExists()->affectedByViewportChange()) {
             document->styleResolverChanged(DeferRecalcStyle);
+            // FIXME: This instrumentation event is not strictly accurate since cached media query results
+            //        do not persist across StyleResolver rebuilds.
             InspectorInstrumentation::mediaQueryResultChanged(document);
         } else
             document->evaluateMediaQueryList();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to