[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.2.2-27-g91dab87

Gustavo Noronha Silva gns at gnome.org
Thu Jul 15 21:13:31 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 545eb590cdc5666ce34f76cbd11d513273382c3c
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed May 12 20:51:06 2010 +0000

    2010-05-12  James Robinson  <jamesr at chromium.org>
    
            Patch by Dan Bernstein.
    
            Reviewed by David Hyatt.
    
            Fix marking the layout root's parent as needing layout
            https://bugs.webkit.org/show_bug.cgi?id=37760
    
            If an element gets marked as needing layout due to the recalcStyle()
            call in FrameView::layout(), the m_layoutSchedulingEnabled flag will
            be set to false.  It's possible at this point that a parent of the
            existing FrameView::m_layoutRoot will be marked as needing layout.
    
            This patch updates FrameView::scheduleRelayoutOfSubtree to account
            for this case.
    
            Manual test only due to subtle timing issues.
    
            * manual-tests/layoutroot_detach.xml: Added.
            * page/FrameView.cpp:
            (WebCore::FrameView::scheduleRelayoutOfSubtree):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@59263 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f089631..62dafd2 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,26 @@
+2010-05-12  James Robinson  <jamesr at chromium.org>
+
+        Patch by Dan Bernstein.
+
+        Reviewed by David Hyatt.
+
+        Fix marking the layout root's parent as needing layout
+        https://bugs.webkit.org/show_bug.cgi?id=37760
+
+        If an element gets marked as needing layout due to the recalcStyle()
+        call in FrameView::layout(), the m_layoutSchedulingEnabled flag will
+        be set to false.  It's possible at this point that a parent of the
+        existing FrameView::m_layoutRoot will be marked as needing layout.
+
+        This patch updates FrameView::scheduleRelayoutOfSubtree to account
+        for this case.
+
+        Manual test only due to subtle timing issues.
+
+        * manual-tests/layoutroot_detach.xml: Added.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scheduleRelayoutOfSubtree):
+
 2010-04-28  Julien Chaffraix  <jchaffraix at webkit.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/manual-tests/layoutroot_detach.xml b/WebCore/manual-tests/layoutroot_detach.xml
new file mode 100644
index 0000000..3a64c01
--- /dev/null
+++ b/WebCore/manual-tests/layoutroot_detach.xml
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<body onload="addImg()">
+<style>
+.killme { display:none }
+</style>
+<div style="overflow:hidden; position:absolute; width:150px; height:150px; top:50px; left:0px">
+  <div id='parent' style="overflow:hidden; position:absolute; width:150px; height:150px; top:50px; left:0px">
+    <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
+      <g>
+        <rect id='rrr' x='0' y='0' width='10' height='10'/>
+      </g>
+    </svg>
+  </div>
+</div>
+<script>
+function boomie() {
+    document.body.offsetTop;
+    document.getElementById('rrr').setAttribute('x', '20');
+    document.getElementById('parent').className='killme';
+}
+function addImg() {
+    window.setTimeout(function() {
+        var i = new Image();
+        i.src = 'http://www.webkit.org/nosuchfile.png';
+        document.body.appendChild(i);
+        i.onerror = boomie;
+    }, 15);
+}
+</script>
+</body>
+</html>
+
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index caa78bd..d38f655 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -1275,14 +1275,13 @@ void FrameView::scheduleRelayoutOfSubtree(RenderObject* relayoutRoot)
 {
     ASSERT(m_frame->view() == this);
 
-    if (!m_layoutSchedulingEnabled || (m_frame->contentRenderer()
-            && m_frame->contentRenderer()->needsLayout())) {
+    if (m_frame->contentRenderer() && m_frame->contentRenderer()->needsLayout()) {
         if (relayoutRoot)
             relayoutRoot->markContainingBlocksForLayout(false);
         return;
     }
 
-    if (layoutPending()) {
+    if (layoutPending() || !m_layoutSchedulingEnabled) {
         if (m_layoutRoot != relayoutRoot) {
             if (isObjectAncestorContainerOf(m_layoutRoot, relayoutRoot)) {
                 // Keep the current root
@@ -1299,7 +1298,7 @@ void FrameView::scheduleRelayoutOfSubtree(RenderObject* relayoutRoot)
                 relayoutRoot->markContainingBlocksForLayout(false);
             }
         }
-    } else {
+    } else if (m_layoutSchedulingEnabled) {
         int delay = m_frame->document()->minimumLayoutDelay();
         m_layoutRoot = relayoutRoot;
         m_delayedLayout = delay != 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list