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

andersca at apple.com andersca at apple.com
Wed Dec 22 18:46:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2914d3da378824ef4d8a2beb7034fb7118d7c464
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 17 21:06:48 2010 +0000

    Add a WebPageProxy parameter to the DrawingAreaProxy constructor
    https://bugs.webkit.org/show_bug.cgi?id=51271
    
    Reviewed by Sam Weinig.
    
    * UIProcess/API/mac/WKView.mm:
    (-[WKView initWithFrame:contextRef:pageGroupRef:]):
    (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
    * UIProcess/API/qt/qgraphicswkview.cpp:
    (QGraphicsWKView::QGraphicsWKView):
    * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
    (WebKit::ChunkedUpdateDrawingAreaProxy::create):
    (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
    * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
    * UIProcess/DrawingAreaProxy.cpp:
    (WebKit::DrawingAreaProxy::DrawingAreaProxy):
    * UIProcess/DrawingAreaProxy.h:
    * UIProcess/LayerBackedDrawingAreaProxy.cpp:
    (WebKit::LayerBackedDrawingAreaProxy::create):
    (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
    * UIProcess/LayerBackedDrawingAreaProxy.h:
    * UIProcess/TiledDrawingAreaProxy.cpp:
    (WebKit::TiledDrawingAreaProxy::create):
    (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
    * UIProcess/TiledDrawingAreaProxy.h:
    * UIProcess/win/WebView.cpp:
    (WebKit::WebView::WebView):
    (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74284 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 90b10ab..5a0d23b 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,34 @@
+2010-12-17  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Add a WebPageProxy parameter to the DrawingAreaProxy constructor
+        https://bugs.webkit.org/show_bug.cgi?id=51271
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
+        (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
+        * UIProcess/API/qt/qgraphicswkview.cpp:
+        (QGraphicsWKView::QGraphicsWKView):
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::create):
+        (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+        * UIProcess/DrawingAreaProxy.h:
+        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+        (WebKit::LayerBackedDrawingAreaProxy::create):
+        (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
+        * UIProcess/LayerBackedDrawingAreaProxy.h:
+        * UIProcess/TiledDrawingAreaProxy.cpp:
+        (WebKit::TiledDrawingAreaProxy::create):
+        (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
+        * UIProcess/TiledDrawingAreaProxy.h:
+        * UIProcess/win/WebView.cpp:
+        (WebKit::WebView::WebView):
+        (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
+
 2010-12-17  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 350b116..56026fa 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -152,7 +152,7 @@ using namespace WebCore;
     _data->_pageClient = PageClientImpl::create(self);
     _data->_page = toImpl(contextRef)->createWebPage(toImpl(pageGroupRef));
     _data->_page->setPageClient(_data->_pageClient.get());
-    _data->_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(self));
+    _data->_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(self, _data->_page.get()));
     _data->_page->initializeWebPage(IntSize(frame.size));
     _data->_page->setIsInWindow([self window]);
 
@@ -1109,11 +1109,11 @@ static bool isViewVisible(NSView *view)
         case DrawingAreaInfo::None:
             break;
         case DrawingAreaInfo::ChunkedUpdate: {
-            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(self);
+            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(self, _data->_page.get());
             break;
         }
         case DrawingAreaInfo::LayerBacked: {
-            newDrawingArea = LayerBackedDrawingAreaProxy::create(self);
+            newDrawingArea = LayerBackedDrawingAreaProxy::create(self, _data->_page.get());
             break;
         }
     }
diff --git a/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp b/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
index ff73440..e98d8db 100644
--- a/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
+++ b/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
@@ -65,20 +65,21 @@ QGraphicsWKView::QGraphicsWKView(QWKContext* context, BackingStoreType backingSt
 
     PassOwnPtr<DrawingAreaProxy> drawingAreaProxy;
 
+    d->page = new QWKPage(context);
+
     switch (backingStoreType) {
 #if ENABLE(TILED_BACKING_STORE)
     case Tiled:
-        drawingAreaProxy = TiledDrawingAreaProxy::create(this);
+        drawingAreaProxy = TiledDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
         connect(this, SIGNAL(scaleChanged()), this, SLOT(onScaleChanged()));
         break;
 #endif
     case Simple:
     default:
-        drawingAreaProxy = ChunkedUpdateDrawingAreaProxy::create(this);
+        drawingAreaProxy = ChunkedUpdateDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
         break;
     }
 
-    d->page = new QWKPage(context);
     d->page->d->init(size().toSize(), drawingAreaProxy);
     connect(d->page, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString)));
     connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted()));
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
index 800ffef..dc0a9ce 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
@@ -37,13 +37,13 @@ using namespace WebCore;
 
 namespace WebKit {
 
-PassOwnPtr<ChunkedUpdateDrawingAreaProxy> ChunkedUpdateDrawingAreaProxy::create(PlatformWebView* webView)
+PassOwnPtr<ChunkedUpdateDrawingAreaProxy> ChunkedUpdateDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
 {
-    return adoptPtr(new ChunkedUpdateDrawingAreaProxy(webView));
+    return adoptPtr(new ChunkedUpdateDrawingAreaProxy(webView, webPageProxy));
 }
 
-ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy(PlatformWebView* webView)
-    : DrawingAreaProxy(DrawingAreaInfo::ChunkedUpdate)
+ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
+    : DrawingAreaProxy(DrawingAreaInfo::ChunkedUpdate, webPageProxy)
     , m_isWaitingForDidSetFrameNotification(false)
     , m_isVisible(true)
     , m_forceRepaintWhenResumingPainting(false)
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
index 47b5357..589d3c1 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
@@ -57,12 +57,12 @@ typedef QGraphicsWKView PlatformWebView;
 
 class ChunkedUpdateDrawingAreaProxy : public DrawingAreaProxy {
 public:
-    static PassOwnPtr<ChunkedUpdateDrawingAreaProxy> create(PlatformWebView*);
+    static PassOwnPtr<ChunkedUpdateDrawingAreaProxy> create(PlatformWebView*, WebPageProxy*);
 
     virtual ~ChunkedUpdateDrawingAreaProxy();
 
 private:
-    ChunkedUpdateDrawingAreaProxy(PlatformWebView*);
+    ChunkedUpdateDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
 
     WebPageProxy* page();
 
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.cpp b/WebKit2/UIProcess/DrawingAreaProxy.cpp
index 0dd066c..15ae3fd 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/DrawingAreaProxy.cpp
@@ -27,8 +27,9 @@
 
 namespace WebKit {
 
-DrawingAreaProxy::DrawingAreaProxy(DrawingAreaInfo::Type type)
+DrawingAreaProxy::DrawingAreaProxy(DrawingAreaInfo::Type type, WebPageProxy* webPageProxy)
     : m_info(type, nextIdentifier())
+    , m_webPageProxy(webPageProxy)
 {
 }
 
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.h b/WebKit2/UIProcess/DrawingAreaProxy.h
index f38efc6..1093b5b 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.h
+++ b/WebKit2/UIProcess/DrawingAreaProxy.h
@@ -35,6 +35,8 @@ class QPainter;
 
 namespace WebKit {
 
+class WebPageProxy;
+
 #if PLATFORM(MAC)
 typedef CGContextRef PlatformDrawingContext;
 #elif PLATFORM(WIN)
@@ -66,9 +68,11 @@ public:
     const DrawingAreaInfo& info() const { return m_info; }
 
 protected:
-    explicit DrawingAreaProxy(DrawingAreaInfo::Type);
+    explicit DrawingAreaProxy(DrawingAreaInfo::Type, WebPageProxy*);
 
     DrawingAreaInfo m_info;
+    WebPageProxy* m_webPageProxy;
+
     WebCore::IntSize m_size;
 };
 
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index 00954df..46e1207 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -38,13 +38,13 @@ using namespace WebCore;
 
 namespace WebKit {
 
-PassOwnPtr<LayerBackedDrawingAreaProxy> LayerBackedDrawingAreaProxy::create(PlatformWebView* webView)
+PassOwnPtr<LayerBackedDrawingAreaProxy> LayerBackedDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
 {
-    return adoptPtr(new LayerBackedDrawingAreaProxy(webView));
+    return adoptPtr(new LayerBackedDrawingAreaProxy(webView, webPageProxy));
 }
 
-LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy(PlatformWebView* webView)
-    : DrawingAreaProxy(DrawingAreaInfo::LayerBacked)
+LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
+    : DrawingAreaProxy(DrawingAreaInfo::LayerBacked, webPageProxy)
     , m_isWaitingForDidSetFrameNotification(false)
     , m_isVisible(true)
     , m_webView(webView)
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
index f7499d6..e93db87 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
@@ -55,11 +55,11 @@ typedef WebView PlatformWebView;
 
 class LayerBackedDrawingAreaProxy : public DrawingAreaProxy {
 public:
-    static PassOwnPtr<LayerBackedDrawingAreaProxy> create(PlatformWebView*);
+    static PassOwnPtr<LayerBackedDrawingAreaProxy> create(PlatformWebView*, WebPageProxy*);
     virtual ~LayerBackedDrawingAreaProxy();
 
 private:
-    LayerBackedDrawingAreaProxy(PlatformWebView*);
+    LayerBackedDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
 
     WebPageProxy* page();
 
diff --git a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
index a5d2de4..7c4a4a7 100644
--- a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
@@ -41,13 +41,13 @@ namespace WebKit {
 static const int defaultTileWidth = 1024;
 static const int defaultTileHeight = 1024;
 
-PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView)
+PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
 {
-    return adoptPtr(new TiledDrawingAreaProxy(webView));
+    return adoptPtr(new TiledDrawingAreaProxy(webView, webPageProxy));
 }
 
-TiledDrawingAreaProxy::TiledDrawingAreaProxy(PlatformWebView* webView)
-    : DrawingAreaProxy(DrawingAreaInfo::Tiled)
+TiledDrawingAreaProxy::TiledDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
+    : DrawingAreaProxy(DrawingAreaInfo::Tiled, webPageProxy)
     , m_isWaitingForDidSetFrameNotification(false)
     , m_isVisible(true)
     , m_webView(webView)
diff --git a/WebKit2/UIProcess/TiledDrawingAreaProxy.h b/WebKit2/UIProcess/TiledDrawingAreaProxy.h
index 3b9a558..8ff6312 100644
--- a/WebKit2/UIProcess/TiledDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/TiledDrawingAreaProxy.h
@@ -65,9 +65,9 @@ typedef QGraphicsWKView PlatformWebView;
 
 class TiledDrawingAreaProxy : public DrawingAreaProxy {
 public:
-    static PassOwnPtr<TiledDrawingAreaProxy> create(PlatformWebView* webView);
+    static PassOwnPtr<TiledDrawingAreaProxy> create(PlatformWebView* webView, WebPageProxy*);
 
-    TiledDrawingAreaProxy(PlatformWebView*);
+    TiledDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
     virtual ~TiledDrawingAreaProxy();
 
     float contentsScale() const { return m_contentsScale; }
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index f73826f..5d99262 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -235,7 +235,7 @@ WebView::WebView(RECT rect, WebContext* context, WebPageGroup* pageGroup, HWND p
 
     m_page = context->createWebPage(pageGroup);
     m_page->setPageClient(this);
-    m_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(this));
+    m_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(this, m_page.get()));
 
     m_window = ::CreateWindowEx(0, kWebKit2WebViewWindowClassName, 0, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
         m_rect.top, m_rect.left, m_rect.right - m_rect.left, m_rect.bottom - m_rect.top, parentWindow ? parentWindow : HWND_MESSAGE, 0, instanceHandle(), this);
@@ -977,10 +977,10 @@ void WebView::switchToDrawingAreaTypeIfNecessary(DrawingAreaInfo::Type type)
         case DrawingAreaInfo::None:
             break;
         case DrawingAreaInfo::ChunkedUpdate:
-            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this);
+            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this, m_page.get());
             break;
         case DrawingAreaInfo::LayerBacked:
-            newDrawingArea = LayerBackedDrawingAreaProxy::create(this);
+            newDrawingArea = LayerBackedDrawingAreaProxy::create(this, m_page.get());
             break;
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list