[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 17:54:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit acba7646a78d31b1751b70d143e86dfcdd73197a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 2 10:12:27 2010 +0000

    2010-12-02  Mike Lawther  <mikelawther at chromium.org>
    
            Reviewed by David Hyatt.
    
            Clean up of iframe scrollbar mode code
            https://bugs.webkit.org/show_bug.cgi?id=47797
    
            Pull setChildNeedsLayout/setNeedsLayout calls out of scrollbar mode
            calculation method and put back into main layout function.
            Early exit from the scrollbar calc when scrollbars are turned off.
    
            * page/FrameView.cpp:
            (WebCore::FrameView::calculateScrollbarModesForLayout):
            (WebCore::FrameView::layout):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6598331..ddfcd30 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-02  Mike Lawther  <mikelawther at chromium.org>
+
+        Reviewed by David Hyatt.
+
+        Clean up of iframe scrollbar mode code
+        https://bugs.webkit.org/show_bug.cgi?id=47797
+
+        Pull setChildNeedsLayout/setNeedsLayout calls out of scrollbar mode
+        calculation method and put back into main layout function. 
+        Early exit from the scrollbar calc when scrollbars are turned off. 
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::calculateScrollbarModesForLayout):
+        (WebCore::FrameView::layout):
+
 2010-12-02  Hironori Bono  <hbono at chromium.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 6fea8cf..1a7b6f0 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -483,6 +483,13 @@ void FrameView::applyOverflowToViewport(RenderObject* o, ScrollbarMode& hMode, S
 
 void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, ScrollbarMode& vMode)
 {
+    const HTMLFrameOwnerElement* owner = m_frame->ownerElement();
+    if (owner && (owner->scrollingMode() == ScrollbarAlwaysOff)) {
+        hMode = ScrollbarAlwaysOff;
+        vMode = ScrollbarAlwaysOff;
+        return;
+    }  
+    
     if (m_canHaveScrollbars) {
         hMode = ScrollbarAuto;
         vMode = ScrollbarAuto;
@@ -498,7 +505,6 @@ void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar
         Node* body = document->body();
         if (body && body->renderer()) {
             if (body->hasTagName(framesetTag) && m_frame->settings() && !m_frame->settings()->frameFlatteningEnabled()) {
-                body->renderer()->setChildNeedsLayout(true);
                 vMode = ScrollbarAlwaysOff;
                 hMode = ScrollbarAlwaysOff;
             } else if (body->hasTagName(bodyTag)) {
@@ -509,26 +515,14 @@ void FrameView::calculateScrollbarModesForLayout(ScrollbarMode& hMode, Scrollbar
             }
         } else if (rootRenderer) {
 #if ENABLE(SVG)
-            if (documentElement->isSVGElement()) {
-                if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight()))
-                    rootRenderer->setChildNeedsLayout(true);
-            } else
+            if (!documentElement->isSVGElement()) {
                 applyOverflowToViewport(rootRenderer, hMode, vMode);
 #else
             applyOverflowToViewport(rootRenderer, hMode, vMode);
 #endif
         }
-#ifdef INSTRUMENT_LAYOUT_SCHEDULING
-        if (m_firstLayout && !document->ownerElement())
-            printf("Elapsed time before first layout: %d\n", document->elapsedTime());
-#endif
-    }
-    
-    HTMLFrameOwnerElement* owner = m_frame->ownerElement();
-    if (owner && (owner->scrollingMode() == ScrollbarAlwaysOff)) {
-        hMode = ScrollbarAlwaysOff;
-        vMode = ScrollbarAlwaysOff;
-    }     
+    }    
+}
 }
     
 #if USE(ACCELERATED_COMPOSITING)
@@ -754,9 +748,35 @@ void FrameView::layout(bool allowSubtree)
 
     m_nestedLayoutCount++;
 
-    ScrollbarMode hMode;
-    ScrollbarMode vMode;
+    if (!m_layoutRoot) {
+        Document* document = m_frame->document();
+        Node* documentElement = document->documentElement();
+        RenderObject* rootRenderer = documentElement ? documentElement->renderer() : 0;
+        Node* body = document->body();
+        if (body && body->renderer()) {
+            if (body->hasTagName(framesetTag) && m_frame->settings() && !m_frame->settings()->frameFlatteningEnabled()) {
+                body->renderer()->setChildNeedsLayout(true);
+            } else if (body->hasTagName(bodyTag)) {
+                if (!m_firstLayout && m_size.height() != layoutHeight() && body->renderer()->enclosingBox()->stretchesToViewport())
+                    body->renderer()->setChildNeedsLayout(true);
+            }
+        } else if (rootRenderer) {
+#if ENABLE(SVG)
+            if (documentElement->isSVGElement()) {
+                if (!m_firstLayout && (m_size.width() != layoutWidth() || m_size.height() != layoutHeight()))
+                    rootRenderer->setChildNeedsLayout(true);
+            }
+#endif
+        }
+        
+#ifdef INSTRUMENT_LAYOUT_SCHEDULING
+        if (m_firstLayout && !document->ownerElement())
+            printf("Elapsed time before first layout: %d\n", document->elapsedTime());
+#endif        
+    }
     
+    ScrollbarMode hMode;
+    ScrollbarMode vMode;    
     calculateScrollbarModesForLayout(hMode, vMode);
 
     m_doFullRepaint = !subtree && (m_firstLayout || toRenderView(root)->printing());

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list