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

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 16:25:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 51bae85b9cf47c680f6da612147355e7e3a2102b
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 23 16:58:46 2010 +0000

    2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Adapt to setShouldDelegateScrolling not being a real setting anymore.
            We now similarily to setUseFixedLayout and setPaintEntireContents
            set it on the FrameView wen transitioning to a new page.
    
            * Api/qgraphicswebview.cpp:
            (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
            * WebCoreSupport/FrameLoaderClientQt.cpp:
            (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
    2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Make setShouldDelegateScrolling not a real setting, so that it works
            similar to the related setUseFixedLayout and setPaintEntireContents
            options which are all in ScrollView.
    
            * page/FrameView.cpp:
            * page/FrameView.h:
            * page/Settings.cpp:
            (WebCore::Settings::Settings):
            * page/Settings.h:
            * platform/ScrollView.cpp:
            (WebCore::ScrollView::ScrollView):
            (WebCore::ScrollView::setDelegatesScrolling):
            * platform/ScrollView.h:
            (WebCore::ScrollView::delegatesScrolling):
    2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Adapt to setShouldDelegateScrolling not being a real setting anymore.
            We now similarily to setUseFixedLayout and setPaintEntireContents
            set it on the FrameView wen transitioning to a new page, etc.
    
            * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
            (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 07231c7..1967e98 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Make setShouldDelegateScrolling not a real setting, so that it works
+        similar to the related setUseFixedLayout and setPaintEntireContents
+        options which are all in ScrollView.
+
+        * page/FrameView.cpp:
+        * page/FrameView.h:
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        * page/Settings.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::ScrollView):
+        (WebCore::ScrollView::setDelegatesScrolling):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::delegatesScrolling):
+
 2010-11-23  Adam Roben  <aroben at apple.com>
 
         Don't rely on DocumentLoader outliving the load/unload events
diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp
index 16b1426..770225b 100644
--- a/WebCore/page/FrameView.cpp
+++ b/WebCore/page/FrameView.cpp
@@ -349,16 +349,6 @@ void FrameView::setMarginHeight(int h)
     m_margins.setHeight(h);
 }
 
-bool FrameView::delegatesScrolling() const
-{
-    ASSERT(m_frame);
-
-    if (parent())
-        return false;
-
-    return m_frame->settings() && m_frame->settings()->shouldDelegateScrolling();
-}
-
 bool FrameView::avoidScrollbarCreation() const
 {
     ASSERT(m_frame);
diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h
index bac24de..42b2096 100644
--- a/WebCore/page/FrameView.h
+++ b/WebCore/page/FrameView.h
@@ -76,7 +76,6 @@ public:
 
     virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
 
-    virtual bool delegatesScrolling() const;
     virtual bool avoidScrollbarCreation() const;
 
     virtual void setContentsSize(const IntSize&);
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 84a7f3c..5ee869d 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -115,7 +115,6 @@ Settings::Settings(Page* page)
     , m_javaScriptCanOpenWindowsAutomatically(false)
     , m_javaScriptCanAccessClipboard(false)
     , m_shouldPrintBackgrounds(false)
-    , m_shouldDelegateScrolling(false)
     , m_textAreasAreResizable(false)
 #if ENABLE(DASHBOARD_SUPPORT)
     , m_usesDashboardBackwardCompatibilityMode(false)
@@ -366,11 +365,6 @@ void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
     m_shouldPrintBackgrounds = shouldPrintBackgrounds;
 }
 
-void Settings::setShouldDelegateScrolling(bool shouldDelegateScrolling)
-{
-    m_shouldDelegateScrolling = shouldDelegateScrolling;
-}
-
 void Settings::setTextAreasAreResizable(bool textAreasAreResizable)
 {
     if (m_textAreasAreResizable == textAreasAreResizable)
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index c3719e2..c653add 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -170,9 +170,6 @@ namespace WebCore {
         void setShouldPrintBackgrounds(bool);
         bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; }
 
-        void setShouldDelegateScrolling(bool);
-        bool shouldDelegateScrolling() const { return m_shouldDelegateScrolling; }
-
         void setTextAreasAreResizable(bool);
         bool textAreasAreResizable() const { return m_textAreasAreResizable; }
 
@@ -379,7 +376,6 @@ namespace WebCore {
         bool m_javaScriptCanOpenWindowsAutomatically : 1;
         bool m_javaScriptCanAccessClipboard : 1;
         bool m_shouldPrintBackgrounds : 1;
-        bool m_shouldDelegateScrolling : 1;
         bool m_textAreasAreResizable : 1;
 #if ENABLE(DASHBOARD_SUPPORT)
         bool m_usesDashboardBackwardCompatibilityMode : 1;
diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp
index c2fd51a..9fafa38 100644
--- a/WebCore/platform/ScrollView.cpp
+++ b/WebCore/platform/ScrollView.cpp
@@ -53,6 +53,7 @@ ScrollView::ScrollView()
     , m_drawPanScrollIcon(false)
     , m_useFixedLayout(false)
     , m_paintsEntireContents(false)
+    , m_delegatesScrolling(false)
 {
     platformInit();
 }
@@ -201,6 +202,11 @@ void ScrollView::setPaintsEntireContents(bool paintsEntireContents)
     m_paintsEntireContents = paintsEntireContents;
 }
 
+void ScrollView::setDelegatesScrolling(bool delegatesScrolling)
+{
+    m_delegatesScrolling = delegatesScrolling;
+}
+
 #if !PLATFORM(GTK)
 IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
 {
diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h
index 8c031cf..4dea56f 100644
--- a/WebCore/platform/ScrollView.h
+++ b/WebCore/platform/ScrollView.h
@@ -104,7 +104,6 @@ public:
     virtual void setCanHaveScrollbars(bool);
     bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; }
 
-    virtual bool delegatesScrolling() const { return false; }
     virtual bool avoidScrollbarCreation() const { return false; }
 
     // By default you only receive paint events for the area that is visible. In the case of using a
@@ -112,6 +111,12 @@ public:
     bool paintsEntireContents() const { return m_paintsEntireContents; }
     void setPaintsEntireContents(bool);
 
+    // By default programmatic scrolling is handled by WebCore and not by the UI application.
+    // In the case of using a tiled backing store, this mode can be set, so that the scroll requests
+    // are delegated to the UI application.
+    bool delegatesScrolling() const { return m_delegatesScrolling; }
+    void setDelegatesScrolling(bool);
+
     // Overridden by FrameView to create custom CSS scrollbars if applicable.
     virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation);
 
