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

aroben at apple.com aroben at apple.com
Wed Dec 22 13:44:19 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bcf2432ec548fd019f9b42496184e1acff810cb9
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 24 17:23:03 2010 +0000

    Expose a whole DrawingAreaInfo instead of its constituent parts from DrawingAreaBase
    
    This is just a step toward cleaning up how drawing areas are
    encoded/ecoded.
    
    Fixes <http://webkit.org/b/46468> DrawingAreaInfo should be used in
    more places
    
    Reviewed by Anders Carlsson.
    
    * Shared/DrawingAreaBase.cpp:
    (WebKit::DrawingAreaBase::encode): Changed to use info().
    
    * Shared/DrawingAreaBase.h:
    (WebKit::DrawingAreaBase::info): Added. Replaces type() and id().
    (WebKit::DrawingAreaBase::DrawingAreaBase): Changed to store a
    DrawingAreaInfo instead of storing its constituent parts.
    
    * UIProcess/API/mac/WKView.mm:
    * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
    * UIProcess/LayerBackedDrawingAreaProxy.cpp:
    * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
    * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
    * WebProcess/WebPage/WebPage.cpp:
    Updated to use info().
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68269 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index c44639d..0c37a64 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,32 @@
+2010-09-24  Adam Roben  <aroben at apple.com>
+
+        Expose a whole DrawingAreaInfo instead of its constituent parts from
+        DrawingAreaBase
+
+        This is just a step toward cleaning up how drawing areas are
+        encoded/ecoded.
+
+        Fixes <http://webkit.org/b/46468> DrawingAreaInfo should be used in
+        more places
+
+        Reviewed by Anders Carlsson.
+
+        * Shared/DrawingAreaBase.cpp:
+        (WebKit::DrawingAreaBase::encode): Changed to use info().
+
+        * Shared/DrawingAreaBase.h:
+        (WebKit::DrawingAreaBase::info): Added. Replaces type() and id().
+        (WebKit::DrawingAreaBase::DrawingAreaBase): Changed to store a
+        DrawingAreaInfo instead of storing its constituent parts.
+
+        * UIProcess/API/mac/WKView.mm:
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
+        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
+        * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+        * WebProcess/WebPage/WebPage.cpp:
+        Updated to use info().
+
 2010-09-24  Anders Carlsson  <andersca at apple.com>
 
         Reviewed by Sam Weinig.
diff --git a/WebKit2/Shared/DrawingAreaBase.cpp b/WebKit2/Shared/DrawingAreaBase.cpp
index dfb02c2..e0c3ccc 100644
--- a/WebKit2/Shared/DrawingAreaBase.cpp
+++ b/WebKit2/Shared/DrawingAreaBase.cpp
@@ -29,8 +29,7 @@ namespace WebKit {
 
 void DrawingAreaBase::encode(CoreIPC::ArgumentEncoder* encoder) const
 {
-    DrawingAreaInfo info(type(), id());
-    encoder->encode(info);
+    encoder->encode(info());
 }
 
 bool DrawingAreaBase::decode(CoreIPC::ArgumentDecoder* decoder, DrawingAreaInfo& info)
diff --git a/WebKit2/Shared/DrawingAreaBase.h b/WebKit2/Shared/DrawingAreaBase.h
index 91ed7da..0a23502 100644
--- a/WebKit2/Shared/DrawingAreaBase.h
+++ b/WebKit2/Shared/DrawingAreaBase.h
@@ -48,11 +48,6 @@ public:
     
     typedef uint64_t DrawingAreaID;
     
-    virtual ~DrawingAreaBase() { }
-    
-    Type type() const { return m_type; }
-    DrawingAreaID id() const { return m_id; }
-
     struct DrawingAreaInfo {
         Type type;
         DrawingAreaID id;
@@ -64,19 +59,21 @@ public:
         }
     };
     
+    virtual ~DrawingAreaBase() { }
+    
+    const DrawingAreaInfo& info() const { return m_info; }
+    
     // The DrawingAreaProxy should never be decoded itself. Instead, the DrawingArea should be decoded.
     void encode(CoreIPC::ArgumentEncoder* encoder) const;
     static bool decode(CoreIPC::ArgumentDecoder*, DrawingAreaInfo&);
 
 protected:
     DrawingAreaBase(Type type, DrawingAreaID identifier)
-        : m_type(type)
-        , m_id(identifier)
+        : m_info(type, identifier)
     {
     }
 
