<!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>[199369] releases/WebKitGTK/webkit-2.12/Source/WebCore</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/199369">199369</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-04-12 09:57:23 -0700 (Tue, 12 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/198238">r198238</a> - Delay HTMLFormControlElement::focus() call until after layout is finished.
https://bugs.webkit.org/show_bug.cgi?id=155503
&lt;rdar://problem/24046635&gt;

Reviewed by Simon Fraser.

Calling focus on a form element can trigger arbitrary JS code which could interfere with
the ongoing layout.
This patch delays HTMLFormControlElement::focus() call until after layout is finished.
If we are currently not in the middle of a layout, HTMLFormControlElement::focus() is delayed until
after style resolution is done.

Covered by LayoutTests/fast/dom/adopt-node-crash-2.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::updateBackingStore):
* dom/Document.cpp:
(WebCore::Document::updateStyleIfNeeded):
(WebCore::Document::updateLayout):
(WebCore::Document::updateLayoutIfDimensionsOutOfDate):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::didAttachRenderers):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
(WebCore::FrameView::queuePostLayoutCallback):
(WebCore::FrameView::flushPostLayoutTasksQueue):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::sendResizeEventIfNeeded):
* page/FrameView.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::imageChanged):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityObjectcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCoredomDocumentcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorehtmlHTMLEmbedElementcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLEmbedElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorehtmlHTMLFormControlElementcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLFormControlElement.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorepageFrameViewcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorepageFrameViewh">releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorerenderingRenderBoxcpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit212SourceWebCorerenderingRenderLayercpp">releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit212SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2016-03-15  Zalan Bujtas  &lt;zalan@apple.com&gt;
+
+        Delay HTMLFormControlElement::focus() call until after layout is finished.
+        https://bugs.webkit.org/show_bug.cgi?id=155503
+        &lt;rdar://problem/24046635&gt;
+
+        Reviewed by Simon Fraser.
+
+        Calling focus on a form element can trigger arbitrary JS code which could interfere with
+        the ongoing layout. 
+        This patch delays HTMLFormControlElement::focus() call until after layout is finished.
+        If we are currently not in the middle of a layout, HTMLFormControlElement::focus() is delayed until
+        after style resolution is done. 
+
+        Covered by LayoutTests/fast/dom/adopt-node-crash-2.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::updateBackingStore):
+        * dom/Document.cpp:
+        (WebCore::Document::updateStyleIfNeeded):
+        (WebCore::Document::updateLayout):
+        (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
+        * html/HTMLEmbedElement.cpp:
+        (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin):
+        * html/HTMLFormControlElement.cpp:
+        (WebCore::HTMLFormControlElement::didAttachRenderers):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::layout):
+        (WebCore::FrameView::queuePostLayoutCallback):
+        (WebCore::FrameView::flushPostLayoutTasksQueue):
+        (WebCore::FrameView::performPostLayoutTasks):
+        (WebCore::FrameView::sendResizeEventIfNeeded):
+        * page/FrameView.h:
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::imageChanged):
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::scrollTo):
+
</ins><span class="cx"> 2016-03-15  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (196383): Class change invalidation does not handle :not correctly
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityObject.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -1623,7 +1623,7 @@
</span><span class="cx">     RefPtr&lt;AccessibilityObject&gt; protector(this);
</span><span class="cx"> 
</span><span class="cx">     if (Document* document = this-&gt;document()) {
</span><del>-        if (!document-&gt;view()-&gt;isInLayout())
</del><ins>+        if (!document-&gt;view()-&gt;isInRenderTreeLayout())
</ins><span class="cx">             document-&gt;updateLayoutIgnorePendingStylesheets();
</span><span class="cx">     }
</span><span class="cx">     
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/dom/Document.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -1928,7 +1928,7 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     ASSERT(!view() || !view()-&gt;isPainting());
</span><span class="cx"> 
</span><del>-    if (!view() || view()-&gt;isInLayout())
</del><ins>+    if (!view() || view()-&gt;isInRenderTreeLayout())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (m_optimizedStyleSheetUpdateTimer.isActive())
</span><span class="lines">@@ -1945,7 +1945,7 @@
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx"> 
</span><span class="cx">     FrameView* frameView = view();
</span><del>-    if (frameView &amp;&amp; frameView-&gt;isInLayout()) {
</del><ins>+    if (frameView &amp;&amp; frameView-&gt;isInRenderTreeLayout()) {
</ins><span class="cx">         // View layout should not be re-entrant.
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return;
</span><span class="lines">@@ -2025,7 +2025,7 @@
</span><span class="cx">     
</span><span class="cx">     // Check for re-entrancy and assert (same code that is in updateLayout()).
</span><span class="cx">     FrameView* frameView = view();
</span><del>-    if (frameView &amp;&amp; frameView-&gt;isInLayout()) {
</del><ins>+    if (frameView &amp;&amp; frameView-&gt;isInRenderTreeLayout()) {
</ins><span class="cx">         // View layout should not be re-entrant.
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">         return true;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorehtmlHTMLEmbedElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLEmbedElement.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLEmbedElement.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLEmbedElement.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> RenderWidget* HTMLEmbedElement::renderWidgetLoadingPlugin() const
</span><span class="cx"> {
</span><span class="cx">     FrameView* view = document().view();
</span><del>-    if (!view || (!view-&gt;isInLayout() &amp;&amp; !view-&gt;isPainting())) {
</del><ins>+    if (!view || (!view-&gt;isInRenderTreeLayout() &amp;&amp; !view-&gt;isPainting())) {
</ins><span class="cx">         // Needs to load the plugin immediatedly because this function is called
</span><span class="cx">         // when JavaScript code accesses the plugin.
</span><span class="cx">         // FIXME: &lt;rdar://16893708&gt; Check if dispatching events here is safe.
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorehtmlHTMLFormControlElementcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLFormControlElement.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLFormControlElement.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/html/HTMLFormControlElement.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include &quot;EventHandler.h&quot;
</span><span class="cx"> #include &quot;EventNames.h&quot;
</span><span class="cx"> #include &quot;Frame.h&quot;
</span><ins>+#include &quot;FrameView.h&quot;
</ins><span class="cx"> #include &quot;HTMLFieldSetElement.h&quot;
</span><span class="cx"> #include &quot;HTMLFormElement.h&quot;
</span><span class="cx"> #include &quot;HTMLInputElement.h&quot;
</span><span class="lines">@@ -234,9 +235,16 @@
</span><span class="cx">         setAutofocused();
</span><span class="cx"> 
</span><span class="cx">         RefPtr&lt;HTMLFormControlElement&gt; element = this;
</span><del>-        Style::queuePostResolutionCallback([element] {
-            element-&gt;focus();
-        });
</del><ins>+        auto* frameView = document().view();
+        if (frameView &amp;&amp; frameView-&gt;isInLayout()) {
+            frameView-&gt;queuePostLayoutCallback([element] {
+                element-&gt;focus();
+            });
+        } else {
+            Style::queuePostResolutionCallback([element] {
+                element-&gt;focus();
+            });
+        }
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -1209,7 +1209,7 @@
</span><span class="cx"> void FrameView::layout(bool allowSubtree)
</span><span class="cx"> {
</span><span class="cx">     LOG(Layout, &quot;FrameView %p (%dx%d) layout, main frameview %d, allowSubtree=%d&quot;, this, size().width(), size().height(), frame().isMainFrame(), allowSubtree);
</span><del>-    if (isInLayout()) {
</del><ins>+    if (isInRenderTreeLayout()) {
</ins><span class="cx">         LOG(Layout, &quot;  in layout, bailing&quot;);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1397,11 +1397,11 @@
</span><span class="cx">         RenderView::RepaintRegionAccumulator repaintRegionAccumulator(&amp;root-&gt;view());
</span><span class="cx"> 
</span><span class="cx">         ASSERT(m_layoutPhase == InPreLayout);
</span><del>-        m_layoutPhase = InLayout;
</del><ins>+        m_layoutPhase = InRenderTreeLayout;
</ins><span class="cx"> 
</span><span class="cx">         forceLayoutParentViewIfNeeded();
</span><span class="cx"> 
</span><del>-        ASSERT(m_layoutPhase == InLayout);
</del><ins>+        ASSERT(m_layoutPhase == InRenderTreeLayout);
</ins><span class="cx"> 
</span><span class="cx">         root-&gt;layout();
</span><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="lines">@@ -1420,7 +1420,7 @@
</span><span class="cx">             root-&gt;layout();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-        ASSERT(m_layoutPhase == InLayout);
</del><ins>+        ASSERT(m_layoutPhase == InRenderTreeLayout);
</ins><span class="cx">         m_layoutRoot = nullptr;
</span><span class="cx">         // Close block here to end the scope of changeSchedulingEnabled and SubtreeLayoutStateMaintainer.
</span><span class="cx">     }
</span><span class="lines">@@ -3073,6 +3073,25 @@
</span><span class="cx">         updateEmbeddedObjectsTimerFired();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::queuePostLayoutCallback(std::function&lt;void()&gt; callback)
+{
+    m_postLayoutCallbackQueue.append(callback);
+}
+
+void FrameView::flushPostLayoutTasksQueue()
+{
+    if (m_nestedLayoutCount &gt; 1)
+        return;
+
+    if (!m_postLayoutCallbackQueue.size())
+        return;
+
+    const auto queue = m_postLayoutCallbackQueue;
+    m_postLayoutCallbackQueue.clear();
+    for (size_t i = 0; i &lt; queue.size(); ++i)
+        queue[i]();
+}
+
</ins><span class="cx"> void FrameView::performPostLayoutTasks()
</span><span class="cx"> {
</span><span class="cx">     LOG(Layout, &quot;FrameView %p performPostLayoutTasks&quot;, this);
</span><span class="lines">@@ -3083,6 +3102,8 @@
</span><span class="cx"> 
</span><span class="cx">     frame().selection().updateAppearanceAfterLayout();
</span><span class="cx"> 
</span><ins>+    flushPostLayoutTasksQueue();
+
</ins><span class="cx">     if (m_nestedLayoutCount &lt;= 1 &amp;&amp; frame().document()-&gt;documentElement())
</span><span class="cx">         fireLayoutRelatedMilestonesIfNeeded();
</span><span class="cx"> 
</span><span class="lines">@@ -3148,7 +3169,7 @@
</span><span class="cx"> 
</span><span class="cx"> void FrameView::sendResizeEventIfNeeded()
</span><span class="cx"> {
</span><del>-    if (isInLayout() || needsLayout())
</del><ins>+    if (isInRenderTreeLayout() || needsLayout())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     RenderView* renderView = this-&gt;renderView();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.h (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.h        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/page/FrameView.h        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -111,9 +111,11 @@
</span><span class="cx">     void scheduleRelayout();
</span><span class="cx">     void scheduleRelayoutOfSubtree(RenderElement&amp;);
</span><span class="cx">     void unscheduleRelayout();
</span><ins>+    void queuePostLayoutCallback(std::function&lt;void()&gt;);
</ins><span class="cx">     bool layoutPending() const;
</span><del>-    bool isInLayout() const { return m_layoutPhase == InLayout; }
-    WEBCORE_EXPORT bool inPaintableState() { return m_layoutPhase != InLayout &amp;&amp; m_layoutPhase != InViewSizeAdjust &amp;&amp; m_layoutPhase != InPostLayout; }
</del><ins>+    bool isInLayout() const { return m_layoutPhase != OutsideLayout; }
+    bool isInRenderTreeLayout() const { return m_layoutPhase == InRenderTreeLayout; }
+    WEBCORE_EXPORT bool inPaintableState() { return m_layoutPhase != InRenderTreeLayout &amp;&amp; m_layoutPhase != InViewSizeAdjust &amp;&amp; m_layoutPhase != InPostLayout; }
</ins><span class="cx"> 
</span><span class="cx">     RenderElement* layoutRoot() const { return m_layoutRoot; }
</span><span class="cx">     void clearLayoutRoot() { m_layoutRoot = nullptr; }
</span><span class="lines">@@ -572,7 +574,7 @@
</span><span class="cx">         OutsideLayout,
</span><span class="cx">         InPreLayout,
</span><span class="cx">         InPreLayoutStyleUpdate,
</span><del>-        InLayout,
</del><ins>+        InRenderTreeLayout,
</ins><span class="cx">         InViewSizeAdjust,
</span><span class="cx">         InPostLayout,
</span><span class="cx">         InPostLayerPositionsUpdatedAfterLayout,
</span><span class="lines">@@ -604,6 +606,7 @@
</span><span class="cx">     WEBCORE_EXPORT void paintControlTints();
</span><span class="cx"> 
</span><span class="cx">     void forceLayoutParentViewIfNeeded();
</span><ins>+    void flushPostLayoutTasksQueue();
</ins><span class="cx">     void performPostLayoutTasks();
</span><span class="cx">     void autoSizeIfEnabled();
</span><span class="cx"> 
</span><span class="lines">@@ -817,6 +820,7 @@
</span><span class="cx">     ScrollPinningBehavior m_scrollPinningBehavior;
</span><span class="cx"> 
</span><span class="cx">     IntRect* m_cachedWindowClipRect { nullptr };
</span><ins>+    Vector&lt;std::function&lt;void()&gt;&gt; m_postLayoutCallbackQueue;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderBox.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -1692,7 +1692,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CSS_SHAPES)
</span><span class="cx">     ShapeValue* shapeOutsideValue = style().shapeOutside();
</span><del>-    if (!view().frameView().isInLayout() &amp;&amp; isFloating() &amp;&amp; shapeOutsideValue &amp;&amp; shapeOutsideValue-&gt;image() &amp;&amp; shapeOutsideValue-&gt;image()-&gt;data() == image) {
</del><ins>+    if (!view().frameView().isInRenderTreeLayout() &amp;&amp; isFloating() &amp;&amp; shapeOutsideValue &amp;&amp; shapeOutsideValue-&gt;image() &amp;&amp; shapeOutsideValue-&gt;image()-&gt;data() == image) {
</ins><span class="cx">         ShapeOutsideInfo::ensureInfo(*this).markShapeAsDirty();
</span><span class="cx">         markShapeOutsideDependentsForLayout();
</span><span class="cx">     }
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit212SourceWebCorerenderingRenderLayercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp (199368 => 199369)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp        2016-04-12 16:50:02 UTC (rev 199368)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/rendering/RenderLayer.cpp        2016-04-12 16:57:23 UTC (rev 199369)
</span><span class="lines">@@ -2385,8 +2385,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Update the positions of our child layers (if needed as only fixed layers should be impacted by a scroll).
</span><span class="cx">     // We don't update compositing layers, because we need to do a deep update from the compositing ancestor.
</span><del>-    bool inLayout = view.frameView().isInLayout();
-    if (!inLayout) {
</del><ins>+    if (!view.frameView().isInRenderTreeLayout()) {
</ins><span class="cx">         // If we're in the middle of layout, we'll just update layers once layout has finished.
</span><span class="cx">         updateLayerPositionsAfterOverflowScroll();
</span><span class="cx">         // Update regions, scrolling may change the clip of a particular region.
</span></span></pre>
</div>
</div>

</body>
</html>