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

tonikitoo at webkit.org tonikitoo at webkit.org
Wed Dec 22 13:29:45 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 43372d9db165b94975c20fa4c23c6050a7362189
Author: tonikitoo at webkit.org <tonikitoo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 17 01:33:44 2010 +0000

    2010-09-12  Antonio Gomes  <tonikitoo at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Make all accesses to m_item (GraphicsWebView) done by WebViewGraphicsBased class happen though graphicsWebView getter method.
    
            This patch is mostly a preparation for another commit, where the ownership of the m_item/GraphicsWebView
            object will move to the qgraphicsscene instead of the qgraphicsview.
    
            * QtTestBrowser/webview.cpp:
            (WebViewGraphicsBased::setPage):
            (WebViewGraphicsBased::setResizesToContents):
            (WebViewGraphicsBased::resizeEvent):
            (WebViewGraphicsBased::animatedFlip):
            * QtTestBrowser/webview.h:
            (WebViewGraphicsBased::setItemCacheMode):
            (WebViewGraphicsBased::itemCacheMode):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9c52aa4..0ae9464 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,24 @@
 
         Reviewed by Andreas Kling.
 
+        Make all accesses to m_item (GraphicsWebView) done by WebViewGraphicsBased class happen though graphicsWebView getter method.
+
+        This patch is mostly a preparation for another commit, where the ownership of the m_item/GraphicsWebView
+        object will move to the qgraphicsscene instead of the qgraphicsview.
+
+        * QtTestBrowser/webview.cpp:
+        (WebViewGraphicsBased::setPage):
+        (WebViewGraphicsBased::setResizesToContents):
+        (WebViewGraphicsBased::resizeEvent):
+        (WebViewGraphicsBased::animatedFlip):
+        * QtTestBrowser/webview.h:
+        (WebViewGraphicsBased::setItemCacheMode):
+        (WebViewGraphicsBased::itemCacheMode):
+
+2010-09-12  Antonio Gomes  <tonikitoo at webkit.org>
+
+        Reviewed by Andreas Kling.
+
         Moved setYRotation method body out of the class (WebViewGraphicsBased) definition.
 
         We usually separate methods whose body are larger than a few lines from the class definition.
diff --git a/WebKitTools/QtTestBrowser/webview.cpp b/WebKitTools/QtTestBrowser/webview.cpp
index bc8fad1..d8d89a9 100644
--- a/WebKitTools/QtTestBrowser/webview.cpp
+++ b/WebKitTools/QtTestBrowser/webview.cpp
@@ -59,7 +59,7 @@ WebViewGraphicsBased::WebViewGraphicsBased(QWidget* parent)
 void WebViewGraphicsBased::setPage(QWebPage* page)
 {
     connect(page->mainFrame(), SIGNAL(contentsSizeChanged(const QSize&)), SLOT(contentsSizeChanged(const QSize&)));
-    m_item->setPage(page);
+    graphicsWebView()->setPage(page);
 }
 
 void WebViewGraphicsBased::contentsSizeChanged(const QSize& size)
@@ -74,7 +74,7 @@ void WebViewGraphicsBased::setResizesToContents(bool b)
         return;
 
     m_resizesToContents = b;
-    m_item->setResizesToContents(m_resizesToContents);
+    graphicsWebView()->setResizesToContents(m_resizesToContents);
 
     // When setting resizesToContents ON, our web view widget will always size as big as the
     // web content being displayed, and so will the QWebPage's viewport. It implies that internally
@@ -94,16 +94,16 @@ void WebViewGraphicsBased::setResizesToContents(bool b)
     if (m_resizesToContents) {
         setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
         setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
-        m_item->page()->setPreferredContentsSize(size());
-        QRectF itemRect(m_item->geometry().topLeft(), m_item->page()->mainFrame()->contentsSize());
-        m_item->setGeometry(itemRect);
+        graphicsWebView()->page()->setPreferredContentsSize(size());
+        QRectF itemRect(graphicsWebView()->geometry().topLeft(), graphicsWebView()->page()->mainFrame()->contentsSize());
+        graphicsWebView()->setGeometry(itemRect);
         scene()->setSceneRect(itemRect);
     } else {
         setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
         setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-        m_item->page()->setPreferredContentsSize(QSize());
+        graphicsWebView()->page()->setPreferredContentsSize(QSize());
         QRect viewportRect(QPoint(0, 0), size());
-        m_item->setGeometry(viewportRect);
+        graphicsWebView()->setGeometry(viewportRect);
         scene()->setSceneRect(viewportRect);
     }
 }
@@ -115,12 +115,12 @@ void WebViewGraphicsBased::resizeEvent(QResizeEvent* event)
     QSize size(event->size());
 
     if (m_resizesToContents) {
-        m_item->page()->setPreferredContentsSize(size);
+        graphicsWebView()->page()->setPreferredContentsSize(size);
         return;
     }
 
     QRectF rect(QPoint(0, 0), size);
-    m_item->setGeometry(rect);
+    graphicsWebView()->setGeometry(rect);
     scene()->setSceneRect(rect);
 }
 
@@ -152,14 +152,14 @@ void WebViewGraphicsBased::updateFrameRate()
 void WebViewGraphicsBased::animatedFlip()
 {
 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
-    QSizeF center = m_item->boundingRect().size() / 2;
+    QSizeF center = graphicsWebView()->boundingRect().size() / 2;
     QPointF centerPoint = QPointF(center.width(), center.height());
-    m_item->setTransformOriginPoint(centerPoint);
+    graphicsWebView()->setTransformOriginPoint(centerPoint);
 
-    QPropertyAnimation* animation = new QPropertyAnimation(m_item, "rotation", this);
+    QPropertyAnimation* animation = new QPropertyAnimation(graphicsWebView(), "rotation", this);
     animation->setDuration(1000);
 
-    int rotation = int(m_item->rotation());
+    int rotation = int(graphicsWebView()->rotation());
 
     animation->setStartValue(rotation);
     animation->setEndValue(rotation + 180 - (rotation % 180));
diff --git a/WebKitTools/QtTestBrowser/webview.h b/WebKitTools/QtTestBrowser/webview.h
index af67d19..aadf85c 100644
--- a/WebKitTools/QtTestBrowser/webview.h
+++ b/WebKitTools/QtTestBrowser/webview.h
@@ -75,8 +75,8 @@ public:
     WebViewGraphicsBased(QWidget* parent);
     void setPage(QWebPage* page);
 
-    void setItemCacheMode(QGraphicsItem::CacheMode mode) { m_item->setCacheMode(mode); }
-    QGraphicsItem::CacheMode itemCacheMode() { return m_item->cacheMode(); }
+    void setItemCacheMode(QGraphicsItem::CacheMode mode) { graphicsWebView()->setCacheMode(mode); }
+    QGraphicsItem::CacheMode itemCacheMode() { return graphicsWebView()->cacheMode(); }
 
     void setFrameRateMeasurementEnabled(bool enabled);
     bool frameRateMeasurementEnabled() const { return m_measureFps; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list