<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[205537] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/205537">205537</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-06 23:40:57 -0700 (Tue, 06 Sep 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK][Threaded Compositor] Several flaky tests
https://bugs.webkit.org/show_bug.cgi?id=161242

Reviewed by Michael Catanzaro.

Source/WebKit2:

Reset the viewport attributes on SimpleViewportController when viewport attributes change and fixed layout is
not used. We were only updating the viewport attributes when fixed layout was used, but not resetting them again
when it's no longer used. That caused that reference tests run after fast/fixed-layout/fixed-layout.html or
compositing/fixed-with-fixed-layout.html in the same worker thread were incorrectly rendered.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): Remove ifdefs and call
WebPage::viewportPropertiesDidChange() unconditionally.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSize): Pass current page viewport arguments to sendViewportAttributesChanged().
(WebKit::WebPage::sendViewportAttributesChanged): It now receives the viewport arguments.
(WebKit::WebPage::viewportPropertiesDidChange): Move the iOS implementation from WebPageIOS.mm and for
coordinated graphics call sendViewportAttributesChanged() when fixed layout is used or reset the viewport
attributes when not used in case of threaded compositor.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::viewportPropertiesDidChange): Moved out of iOS ifdef.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange): Deleted.

LayoutTests:

Unskip compositing/fixed-with-fixed-layout.html and fast/fixed-layout/fixed-layout.html.

