[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:27:02 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit b0444cef4e8bb4265a2b6d67e1f7d891680ec082
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 9 17:54:30 2009 +0000

    2009-11-09  Mark Mentovai  <mark at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
            REGRESSION (r48064): mint.com loses scrollbars after coming out of
            edit mode.
    
            rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
            REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
    
            * fast/overflow/scrollbar-restored-expected.txt: Added.
            * fast/overflow/scrollbar-restored.html: Added.
    2009-11-09  Mark Mentovai  <mark at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Track "can have scrollbar" state within FrameView independently of the
            individual scrollbar states in ScrollView.
    
            rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
            REGRESSION (r48064): mint.com loses scrollbars after coming out of
            edit mode.
    
            rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
            REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
    
            Test: fast/overflow/scrollbar-restored.html
    
            * WebCore.base.exp:
            * page/FrameView.cpp:
            (WebCore::FrameView::FrameView):
            (WebCore::FrameView::resetScrollbars):
            (WebCore::FrameView::setCanHaveScrollbars):
            (WebCore::FrameView::updateCanHaveScrollbars):
            (WebCore::FrameView::layout):
            * page/FrameView.h:
            * platform/ScrollView.h:
    2009-11-09  Mark Mentovai  <mark at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Track "can have scrollbar" state within FrameView independently of the
            individual scrollbar states in ScrollView.
    
            rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
            REGRESSION (r48064): mint.com loses scrollbars after coming out of
            edit mode.
    
            rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
            REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
    
            Test: fast/overflow/scrollbar-restored.html
    
            * WebView/WebFrameView.mm:
            (-[WebFrameView _install]):
    2009-11-09  Mark Mentovai  <mark at chromium.org>
    
            Reviewed by Dan Bernstein.
    
            Track "can have scrollbar" state within FrameView independently of the
            individual scrollbar states in ScrollView.
    
            rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
            REGRESSION (r48064): mint.com loses scrollbars after coming out of
            edit mode.
    
            rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
            REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
    
            Test: fast/overflow/scrollbar-restored.html
    
            * Api/qwebframe.cpp:
            (QWebFrame::setScrollBarPolicy):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50665 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index b1de815..b37de3f 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-09  Mark Mentovai  <mark at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+        REGRESSION (r48064): mint.com loses scrollbars after coming out of
+        edit mode.
+
+        rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+        * fast/overflow/scrollbar-restored-expected.txt: Added.
+        * fast/overflow/scrollbar-restored.html: Added.
+
 2009-11-09  Keishi Hattori  <casey.hattori at gmail.com>
 
         Reviewed by Timothy Hatcher.
diff --git a/LayoutTests/fast/overflow/scrollbar-restored-expected.txt b/LayoutTests/fast/overflow/scrollbar-restored-expected.txt
new file mode 100644
index 0000000..451154f
--- /dev/null
+++ b/LayoutTests/fast/overflow/scrollbar-restored-expected.txt
@@ -0,0 +1,5 @@
+Test for rdar://problem/7215132, bug 29167, REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode, and rdar://problem/7314421, bug 30517, REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+This tests that after setting 'overflow' on the document element to 'hidden' and back to 'visible', scrollbars appear as necessary.
+
+PASS
diff --git a/LayoutTests/fast/overflow/scrollbar-restored.html b/LayoutTests/fast/overflow/scrollbar-restored.html
new file mode 100644
index 0000000..c3ddc51
--- /dev/null
+++ b/LayoutTests/fast/overflow/scrollbar-restored.html
@@ -0,0 +1,29 @@
+<body>
+    <p>
+        Test for <i><a href="rdar://problem/7215132">rdar://problem/7215132</a>,
+        <a href="https://bugs.webkit.org/show_bug.cgi?id=29167">bug 29167</a>,
+        REGRESSION (r48064): mint.com loses scrollbars after coming out of edit mode</i>,
+        and <i><a href="rdar://problem/7314421">rdar://problem/7314421</a>,
+        <a href="https://bugs.webkit.org/show_bug.cgi?id=30517">bug 30517</a>,
+        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store</i>.
+    </p>
+    <p>
+        This tests that after setting 'overflow' on the document element to
+        'hidden' and back to 'visible', scrollbars appear as necessary.
+    </p>
+    <p id="result">FAIL: Test did not run to completion</p>
+    <script>
+        if (window.layoutTestController)
+            layoutTestController.dumpAsText();
+
+        document.documentElement.style.overflow = "hidden";
+        document.body.offsetTop;
+        document.documentElement.style.removeProperty("overflow");
+        document.body.style.height = "200%";
+        var result = (innerWidth === document.documentElement.offsetWidth)
+            ? "FAIL: Scrollbar did not appear after resetting 'overflow'"
+            : "PASS"
+
+        document.getElementById("result").innerText = result;
+    </script>
+</body>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fb153e2..6528fdc 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2009-11-09  Mark Mentovai  <mark at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Track "can have scrollbar" state within FrameView independently of the
+        individual scrollbar states in ScrollView.
+
+        rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+        REGRESSION (r48064): mint.com loses scrollbars after coming out of
+        edit mode.
+
+        rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+        Test: fast/overflow/scrollbar-restored.html
+
+        * WebCore.base.exp:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::FrameView):
+        (WebCore::FrameView::resetScrollbars):
+        (WebCore::FrameView::setCanHaveScrollbars):
+        (WebCore::FrameView::updateCanHaveScrollbars):
+        (WebCore::FrameView::layout):
+        * page/FrameView.h:
+        * platform/ScrollView.h:
+
 2009-11-09  Keishi Hattori  <casey.hattori at gmail.com>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index e70c6cb..82f3a2b 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -688,6 +688,7 @@ __ZN7WebCore9FrameView21flushDeferredRepaintsEv
 __ZN7WebCore9FrameView21scrollPositionChangedEv
 __ZN7WebCore9FrameView22setBaseBackgroundColorENS_5ColorE
 __ZN7WebCore9FrameView23layoutIfNeededRecursiveEv
