Changeset 74284 in webkit


Ignore:
Timestamp:
Dec 17, 2010 1:06:48 PM (13 years ago)
Author:
andersca@apple.com
Message:

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):

Location:
trunk/WebKit2
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r74283 r74284  
     12010-12-17  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Add a WebPageProxy parameter to the DrawingAreaProxy constructor
     6        https://bugs.webkit.org/show_bug.cgi?id=51271
     7
     8        * UIProcess/API/mac/WKView.mm:
     9        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
     10        (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
     11        * UIProcess/API/qt/qgraphicswkview.cpp:
     12        (QGraphicsWKView::QGraphicsWKView):
     13        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
     14        (WebKit::ChunkedUpdateDrawingAreaProxy::create):
     15        (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
     16        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
     17        * UIProcess/DrawingAreaProxy.cpp:
     18        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
     19        * UIProcess/DrawingAreaProxy.h:
     20        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
     21        (WebKit::LayerBackedDrawingAreaProxy::create):
     22        (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
     23        * UIProcess/LayerBackedDrawingAreaProxy.h:
     24        * UIProcess/TiledDrawingAreaProxy.cpp:
     25        (WebKit::TiledDrawingAreaProxy::create):
     26        (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
     27        * UIProcess/TiledDrawingAreaProxy.h:
     28        * UIProcess/win/WebView.cpp:
     29        (WebKit::WebView::WebView):
     30        (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
     31
    1322010-12-17  Dan Bernstein  <mitz@apple.com>
    233
  • trunk/WebKit2/UIProcess/API/mac/WKView.mm

    r74206 r74284  
    153153    _data->_page = toImpl(contextRef)->createWebPage(toImpl(pageGroupRef));
    154154    _data->_page->setPageClient(_data->_pageClient.get());
    155     _data->_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(self));
     155    _data->_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(self, _data->_page.get()));
    156156    _data->_page->initializeWebPage(IntSize(frame.size));
    157157    _data->_page->setIsInWindow([self window]);
     
    11101110            break;
    11111111        case DrawingAreaInfo::ChunkedUpdate: {
    1112             newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(self);
     1112            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(self, _data->_page.get());
    11131113            break;
    11141114        }
    11151115        case DrawingAreaInfo::LayerBacked: {
    1116             newDrawingArea = LayerBackedDrawingAreaProxy::create(self);
     1116            newDrawingArea = LayerBackedDrawingAreaProxy::create(self, _data->_page.get());
    11171117            break;
    11181118        }
  • trunk/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp

    r74268 r74284  
    6666    PassOwnPtr<DrawingAreaProxy> drawingAreaProxy;
    6767
     68    d->page = new QWKPage(context);
     69
    6870    switch (backingStoreType) {
    6971#if ENABLE(TILED_BACKING_STORE)
    7072    case Tiled:
    71         drawingAreaProxy = TiledDrawingAreaProxy::create(this);
     73        drawingAreaProxy = TiledDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
    7274        connect(this, SIGNAL(scaleChanged()), this, SLOT(onScaleChanged()));
    7375        break;
     
    7577    case Simple:
    7678    default:
    77         drawingAreaProxy = ChunkedUpdateDrawingAreaProxy::create(this);
     79        drawingAreaProxy = ChunkedUpdateDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
    7880        break;
    7981    }
    8082
    81     d->page = new QWKPage(context);
    8283    d->page->d->init(size().toSize(), drawingAreaProxy);
    8384    connect(d->page, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString)));
  • trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp

    r73036 r74284  
    3838namespace WebKit {
    3939
    40 PassOwnPtr<ChunkedUpdateDrawingAreaProxy> ChunkedUpdateDrawingAreaProxy::create(PlatformWebView* webView)
     40PassOwnPtr<ChunkedUpdateDrawingAreaProxy> ChunkedUpdateDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
    4141{
    42     return adoptPtr(new ChunkedUpdateDrawingAreaProxy(webView));
     42    return adoptPtr(new ChunkedUpdateDrawingAreaProxy(webView, webPageProxy));
    4343}
    4444
    45 ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy(PlatformWebView* webView)
    46     : DrawingAreaProxy(DrawingAreaInfo::ChunkedUpdate)
     45ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
     46    : DrawingAreaProxy(DrawingAreaInfo::ChunkedUpdate, webPageProxy)
    4747    , m_isWaitingForDidSetFrameNotification(false)
    4848    , m_isVisible(true)
  • trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h

    r71780 r74284  
    5858class ChunkedUpdateDrawingAreaProxy : public DrawingAreaProxy {
    5959public:
    60     static PassOwnPtr<ChunkedUpdateDrawingAreaProxy> create(PlatformWebView*);
     60    static PassOwnPtr<ChunkedUpdateDrawingAreaProxy> create(PlatformWebView*, WebPageProxy*);
    6161
    6262    virtual ~ChunkedUpdateDrawingAreaProxy();
    6363
    6464private:
    65     ChunkedUpdateDrawingAreaProxy(PlatformWebView*);
     65    ChunkedUpdateDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
    6666
    6767    WebPageProxy* page();
  • trunk/WebKit2/UIProcess/DrawingAreaProxy.cpp

    r73036 r74284  
    2828namespace WebKit {
    2929
    30 DrawingAreaProxy::DrawingAreaProxy(DrawingAreaInfo::Type type)
     30DrawingAreaProxy::DrawingAreaProxy(DrawingAreaInfo::Type type, WebPageProxy* webPageProxy)
    3131    : m_info(type, nextIdentifier())
     32    , m_webPageProxy(webPageProxy)
    3233{
    3334}
  • trunk/WebKit2/UIProcess/DrawingAreaProxy.h

    r73036 r74284  
    3636namespace WebKit {
    3737
     38class WebPageProxy;
     39
    3840#if PLATFORM(MAC)
    3941typedef CGContextRef PlatformDrawingContext;
     
    6769
    6870protected:
    69     explicit DrawingAreaProxy(DrawingAreaInfo::Type);
     71    explicit DrawingAreaProxy(DrawingAreaInfo::Type, WebPageProxy*);
    7072
    7173    DrawingAreaInfo m_info;
     74    WebPageProxy* m_webPageProxy;
     75
    7276    WebCore::IntSize m_size;
    7377};
  • trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp

    r73073 r74284  
    3939namespace WebKit {
    4040
    41 PassOwnPtr<LayerBackedDrawingAreaProxy> LayerBackedDrawingAreaProxy::create(PlatformWebView* webView)
     41PassOwnPtr<LayerBackedDrawingAreaProxy> LayerBackedDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
    4242{
    43     return adoptPtr(new LayerBackedDrawingAreaProxy(webView));
     43    return adoptPtr(new LayerBackedDrawingAreaProxy(webView, webPageProxy));
    4444}
    4545
    46 LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy(PlatformWebView* webView)
    47     : DrawingAreaProxy(DrawingAreaInfo::LayerBacked)
     46LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
     47    : DrawingAreaProxy(DrawingAreaInfo::LayerBacked, webPageProxy)
    4848    , m_isWaitingForDidSetFrameNotification(false)
    4949    , m_isVisible(true)
  • trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h

    r73073 r74284  
    5656class LayerBackedDrawingAreaProxy : public DrawingAreaProxy {
    5757public:
    58     static PassOwnPtr<LayerBackedDrawingAreaProxy> create(PlatformWebView*);
     58    static PassOwnPtr<LayerBackedDrawingAreaProxy> create(PlatformWebView*, WebPageProxy*);
    5959    virtual ~LayerBackedDrawingAreaProxy();
    6060
    6161private:
    62     LayerBackedDrawingAreaProxy(PlatformWebView*);
     62    LayerBackedDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
    6363
    6464    WebPageProxy* page();
  • trunk/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp

    r73221 r74284  
    4242static const int defaultTileHeight = 1024;
    4343
    44 PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView)
    45 {
    46     return adoptPtr(new TiledDrawingAreaProxy(webView));
    47 }
    48 
    49 TiledDrawingAreaProxy::TiledDrawingAreaProxy(PlatformWebView* webView)
    50     : DrawingAreaProxy(DrawingAreaInfo::Tiled)
     44PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView* webView, WebPageProxy* webPageProxy)
     45{
     46    return adoptPtr(new TiledDrawingAreaProxy(webView, webPageProxy));
     47}
     48
     49TiledDrawingAreaProxy::TiledDrawingAreaProxy(PlatformWebView* webView, WebPageProxy* webPageProxy)
     50    : DrawingAreaProxy(DrawingAreaInfo::Tiled, webPageProxy)
    5151    , m_isWaitingForDidSetFrameNotification(false)
    5252    , m_isVisible(true)
  • trunk/WebKit2/UIProcess/TiledDrawingAreaProxy.h

    r72016 r74284  
    6666class TiledDrawingAreaProxy : public DrawingAreaProxy {
    6767public:
    68     static PassOwnPtr<TiledDrawingAreaProxy> create(PlatformWebView* webView);
     68    static PassOwnPtr<TiledDrawingAreaProxy> create(PlatformWebView* webView, WebPageProxy*);
    6969
    70     TiledDrawingAreaProxy(PlatformWebView*);
     70    TiledDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
    7171    virtual ~TiledDrawingAreaProxy();
    7272
  • trunk/WebKit2/UIProcess/win/WebView.cpp

    r74164 r74284  
    236236    m_page = context->createWebPage(pageGroup);
    237237    m_page->setPageClient(this);
    238     m_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(this));
     238    m_page->setDrawingArea(ChunkedUpdateDrawingAreaProxy::create(this, m_page.get()));
    239239
    240240    m_window = ::CreateWindowEx(0, kWebKit2WebViewWindowClassName, 0, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
     
    978978            break;
    979979        case DrawingAreaInfo::ChunkedUpdate:
    980             newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this);
     980            newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this, m_page.get());
    981981            break;
    982982        case DrawingAreaInfo::LayerBacked:
    983             newDrawingArea = LayerBackedDrawingAreaProxy::create(this);
     983            newDrawingArea = LayerBackedDrawingAreaProxy::create(this, m_page.get());
    984984            break;
    985985    }
Note: See TracChangeset for help on using the changeset viewer.