* platform/gtk/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/LayoutTests/ChangeLog        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-09-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [GTK][Threaded Compositor] Several flaky tests
+        https://bugs.webkit.org/show_bug.cgi?id=161242
+
+        Reviewed by Michael Catanzaro.
+
+        Unskip compositing/fixed-with-fixed-layout.html and fast/fixed-layout/fixed-layout.html.
+
+        * platform/gtk/TestExpectations:
+
</ins><span class="cx"> 2016-09-06  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Marking http/tests/security/cross-origin-plugin-allowed.html as flaky on mac-wk2 release.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -2807,9 +2807,6 @@
</span><span class="cx"> webkit.org/b/160119 svg/repaint/add-outline-property-on-root.html [ ImageOnlyFailure ]
</span><span class="cx"> webkit.org/b/160119 svg/repaint/remove-outline-property-on-root.html [ ImageOnlyFailure ]
</span><span class="cx"> 
</span><del>-webkit.org/b/161242 compositing/fixed-with-fixed-layout.html [ Skip ]
-webkit.org/b/161242 fast/fixed-layout/fixed-layout.html [ Skip ]
-
</del><span class="cx"> webkit.org/b/161242 animations/negative-delay.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/Source/WebKit2/ChangeLog        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -1,5 +1,31 @@
</span><span class="cx"> 2016-09-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><ins>+        [GTK][Threaded Compositor] Several flaky tests
+        https://bugs.webkit.org/show_bug.cgi?id=161242
+
+        Reviewed by Michael Catanzaro.
+
+        Reset the viewport attributes on SimpleViewportController when viewport attributes change and fixed layout is
+        not used. We were only updating the viewport attributes when fixed layout was used, but not resetting them again
+        when it's no longer used. That caused that reference tests run after fast/fixed-layout/fixed-layout.html or
+        compositing/fixed-with-fixed-layout.html in the same worker thread were incorrectly rendered.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): Remove ifdefs and call
+        WebPage::viewportPropertiesDidChange() unconditionally.
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setSize): Pass current page viewport arguments to sendViewportAttributesChanged().
+        (WebKit::WebPage::sendViewportAttributesChanged): It now receives the viewport arguments.
+        (WebKit::WebPage::viewportPropertiesDidChange): Move the iOS implementation from WebPageIOS.mm and for
+        coordinated graphics call sendViewportAttributesChanged() when fixed layout is used or reset the viewport
+        attributes when not used in case of threaded compositor.
+        * WebProcess/WebPage/WebPage.h:
+        (WebKit::WebPage::viewportPropertiesDidChange): Moved out of iOS ifdef.
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
+
+2016-09-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
</ins><span class="cx">         Unreviewed. Fix the GTK+ build after r205524.
</span><span class="cx"> 
</span><span class="cx">         * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMHTMLInputElement.cpp:
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -924,16 +924,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::dispatchViewportPropertiesDidChange(const ViewportArguments&amp; viewportArguments) const
</span><span class="cx"> {
</span><del>-    UNUSED_PARAM(viewportArguments);
-#if PLATFORM(IOS)
</del><span class="cx">     m_page-&gt;viewportPropertiesDidChange(viewportArguments);
</span><del>-#endif
-#if USE(COORDINATED_GRAPHICS)
-    if (!m_page-&gt;useFixedLayout())
-        return;
-
-    m_page-&gt;sendViewportAttributesChanged();
-#endif
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebChromeClient::notifyScrollerThumbIsVisibleInRect(const IntRect&amp; scrollerThumb)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -1378,12 +1378,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx">     if (view-&gt;useFixedLayout())
</span><del>-        sendViewportAttributesChanged();
</del><ins>+        sendViewportAttributesChanged(m_page-&gt;viewportArguments());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><del>-void WebPage::sendViewportAttributesChanged()
</del><ins>+void WebPage::sendViewportAttributesChanged(const ViewportArguments&amp; viewportArguments)
</ins><span class="cx"> {
</span><span class="cx">     FrameView* view = m_page-&gt;mainFrame().view();
</span><span class="cx">     ASSERT(view &amp;&amp; view-&gt;useFixedLayout());
</span><span class="lines">@@ -1401,7 +1401,7 @@
</span><span class="cx">     int deviceWidth = (settings.deviceWidth() &gt; 0) ? settings.deviceWidth() : m_viewSize.width();
</span><span class="cx">     int deviceHeight = (settings.deviceHeight() &gt; 0) ? settings.deviceHeight() : m_viewSize.height();
</span><span class="cx"> 
</span><del>-    ViewportAttributes attr = computeViewportAttributes(m_page-&gt;viewportArguments(), minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
</del><ins>+    ViewportAttributes attr = computeViewportAttributes(viewportArguments, minimumLayoutFallbackWidth, deviceWidth, deviceHeight, 1, m_viewSize);
</ins><span class="cx"> 
</span><span class="cx">     // If no layout was done yet set contentFixedOrigin to (0,0).
</span><span class="cx">     IntPoint contentFixedOrigin = view-&gt;didFirstLayout() ? view-&gt;fixedVisibleContentRect().location() : IntPoint();
</span><span class="lines">@@ -1730,6 +1730,28 @@
</span><span class="cx">     return view-&gt;fixedLayoutSize();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::viewportPropertiesDidChange(const ViewportArguments&amp; viewportArguments)
+{
+#if PLATFORM(IOS)
+    if (m_viewportConfiguration.setViewportArguments(viewportArguments))
+        viewportConfigurationChanged();
+#endif
+
+#if USE(COORDINATED_GRAPHICS)
+    FrameView* view = m_page-&gt;mainFrame().view();
+    if (view &amp;&amp; view-&gt;useFixedLayout())
+        sendViewportAttributesChanged(viewportArguments);
+#if USE(COORDINATED_GRAPHICS_THREADED)
+    else if (auto* layerTreeHost = m_drawingArea-&gt;layerTreeHost())
+        layerTreeHost-&gt;didChangeViewportProperties(ViewportAttributes());
+#endif
+#endif
+
+#if !PLATFORM(IOS) &amp;&amp; !USE(COORDINATED_GRAPHICS)
+    UNUSED_PARAM(viewportArguments);
+#endif
+}
+
</ins><span class="cx"> void WebPage::listenForLayoutMilestones(uint32_t milestones)
</span><span class="cx"> {
</span><span class="cx">     if (!m_page)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -504,11 +504,12 @@
</span><span class="cx">     void elementDidBlur(WebCore::Node*);
</span><span class="cx">     void resetAssistedNodeForFrame(WebFrame*);
</span><span class="cx"> 
</span><ins>+    void viewportPropertiesDidChange(const WebCore::ViewportArguments&amp;);
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     WebCore::FloatSize screenSize() const;
</span><span class="cx">     WebCore::FloatSize availableScreenSize() const;
</span><span class="cx">     int32_t deviceOrientation() const { return m_deviceOrientation; }
</span><del>-    void viewportPropertiesDidChange(const WebCore::ViewportArguments&amp;);
</del><span class="cx">     void didReceiveMobileDocType(bool);
</span><span class="cx"> 
</span><span class="cx">     void setUseTestingViewportConfiguration(bool useTestingViewport) { m_useTestingViewportConfiguration = useTestingViewport; }
</span><span class="lines">@@ -597,7 +598,6 @@
</span><span class="cx">     void pageDidScroll();
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS)
</span><span class="cx">     void pageDidRequestScroll(const WebCore::IntPoint&amp;);
</span><del>-    void sendViewportAttributesChanged();
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
</span><span class="lines">@@ -1127,6 +1127,10 @@
</span><span class="cx">     void hideFindUI();
</span><span class="cx">     void countStringMatches(const String&amp;, uint32_t findOptions, uint32_t maxMatchCount);
</span><span class="cx"> 
</span><ins>+#if USE(COORDINATED_GRAPHICS)
+    void sendViewportAttributesChanged(const WebCore::ViewportArguments&amp;);
+#endif
+
</ins><span class="cx"> #if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
</span><span class="cx">     void findZoomableAreaForPoint(const WebCore::IntPoint&amp;, const WebCore::IntSize&amp; area);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (205536 => 205537)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-09-07 06:14:14 UTC (rev 205536)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-09-07 06:40:57 UTC (rev 205537)
</span><span class="lines">@@ -207,12 +207,6 @@
</span><span class="cx">     return m_availableScreenSize;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::viewportPropertiesDidChange(const ViewportArguments&amp; viewportArguments)
-{
-    if (m_viewportConfiguration.setViewportArguments(viewportArguments))
-        viewportConfigurationChanged();
-}
-
</del><span class="cx"> void WebPage::didReceiveMobileDocType(bool isMobileDoctype)
</span><span class="cx"> {
</span><span class="cx">     if (isMobileDoctype)
</span></span></pre>
</div>
</div>

</body>
</html>