+__ZN7WebCore9FrameView23updateCanHaveScrollbarsEv
 __ZN7WebCore9FrameView29forceLayoutWithPageWidthRangeEffb
 __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
 __ZN7WebCore9FrameView29syncCompositingStateRecursiveEv
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 7b97392..4ff6b23 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -105,6 +105,7 @@ struct ScheduledEvent {
 
 FrameView::FrameView(Frame* frame)
     : m_frame(frame)
+    , m_canHaveScrollbars(true)
     , m_slowRepaintObjectCount(0)
     , m_layoutTimer(this, &FrameView::layoutTimerFired)
     , m_layoutRoot(0)
@@ -219,7 +220,10 @@ void FrameView::resetScrollbars()
     // Reset the document's scrollbars back to our defaults before we yield the floor.
     m_firstLayout = true;
     setScrollbarsSuppressed(true);
-    setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
+    if (m_canHaveScrollbars)
+        setScrollbarModes(ScrollbarAuto, ScrollbarAuto);
+    else
+        setScrollbarModes(ScrollbarAlwaysOff, ScrollbarAlwaysOff);
     setScrollbarsSuppressed(false);
 }
 
@@ -316,6 +320,23 @@ void FrameView::setMarginHeight(int h)
     m_margins.setHeight(h);
 }
 