-    Type m_type;
-    DrawingAreaID m_id;
+    DrawingAreaInfo m_info;
 };
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 8b62e8f..c275696 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -592,7 +592,7 @@ static bool isViewVisible(NSView *view)
 
 - (void)_switchToDrawingAreaTypeIfNecessary:(DrawingAreaProxy::Type)type
 {
-    DrawingAreaProxy::Type existingDrawingAreaType = _data->_page->drawingArea() ? _data->_page->drawingArea()->type() : DrawingAreaProxy::None;
+    DrawingAreaProxy::Type existingDrawingAreaType = _data->_page->drawingArea() ? _data->_page->drawingArea()->info().type : DrawingAreaProxy::None;
     if (existingDrawingAreaType == type)
         return;
 
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
index ead9bd1..d56c9cb 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
@@ -90,7 +90,7 @@ void ChunkedUpdateDrawingAreaProxy::setSize(const IntSize& viewSize)
     m_isWaitingForDidSetFrameNotification = true;
 
     page->process()->responsivenessTimer()->start();
-    page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(id(), viewSize));
+    page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().id, viewSize));
 }
 
 void ChunkedUpdateDrawingAreaProxy::setPageIsVisible(bool isVisible)
@@ -106,12 +106,12 @@ void ChunkedUpdateDrawingAreaProxy::setPageIsVisible(bool isVisible)
 
     if (!m_isVisible) {
         // Tell the web process that it doesn't need to paint anything for now.
-        page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(id()));
+        page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().id));
         return;
     }
     
     // The page is now visible, resume painting.
-    page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(id(), m_forceRepaintWhenResumingPainting));
+    page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().id, m_forceRepaintWhenResumingPainting));
     m_forceRepaintWhenResumingPainting = false;
 }
     
@@ -146,7 +146,7 @@ void ChunkedUpdateDrawingAreaProxy::update(UpdateChunk* updateChunk)
     }
 
     WebPageProxy* page = this->page();
-    page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(id()));
+    page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().id));
 }
 
 void ChunkedUpdateDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index 05c806c..4e162b3 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -77,7 +77,7 @@ void LayerBackedDrawingAreaProxy::setSize(const IntSize& viewSize)
     m_isWaitingForDidSetFrameNotification = true;
 
     page->process()->responsivenessTimer()->start();
-    page->process()->connection()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(id(), viewSize));
+    page->process()->connection()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().id, viewSize));
 }
 
 #if !PLATFORM(MAC)
@@ -99,12 +99,12 @@ void LayerBackedDrawingAreaProxy::setPageIsVisible(bool isVisible)
 
     if (!m_isVisible) {
         // Tell the web process that it doesn't need to paint anything for now.
-        page->process()->connection()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(id()));
+        page->process()->connection()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().id));
         return;
     }
     
     // The page is now visible.
-    page->process()->connection()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(id()));
+    page->process()->connection()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().id));
     
     // FIXME: We should request a full repaint here if needed.
 }
@@ -120,7 +120,7 @@ void LayerBackedDrawingAreaProxy::didSetSize()
 void LayerBackedDrawingAreaProxy::update()
 {
     WebPageProxy* page = this->page();
-    page->process()->connection()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(id()));
+    page->process()->connection()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().id));
 }
 
 void LayerBackedDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
diff --git a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
index 1a16096..7e4dcdf 100644
--- a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
@@ -187,7 +187,7 @@ void ChunkedUpdateDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::
         return;
 
     // We can switch drawing areas on the fly, so if this message was targetted at an obsolete drawing area, ignore it.
-    if (targetDrawingAreaID != id())
+    if (targetDrawingAreaID != info().id)
         return;
 
     switch (messageID.get<DrawingAreaMessage::Kind>()) {
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
index 933b2ca..96a1615 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
@@ -150,7 +150,7 @@ void LayerBackedDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::Me
         return;
 
     // We can switch drawing areas on the fly, so if this message was targetted at an obsolete drawing area, ignore it.
-    if (targetDrawingAreaID != id())
+    if (targetDrawingAreaID != info().id)
         return;
 
     switch (messageID.get<DrawingAreaMessage::Kind>()) {
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 15820e7..531bb3e 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -240,7 +240,7 @@ void WebPage::changeAcceleratedCompositingMode(WebCore::GraphicsLayer* layer)
                                                 CoreIPC::Out(newDrawingAreaInfo),
                                                 CoreIPC::Connection::NoTimeout);
     
-    if (newDrawingAreaInfo.type != drawingArea()->type()) {
+    if (newDrawingAreaInfo.type != drawingArea()->info().type) {
         m_drawingArea = DrawingArea::create(newDrawingAreaInfo.type, newDrawingAreaInfo.id, this);
         m_drawingArea->setNeedsDisplay(IntRect(IntPoint(0, 0), m_viewSize));
     }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list