Title: [93049] trunk/Source/WebKit2
Revision
93049
Author
[email protected]
Date
2011-08-15 12:07:01 -0700 (Mon, 15 Aug 2011)

Log Message

[Qt][WK2] Get rid of QTouchWebPagePrivate::getPageViewPrivate()
https://bugs.webkit.org/show_bug.cgi?id=66222

Patch by Benjamin Poulain <[email protected]> on 2011-08-15
Reviewed by Kenneth Rohde Christiansen.

The function QTouchWebPagePrivate::getPageViewPrivate() exposed
the private QTouchWebPage to any object in WebKit.

Instead, use the friend keyword to list which objects can access
the internal of QTouchWebPage.

* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::QTouchWebViewPrivate):
(QTouchWebViewPrivate::viewportRectUpdated):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (93048 => 93049)


--- trunk/Source/WebKit2/ChangeLog	2011-08-15 18:51:42 UTC (rev 93048)
+++ trunk/Source/WebKit2/ChangeLog	2011-08-15 19:07:01 UTC (rev 93049)
@@ -1,3 +1,22 @@
+2011-08-15  Benjamin Poulain  <[email protected]>
+
+        [Qt][WK2] Get rid of QTouchWebPagePrivate::getPageViewPrivate()
+        https://bugs.webkit.org/show_bug.cgi?id=66222
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        The function QTouchWebPagePrivate::getPageViewPrivate() exposed
+        the private QTouchWebPage to any object in WebKit.
+
+        Instead, use the friend keyword to list which objects can access
+        the internal of QTouchWebPage.
+
+        * UIProcess/API/qt/qtouchwebpage.h:
+        * UIProcess/API/qt/qtouchwebpage_p.h:
+        * UIProcess/API/qt/qtouchwebview.cpp:
+        (QTouchWebViewPrivate::QTouchWebViewPrivate):
+        (QTouchWebViewPrivate::viewportRectUpdated):
+
 2011-08-15  Balazs Kelemen  <[email protected]>
 
         Unreviewed.

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h (93048 => 93049)


--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h	2011-08-15 18:51:42 UTC (rev 93048)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h	2011-08-15 19:07:01 UTC (rev 93049)
@@ -79,9 +79,8 @@
 
 private:
     QTouchWebPagePrivate* d;
-    friend class QTouchWebPagePrivate;
+    friend class QTouchWebViewPrivate;
     friend class WebKit::TouchViewInterface;
-    friend class TiledDrawingAreaProxy;
 };
 
 #endif /* qtouchwebpage_h */

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h (93048 => 93049)


--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h	2011-08-15 18:51:42 UTC (rev 93048)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h	2011-08-15 19:07:01 UTC (rev 93049)
@@ -36,8 +36,6 @@
 public:
     QTouchWebPagePrivate(QTouchWebPage* view);
 
-    static QTouchWebPagePrivate* getPageViewPrivate(QTouchWebPage* view) { return view->d; }
-
     void setPage(QTouchWebPageProxy*);
 
     void setViewportRect(const QRectF&);

Modified: trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebview.cpp (93048 => 93049)


--- trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebview.cpp	2011-08-15 18:51:42 UTC (rev 93048)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qtouchwebview.cpp	2011-08-15 19:07:01 UTC (rev 93049)
@@ -35,7 +35,7 @@
     , viewInterface(q, pageView.data())
     , page(&viewInterface, defaultWKContext())
 {
-    QTouchWebPagePrivate* const pageViewPrivate = QTouchWebPagePrivate::getPageViewPrivate(pageView.data());
+    QTouchWebPagePrivate* const pageViewPrivate = pageView.data()->d;
     pageViewPrivate->setPage(&page);
 }
 
@@ -48,7 +48,7 @@
 
 void QTouchWebViewPrivate::viewportRectUpdated()
 {
-    QTouchWebPagePrivate* const pageViewPrivate = QTouchWebPagePrivate::getPageViewPrivate(pageView.data());
+    QTouchWebPagePrivate* const pageViewPrivate = pageView.data()->d;
     const QRectF viewportRectInPageViewCoordinate = q->mapRectToItem(pageView.data(), q->boundingRect());
     pageViewPrivate->setViewportRect(viewportRectInPageViewCoordinate);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to