@@ -307,6 +312,7 @@ private:
     bool m_useFixedLayout;
 
     bool m_paintsEntireContents;
+    bool m_delegatesScrolling;
 
     void init();
     void destroy();
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 6cc2aa0..c8438f3 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -140,8 +140,8 @@ void QGraphicsWebViewPrivate::updateResizesToContentsForPage()
         QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)),
                          q, SLOT(_q_contentsSizeChanged(const QSize&)));
     }
-    page->d->page->settings()->setShouldDelegateScrolling(resizesToContents);
     page->d->page->mainFrame()->view()->setPaintsEntireContents(resizesToContents);
+    page->d->page->mainFrame()->view()->setDelegatesScrolling(resizesToContents);
 }
 
 void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size)
@@ -413,8 +413,6 @@ void QGraphicsWebViewPrivate::detachCurrentPage()
     if (!page)
         return;
 
-    page->d->page->settings()->setShouldDelegateScrolling(false);
-
     page->d->view.clear();
 
     // The client has always to be deleted.
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index b7578f1..22789c4 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Adapt to setShouldDelegateScrolling not being a real setting anymore.
+        We now similarily to setUseFixedLayout and setPaintEntireContents
+        set it on the FrameView wen transitioning to a new page.
+
+        * Api/qgraphicswebview.cpp:
+        (QGraphicsWebViewPrivate::updateResizesToContentsForPage):
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage):
+
 2010-11-23  Laszlo Gombos  <laszlo.1.gombos at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 07d8277..bf6e75a 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -284,8 +284,10 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
                         vScrollbar, vLock);
 
     bool isMainFrame = m_frame == m_frame->page()->mainFrame();
-    if (isMainFrame && page->d->client)
+    if (isMainFrame && page->d->client) {
         m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled());
+        m_frame->view()->setDelegatesScrolling(page->d->client->viewResizesToContentsEnabled());
+    }
 
     // The HistoryController will update the scroll position later if needed.
     m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 554488b..b5be214 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2010-11-23  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Adapt to setShouldDelegateScrolling not being a real setting anymore.
+        We now similarily to setUseFixedLayout and setPaintEntireContents
+        set it on the FrameView wen transitioning to a new page, etc.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
+
 2010-11-22  Adam Roben  <aroben at apple.com>
 
         Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index dae0ea3..682e76f 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -962,8 +962,10 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage()
 
     m_frame->coreFrame()->createView(m_frame->page()->size(), Color::white, false, webPage->resizesToContentsLayoutSize(), isMainFrame && webPage->resizesToContentsEnabled());
 
-    if (isMainFrame && webPage->resizesToContentsEnabled())
+    if (isMainFrame && webPage->resizesToContentsEnabled()) {
+        m_frame->coreFrame()->view()->setDelegatesScrolling(true);
         m_frame->coreFrame()->view()->setPaintsEntireContents(true);
+    }
 
     // The HistoryController will update the scroll position later if needed.
     m_frame->coreFrame()->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 27d4b7d..5176e18 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -441,14 +441,14 @@ void WebPage::setResizesToContentsUsingLayoutSize(const IntSize& targetLayoutSiz
 
     Frame* frame = m_page->mainFrame();
     if (m_resizesToContentsLayoutSize.isEmpty()) {
-        m_page->settings()->setShouldDelegateScrolling(false);
+        frame->view()->setDelegatesScrolling(false);
         frame->view()->setUseFixedLayout(false);
         frame->view()->setPaintsEntireContents(false);
     } else {
-        m_page->settings()->setShouldDelegateScrolling(true);
+        frame->view()->setDelegatesScrolling(true);
         frame->view()->setUseFixedLayout(true);
-        frame->view()->setFixedLayoutSize(m_resizesToContentsLayoutSize);
         frame->view()->setPaintsEntireContents(true);
+        frame->view()->setFixedLayoutSize(m_resizesToContentsLayoutSize);
     }
     frame->view()->forceLayout();
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list