[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 15:43:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 46026b2dc4a16e9bff96fdf2c54608e909273f84
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 11 12:46:41 2010 +0000

    2010-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            [Qt] Add an API for overriding the actual visible content rect in WebCore
            https://bugs.webkit.org/show_bug.cgi?id=49373
    
            * Api/qwebpage.cpp:
            (QWebPage::setActualVisibleContentRect):
            * Api/qwebpage.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71806 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index a716b55..6152660 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -2540,6 +2540,26 @@ void QWebPage::setPreferredContentsSize(const QSize& size) const
     view->layout();
 }
 
+/*
+    This function is to be called after any (animated) scroll/pan has ended, in the case the application handles the
+    scrolling/panning of the web contents. This is commonly used in combination with tiling where is it common for
+    the application to pan the actual view, which then resizes itself to the size of the contents.
+
+    \note Calling this function makes WebKit stop trying to calculate the visibleContentRect. To turn that on
+    again, call this method with an empty rect.
+
+    \sa QGraphicsWebView::resizesToContents, QWebSettings::TiledBackingStoreEnabled
+*/
+void QWebPage::setActualVisibleContentRect(const QRect& rect) const
+{
+    QWebFrame* frame = mainFrame();
+    if (!frame->d->frame || !frame->d->frame->view())
+        return;
+
+    WebCore::FrameView* view = frame->d->frame->view();
+    view->setActualVisibleContentRect(rect);
+}
+
 /*!
     \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type)
 
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index 15d2432..ec551e5 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -280,6 +280,7 @@ public:
 
     QSize preferredContentsSize() const;
     void setPreferredContentsSize(const QSize &size) const;
+    void setActualVisibleContentRect(const QRect& rect) const;
 
     virtual bool event(QEvent*);
     bool focusNextPrevChild(bool next);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 4dffc19..3b5523c 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Add an API for overriding the actual visible content rect in WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=49373
+
+        * Api/qwebpage.cpp:
+        (QWebPage::setActualVisibleContentRect):
+        * Api/qwebpage.h:
+
 2010-11-11  Andreas Kling  <kling at webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list