+void FrameView::setCanHaveScrollbars(bool canHaveScrollbars)
+{
+    m_canHaveScrollbars = canHaveScrollbars;
+    ScrollView::setCanHaveScrollbars(canHaveScrollbars);
+}
+
+void FrameView::updateCanHaveScrollbars()
+{
+    ScrollbarMode hMode;
+    ScrollbarMode vMode;
+    scrollbarModes(hMode, vMode);
+    if (hMode == ScrollbarAlwaysOff && vMode == ScrollbarAlwaysOff)
+        m_canHaveScrollbars = false;
+    else
+        m_canHaveScrollbars = true;
+}
+
 PassRefPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientation orientation)
 {
     // FIXME: We need to update the scrollbar dynamically as documents change (or as doc elements and bodies get discovered that have custom styles).
@@ -562,7 +583,13 @@ void FrameView::layout(bool allowSubtree)
 
     ScrollbarMode hMode;
     ScrollbarMode vMode;
-    scrollbarModes(hMode, vMode);
+    if (m_canHaveScrollbars) {
+        hMode = ScrollbarAuto;
+        vMode = ScrollbarAuto;
+    } else {
+        hMode = ScrollbarAlwaysOff;
+        vMode = ScrollbarAlwaysOff;
+    }
 
     if (!subtree) {
         RenderObject* rootRenderer = document->documentElement() ? document->documentElement()->renderer() : 0;
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index 8f2c159..2da8234 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -72,6 +72,9 @@ public:
     void setMarginWidth(int);
     void setMarginHeight(int);
 
+    virtual void setCanHaveScrollbars(bool);
+    void updateCanHaveScrollbars();
+
     virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
 
     virtual void setContentsSize(const IntSize&);
@@ -258,6 +261,7 @@ private:
 
     bool m_doFullRepaint;
     
+    bool m_canHaveScrollbars;
     bool m_useSlowRepaints;
     bool m_isOverlapped;
     bool m_contentIsOpaque;
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 1950a54..dbbbff1 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -89,7 +89,7 @@ public:
     void scrollbarModes(ScrollbarMode& horizontalMode, ScrollbarMode& verticalMode) const;
     ScrollbarMode horizontalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return horizontal; }
     ScrollbarMode verticalScrollbarMode() const { ScrollbarMode horizontal, vertical; scrollbarModes(horizontal, vertical); return vertical; }
-    void setCanHaveScrollbars(bool flag);
+    virtual void setCanHaveScrollbars(bool);
     bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
 
     // Overridden by FrameView to create custom CSS scrollbars if applicable.
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 75523df..93f88cd 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-09  Mark Mentovai  <mark at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Track "can have scrollbar" state within FrameView independently of the
+        individual scrollbar states in ScrollView.
+
+        rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+        REGRESSION (r48064): mint.com loses scrollbars after coming out of
+        edit mode.
+
+        rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+        Test: fast/overflow/scrollbar-restored.html
+
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView _install]):
+
 2009-11-08  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Eric Carlson.
diff --git a/WebKit/mac/WebView/WebFrameView.mm b/WebKit/mac/WebView/WebFrameView.mm
index c300586..8ddaa95 100644
--- a/WebKit/mac/WebView/WebFrameView.mm
+++ b/WebKit/mac/WebView/WebFrameView.mm
@@ -273,6 +273,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
         owner->setWidget(view);
         // Now the render part owns the view, so we don't any more.
     }
+
+    view->updateCanHaveScrollbars();
 }
 
 @end
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 17a0118..2f2548d 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -867,11 +867,13 @@ void QWebFrame::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPol
         d->horizontalScrollBarPolicy = policy;
         if (d->frame->view()) {
             d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy);
+            d->frame->view()->updateCanHaveScrollbars();
         }
     } else {
         d->verticalScrollBarPolicy = policy;
         if (d->frame->view()) {
             d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy);
+            d->frame->view()->updateCanHaveScrollbars();
         }
     }
 }
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 828beeb..b940619 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,22 @@
+2009-11-09  Mark Mentovai  <mark at chromium.org>
+
+        Reviewed by Dan Bernstein.
+
+        Track "can have scrollbar" state within FrameView independently of the
+        individual scrollbar states in ScrollView.
+
+        rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
+        REGRESSION (r48064): mint.com loses scrollbars after coming out of
+        edit mode.
+
+        rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
+        REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
+
+        Test: fast/overflow/scrollbar-restored.html
+
+        * Api/qwebframe.cpp:
+        (QWebFrame::setScrollBarPolicy):
+
 2009-11-09  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list