Title: [203722] trunk/Source/WebKit2
Revision
203722
Author
[email protected]
Date
2016-07-26 09:26:54 -0700 (Tue, 26 Jul 2016)

Log Message

[Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug
https://bugs.webkit.org/show_bug.cgi?id=160117

Reviewed by Michael Catanzaro.

The problem is that WebPage has its own m_useFixedLayout that is only updated when changed from the UI
process. However, layout tests doing internals.setUseFixedLayout() change the frame view directly, and the
WebPage doesn't notice it.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setFixedVisibleContentRect): Deleted.
(WebKit::WebPage::sendViewportAttributesChanged): Change the assert to check the main FrameView is in fixed
layout mode.
* WebProcess/WebPage/WebPage.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (203721 => 203722)


--- trunk/Source/WebKit2/ChangeLog	2016-07-26 16:25:26 UTC (rev 203721)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-26 16:26:54 UTC (rev 203722)
@@ -1,5 +1,22 @@
 2016-07-26  Carlos Garcia Campos  <[email protected]>
 
+        [Coordinated Graphics] Test fast/fixed-layout/fixed-layout.html crashes in debug
+        https://bugs.webkit.org/show_bug.cgi?id=160117
+
+        Reviewed by Michael Catanzaro.
+
+        The problem is that WebPage has its own m_useFixedLayout that is only updated when changed from the UI
+        process. However, layout tests doing internals.setUseFixedLayout() change the frame view directly, and the
+        WebPage doesn't notice it.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setFixedVisibleContentRect): Deleted.
+        (WebKit::WebPage::sendViewportAttributesChanged): Change the assert to check the main FrameView is in fixed
+        layout mode.
+        * WebProcess/WebPage/WebPage.h:
+
+2016-07-26  Carlos Garcia Campos  <[email protected]>
+
         [Threaded Compositor] ASSERTION FAILED: isMainThread() when ThreadedCompositor is destroyed since r203718
         https://bugs.webkit.org/show_bug.cgi?id=160197
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (203721 => 203722)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-07-26 16:25:26 UTC (rev 203721)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-07-26 16:26:54 UTC (rev 203722)
@@ -1362,16 +1362,10 @@
 }
 
 #if USE(COORDINATED_GRAPHICS)
-void WebPage::setFixedVisibleContentRect(const IntRect& rect)
-{
-    ASSERT(m_useFixedLayout);
-
-    m_page->mainFrame().view()->setFixedVisibleContentRect(rect);
-}
-
 void WebPage::sendViewportAttributesChanged()
 {
-    ASSERT(m_useFixedLayout);
+    FrameView* view = m_page->mainFrame().view();
+    ASSERT(view && view->useFixedLayout());
 
     // Viewport properties have no impact on zero sized fixed viewports.
     if (m_viewSize.isEmpty())
@@ -1388,8 +1382,6 @@
 
     ViewportAttributes attr = computeViewportAttributes(m_page->viewportArguments(), minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
 
-    FrameView* view = m_page->mainFrame().view();
-
     // If no layout was done yet set contentFixedOrigin to (0,0).
     IntPoint contentFixedOrigin = view->didFirstLayout() ? view->fixedVisibleContentRect().location() : IntPoint();
 
@@ -1404,7 +1396,7 @@
 #endif
 
     contentFixedSize.scale(1 / attr.initialScale);
-    setFixedVisibleContentRect(IntRect(contentFixedOrigin, roundedIntSize(contentFixedSize)));
+    view->setFixedVisibleContentRect(IntRect(contentFixedOrigin, roundedIntSize(contentFixedSize)));
 
     attr.initialScale = m_page->viewportArguments().zoom; // Resets auto (-1) if no value was set by user.
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (203721 => 203722)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-07-26 16:25:26 UTC (rev 203721)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h	2016-07-26 16:26:54 UTC (rev 203722)
@@ -593,7 +593,6 @@
     void pageDidScroll();
 #if USE(COORDINATED_GRAPHICS)
     void pageDidRequestScroll(const WebCore::IntPoint&);
-    void setFixedVisibleContentRect(const WebCore::IntRect&);
     void sendViewportAttributesChanged();
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to