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

simon.fraser at apple.com simon.fraser at apple.com
Wed Dec 22 11:41:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 527375ea8a5d2989b7698014f632df0c977be3e2
Author: simon.fraser at apple.com <simon.fraser at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 3 22:30:44 2010 +0000

    2010-08-03  Simon Fraser  <simon.fraser at apple.com>
    
            Reviewed by Anders Carlsson.
    
            Compositing iframe layout test crashes in WebKit2
            https://bugs.webkit.org/show_bug.cgi?id=42860
    
            Fix assertion caused by a DrawingArea handling a message that was targetted at an older DrawingArea
            that it has replaced.
    
            This was done by assigning a unique ID to each DrawingAreaProxy that gets created, and passing
            this ID, along with the type, to the WebProcess via an encoded DrawingAreaInfo. Each message
            also includes this ID. Messages with an ID that doesn't match that of the current DrawingArea are ignored.
    
            Refactored some common code and data into a DrawingAreaBase class which is shared, and adding
            encode/decode of DrawingAreaInfo.
    
            * Shared/DrawingAreaBase.cpp: Added.
            (WebKit::DrawingAreaBase::encode):
            (WebKit::DrawingAreaBase::decode):
            * Shared/DrawingAreaBase.h: Added.
            (WebKit::DrawingAreaBase::):
            (WebKit::DrawingAreaBase::~DrawingAreaBase):
            (WebKit::DrawingAreaBase::type):
            (WebKit::DrawingAreaBase::id):
            (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
            (WebKit::DrawingAreaBase::DrawingAreaBase):
            (CoreIPC::):
            * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
            (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
            (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
            (WebKit::ChunkedUpdateDrawingAreaProxy::update):
            * UIProcess/DrawingAreaProxy.cpp:
            (WebKit::DrawingAreaProxy::DrawingAreaProxy):
            (WebKit::DrawingAreaProxy::nextDrawingAreaID):
            * UIProcess/DrawingAreaProxy.h:
            * UIProcess/LayerBackedDrawingAreaProxy.cpp:
            (WebKit::LayerBackedDrawingAreaProxy::setSize):
            (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
            (WebKit::LayerBackedDrawingAreaProxy::update):
            * UIProcess/LayerBackedDrawingAreaProxy.h:
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::didReceiveSyncMessage):
            * WebKit2.xcodeproj/project.pbxproj:
            * WebProcess/WebCoreSupport/WebChromeClient.cpp:
            (WebKit::WebChromeClient::createWindow):
            * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
            (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
            (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
            * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
            * WebProcess/WebPage/DrawingArea.cpp:
            (WebKit::DrawingArea::create):
            (WebKit::DrawingArea::DrawingArea):
            * WebProcess/WebPage/DrawingArea.h:
            * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
            (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
            (WebKit::LayerBackedDrawingArea::didReceiveMessage):
            * WebProcess/WebPage/LayerBackedDrawingArea.h:
            * WebProcess/WebPage/WebPage.cpp:
            (WebKit::WebPage::create):
            (WebKit::WebPage::WebPage):
            (WebKit::WebPage::changeAcceleratedCompositingMode):
            * WebProcess/WebPage/WebPage.h:
            * WebProcess/WebProcess.cpp:
            (WebKit::WebProcess::createWebPage):
            (WebKit::WebProcess::didReceiveMessage):
            * WebProcess/WebProcess.h:
            * win/WebKit2.vcproj:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64594 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 7e348a9..34e3b98 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -20042,6 +20042,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
 			compatibilityVersion = "Xcode 2.4";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				English,
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 5639657..22abb6d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,72 @@
+2010-08-03  Simon Fraser  <simon.fraser at apple.com>
+
+        Reviewed by Anders Carlsson.
+
+        Compositing iframe layout test crashes in WebKit2
+        https://bugs.webkit.org/show_bug.cgi?id=42860
+        
+        Fix assertion caused by a DrawingArea handling a message that was targetted at an older DrawingArea
+        that it has replaced.
+        
+        This was done by assigning a unique ID to each DrawingAreaProxy that gets created, and passing
+        this ID, along with the type, to the WebProcess via an encoded DrawingAreaInfo. Each message
+        also includes this ID. Messages with an ID that doesn't match that of the current DrawingArea are ignored.
+        
+        Refactored some common code and data into a DrawingAreaBase class which is shared, and adding
+        encode/decode of DrawingAreaInfo.
+
+        * Shared/DrawingAreaBase.cpp: Added.
+        (WebKit::DrawingAreaBase::encode):
+        (WebKit::DrawingAreaBase::decode):
+        * Shared/DrawingAreaBase.h: Added.
+        (WebKit::DrawingAreaBase::):
+        (WebKit::DrawingAreaBase::~DrawingAreaBase):
+        (WebKit::DrawingAreaBase::type):
+        (WebKit::DrawingAreaBase::id):
+        (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
+        (WebKit::DrawingAreaBase::DrawingAreaBase):
+        (CoreIPC::):
+        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
+        (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
+        (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
+        (WebKit::ChunkedUpdateDrawingAreaProxy::update):
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+        (WebKit::DrawingAreaProxy::nextDrawingAreaID):
+        * UIProcess/DrawingAreaProxy.h:
+        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+        (WebKit::LayerBackedDrawingAreaProxy::setSize):
+        (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
+        (WebKit::LayerBackedDrawingAreaProxy::update):
+        * UIProcess/LayerBackedDrawingAreaProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveSyncMessage):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::createWindow):
+        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
+        (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
+        (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
+        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
+        * WebProcess/WebPage/DrawingArea.cpp:
+        (WebKit::DrawingArea::create):
+        (WebKit::DrawingArea::DrawingArea):
+        * WebProcess/WebPage/DrawingArea.h:
+        * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+        (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
+        (WebKit::LayerBackedDrawingArea::didReceiveMessage):
+        * WebProcess/WebPage/LayerBackedDrawingArea.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::create):
+        (WebKit::WebPage::WebPage):
+        (WebKit::WebPage::changeAcceleratedCompositingMode):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::createWebPage):
+        (WebKit::WebProcess::didReceiveMessage):
+        * WebProcess/WebProcess.h:
+        * win/WebKit2.vcproj:
+
 2010-08-03  Alex Milowski  <alex at milowski.com>
 
         Reviewed by Beth Dakin.
diff --git a/WebKit2/Shared/DrawingAreaBase.cpp b/WebKit2/Shared/DrawingAreaBase.cpp
new file mode 100644
index 0000000..0539fcf
--- /dev/null
+++ b/WebKit2/Shared/DrawingAreaBase.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "DrawingAreaBase.h"
+
+namespace WebKit {
+
+void DrawingAreaBase::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+    DrawingAreaInfo info(type(), id());
+    encoder.encode(info);
+}
+
+bool DrawingAreaBase::decode(CoreIPC::ArgumentDecoder& decoder, DrawingAreaInfo& info)
+{
+    uint32_t drawingAreaType;
+    if (!decoder.decode(drawingAreaType))
+        return false;
+
+    DrawingAreaID drawingAreaID;
+    if (!decoder.decode(drawingAreaID))
+        return false;
+
+    info.type = static_cast<Type>(drawingAreaType);
+    info.id = drawingAreaID;
+
+    return true;
+}
+
+} // namespace WebKit
diff --git a/WebKit2/Shared/DrawingAreaBase.h b/WebKit2/Shared/DrawingAreaBase.h
new file mode 100644
index 0000000..82e3456
--- /dev/null
+++ b/WebKit2/Shared/DrawingAreaBase.h
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef DrawingAreaBase_h
+#define DrawingAreaBase_h
+
+#include "ArgumentCoders.h"
+
+namespace WebCore {
+    class IntRect;
+    class IntSize;
+}
+
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class Connection;
+    class MessageID;
+}
+
+namespace WebKit {
+
+class DrawingAreaBase {
+public:
+    enum Type {
+        None,
+        ChunkedUpdateDrawingAreaType,
+#if USE(ACCELERATED_COMPOSITING)
+        LayerBackedDrawingAreaType,
+#endif
+    };
+    
+    typedef uint64_t DrawingAreaID;
+    
+    virtual ~DrawingAreaBase() { }
+    
+    Type type() const { return m_type; }
+    DrawingAreaID id() const { return m_id; }
+
+    struct DrawingAreaInfo {
+        Type type;
+        DrawingAreaID id;
+
+        DrawingAreaInfo(Type type = None, DrawingAreaID indentifier = 0)
+            : type(type)
+            , id(indentifier)
+        {
+        }
+    };
+    
+    // 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 indentifier)
+        : m_type(type)
+        , m_id(indentifier)
+    {
+    }
+
+    Type m_type;
+    DrawingAreaID m_id;
+};
+
+} // namespace WebKit
+
+namespace CoreIPC {
+template<> struct ArgumentCoder<WebKit::DrawingAreaBase::DrawingAreaInfo> : SimpleArgumentCoder<WebKit::DrawingAreaBase::DrawingAreaInfo> { };
+}
+
+#endif // DrawingAreaBase_h
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
index 1ed6e2b..06a4d1d 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
@@ -85,7 +85,7 @@ void ChunkedUpdateDrawingAreaProxy::setSize(const IntSize& viewSize)
     m_isWaitingForDidSetFrameNotification = true;
 
     page->process()->responsivenessTimer()->start();
-    page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(viewSize));
+    page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(id(), viewSize));
 }
 
 void ChunkedUpdateDrawingAreaProxy::setPageIsVisible(bool isVisible)
@@ -101,12 +101,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());
+        page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(id()));
         return;
     }
     
     // The page is now visible, resume painting.
-    page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(m_forceRepaintWhenResumingPainting));
+    page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(id(), m_forceRepaintWhenResumingPainting));
     m_forceRepaintWhenResumingPainting = false;
 }
     
@@ -141,7 +141,7 @@ void ChunkedUpdateDrawingAreaProxy::update(UpdateChunk* updateChunk)
     }
 
     WebPageProxy* page = this->page();
-    page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In());
+    page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(id()));
 }
 
 void ChunkedUpdateDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments)
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.cpp b/WebKit2/UIProcess/DrawingAreaProxy.cpp
index 0b64722..e461f90 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/DrawingAreaProxy.cpp
@@ -28,7 +28,7 @@
 namespace WebKit {
 
 DrawingAreaProxy::DrawingAreaProxy(Type type)
-    : m_type(type)
+    : DrawingAreaBase(type, nextDrawingAreaID())
 {
 }
 
@@ -36,4 +36,10 @@ DrawingAreaProxy::~DrawingAreaProxy()
 {
 }
 
+DrawingAreaProxy::DrawingAreaID DrawingAreaProxy::nextDrawingAreaID()
+{
+    static DrawingAreaID nextID = 1;
+    return ++nextID;
+}
+
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.h b/WebKit2/UIProcess/DrawingAreaProxy.h
index 3817eb1..f7259f8 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.h
+++ b/WebKit2/UIProcess/DrawingAreaProxy.h
@@ -26,23 +26,12 @@
 #ifndef DrawingAreaProxy_h
 #define DrawingAreaProxy_h
 
-#include "ArgumentEncoder.h"
+#include "DrawingAreaBase.h"
 
 #if PLATFORM(QT)
 class QPainter;
 #endif
 
-namespace CoreIPC {
-    class ArgumentDecoder;
-    class Connection;
-    class MessageID;
-}
-
-namespace WebCore {
-    class IntSize;
-    class IntRect;
-}
-
 namespace WebKit {
 
 #if PLATFORM(MAC)
@@ -53,21 +42,12 @@ typedef HDC PlatformDrawingContext;
 typedef QPainter* PlatformDrawingContext;
 #endif
 
-class DrawingAreaProxy {
+class DrawingAreaProxy : public DrawingAreaBase {
 public:
-    // This has to match DrawingArea::Type.
-    enum Type {
-        None,
-        ChunkedUpdateDrawingAreaType,
-#if USE(ACCELERATED_COMPOSITING)
-        LayerBackedDrawingAreaType,
-#endif
-    };
+    static DrawingAreaID nextDrawingAreaID();
 
     virtual ~DrawingAreaProxy();
 
-    Type type() const { return m_type; }
-
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder&) = 0;
     virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder&, CoreIPC::ArgumentEncoder&) = 0;
 
@@ -76,12 +56,6 @@ public:
 
     virtual void setPageIsVisible(bool isVisible) = 0;
     
-    // The DrawingAreaProxy should never be decoded itself. Instead, the DrawingArea should be decoded.
-    virtual void encode(CoreIPC::ArgumentEncoder& encoder) const
-    {
-        encoder.encode(static_cast<uint32_t>(m_type));
-    }
-
 #if USE(ACCELERATED_COMPOSITING)
     virtual void attachCompositingContext(uint32_t contextID) = 0;
     virtual void detachCompositingContext() = 0;
@@ -89,10 +63,8 @@ public:
 
 protected:
     DrawingAreaProxy(Type);
-
-    Type m_type;
 };
-    
+
 } // namespace WebKit
 
 #endif // DrawingAreaProxy_h
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index abd0b2b..b2375fc 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -72,7 +72,7 @@ void LayerBackedDrawingAreaProxy::setSize(const IntSize& viewSize)
     m_isWaitingForDidSetFrameNotification = true;
 
     page->process()->responsivenessTimer()->start();
-    page->process()->connection()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(viewSize));
+    page->process()->connection()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(id(), viewSize));
 }
 
 #if !PLATFORM(MAC)
@@ -94,12 +94,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());
+        page->process()->connection()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(id()));
         return;
     }
     
     // The page is now visible.
-    page->process()->connection()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In());
+    page->process()->connection()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(id()));
     
     // FIXME: We should request a full repaint here if needed.
 }
@@ -115,7 +115,7 @@ void LayerBackedDrawingAreaProxy::didSetSize()
 void LayerBackedDrawingAreaProxy::update()
 {
     WebPageProxy* page = this->page();
-    page->process()->connection()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In());
+    page->process()->connection()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(id()));
 }
 
 void LayerBackedDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments)
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
index 80f3cab..5c072be 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
@@ -58,12 +58,6 @@ public:
     LayerBackedDrawingAreaProxy(PlatformWebView*);
     virtual ~LayerBackedDrawingAreaProxy();
 
-    // The DrawingAreaProxy should never be decoded itself. Instead, the DrawingArea should be decoded.
-    virtual void encode(CoreIPC::ArgumentEncoder& encoder) const
-    {
-        DrawingAreaProxy::encode(encoder);
-    }
-
 private:
     WebPageProxy* page();
 
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 6d85bbd..e455b3b 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -595,10 +595,9 @@ void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIP
                 // FIXME: Pass the real size.
                 reply.encode(CoreIPC::In(newPage->pageID(), IntSize(100, 100), 
                                          newPage->pageNamespace()->context()->preferences()->store(),
-                                         *(newPage->m_drawingArea.get())));
+                                         *(newPage->drawingArea())));
             } else {
-                // FIXME: We should encode a drawing area type here instead.
-                reply.encode(CoreIPC::In(static_cast<uint64_t>(0), IntSize(), WebPreferencesStore(), 0));
+                reply.encode(CoreIPC::In(static_cast<uint64_t>(0), IntSize(), WebPreferencesStore(), DrawingAreaBase::DrawingAreaInfo()));
             }
             break;
         }
@@ -666,7 +665,7 @@ void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIP
                 return;
 
             didChangeAcceleratedCompositing(compositing);
-            reply.encode(CoreIPC::In(static_cast<uint32_t>(drawingArea()->type())));
+            reply.encode(*(drawingArea()));
             break;
         }
 #endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 5444e43..f6b4516 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -30,6 +30,8 @@
 		0F5265BA11DD377F0006D33C /* LayerBackedDrawingAreaProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5265B811DD377F0006D33C /* LayerBackedDrawingAreaProxy.h */; };
 		0F5265BC11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */; };
 		0F52667411DD4A490006D33C /* WebProcessProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */; };
+		0FB659231208B4DB0044816C /* DrawingAreaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaBase.h */; };
+		0FB659A61208B9EE0044816C /* DrawingAreaBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */; };
 		1A10475A110A5AD500A43ECD /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */; };
 		1A1C4EC810D06099005E67E7 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1C79A100E7FC50078DEBC /* WebCore.framework */; };
 		1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; };
@@ -325,6 +327,8 @@
 		0F5265B811DD377F0006D33C /* LayerBackedDrawingAreaProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerBackedDrawingAreaProxy.h; sourceTree = "<group>"; };
 		0F5265BB11DD37860006D33C /* LayerBackedDrawingAreaProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerBackedDrawingAreaProxyMac.mm; sourceTree = "<group>"; };
 		0F52667311DD4A490006D33C /* WebProcessProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessProxyMac.mm; sourceTree = "<group>"; };
+		0FB659221208B4DB0044816C /* DrawingAreaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaBase.h; sourceTree = "<group>"; };
+		0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaBase.cpp; sourceTree = "<group>"; };
 		1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
 		1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; };
 		1A2161AE11F37664008AD0F5 /* NPRuntimeObjectMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NPRuntimeObjectMap.h; sourceTree = "<group>"; };
@@ -766,6 +770,8 @@
 				BC111B5F112F635E00337BAB /* CoreIPCSupport */,
 				BC111B5A112F628200337BAB /* mac */,
 				BCF04C8C11FF9B7D00F86A58 /* APIObject.h */,
+				0FB659221208B4DB0044816C /* DrawingAreaBase.h */,
+				0FB659A51208B9EE0044816C /* DrawingAreaBase.cpp */,
 				BCF04C8E11FF9F6E00F86A58 /* WebString.h */,
 				BCDB86C01200FB97007254BE /* WebURL.h */,
 				1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */,
@@ -1339,6 +1345,7 @@
 				BCCB75C61203A1CE00222D1B /* WebContextMessageKinds.h in Headers */,
 				D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */,
 				D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */,
+				0FB659231208B4DB0044816C /* DrawingAreaBase.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1542,6 +1549,7 @@
 				BCDB85831200EC57007254BE /* WKType.cpp in Sources */,
 				D3B9484611FF4B6500032B39 /* WebPopupMenu.cpp in Sources */,
 				D3B9484811FF4B6500032B39 /* WebSearchPopupMenu.cpp in Sources */,
+				0FB659A61208B9EE0044816C /* DrawingAreaBase.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 7e918af..b053b52 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -110,10 +110,10 @@ Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const Windo
     uint64_t newPageID = 0;
     IntSize viewSize;
     WebPreferencesStore store;
-    uint32_t drawingAreaType;
+    DrawingAreaBase::DrawingAreaInfo drawingAreaInfo;
     if (!WebProcess::shared().connection()->sendSync(WebPageProxyMessage::CreateNewPage,
                                                      m_page->pageID(), CoreIPC::In(),
-                                                     CoreIPC::Out(newPageID, viewSize, store, drawingAreaType),
+                                                     CoreIPC::Out(newPageID, viewSize, store, drawingAreaInfo),
                                                      CoreIPC::Connection::NoTimeout)) {
         return 0;
     }
@@ -121,7 +121,7 @@ Page* WebChromeClient::createWindow(Frame*, const FrameLoadRequest&, const Windo
     if (!newPageID)
         return 0;
 
-    WebPage* newWebPage = WebProcess::shared().createWebPage(newPageID, viewSize, store, static_cast<DrawingArea::Type>(drawingAreaType));
+    WebPage* newWebPage = WebProcess::shared().createWebPage(newPageID, viewSize, store, drawingAreaInfo);
     return newWebPage->corePage();
 }
 
diff --git a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
index 40a069f..24badff 100644
--- a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
@@ -37,8 +37,8 @@ using namespace WebCore;
 
 namespace WebKit {
 
-ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea(WebPage* webPage)
-    : DrawingArea(ChunkedUpdateDrawingAreaType, webPage)
+ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea(DrawingAreaID identifier, WebPage* webPage)
+    : DrawingArea(ChunkedUpdateDrawingAreaType, identifier, webPage)
     , m_isWaitingForUpdate(false)
     , m_paintingIsSuspended(false)
     , m_displayTimer(WebProcess::shared().runLoop(), this, &ChunkedUpdateDrawingArea::display)
@@ -182,6 +182,14 @@ void ChunkedUpdateDrawingArea::didUpdate()
 
 void ChunkedUpdateDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments)
 {
+    DrawingAreaID targetDrawingAreaID;
+    if (!arguments.decode(CoreIPC::Out(targetDrawingAreaID)))
+        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())
+        return;
+
     switch (messageID.get<DrawingAreaMessage::Kind>()) {
         case DrawingAreaMessage::SetSize: {
             IntSize size;
diff --git a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
index a5bafc2..9b937d9 100644
--- a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
@@ -36,7 +36,7 @@ class UpdateChunk;
 
 class ChunkedUpdateDrawingArea : public DrawingArea {
 public:
-    ChunkedUpdateDrawingArea(WebPage*);
+    ChunkedUpdateDrawingArea(DrawingAreaID identifier, WebPage*);
     virtual ~ChunkedUpdateDrawingArea();
 
     virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate);
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.cpp b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
index 0406767..273126b 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
@@ -33,7 +33,7 @@
 
 namespace WebKit {
 
-PassRefPtr<DrawingArea> DrawingArea::create(Type type, WebPage* webPage)
+PassRefPtr<DrawingArea> DrawingArea::create(Type type, DrawingAreaID identifier, WebPage* webPage)
 {
     switch (type) {
         case None:
@@ -41,19 +41,19 @@ PassRefPtr<DrawingArea> DrawingArea::create(Type type, WebPage* webPage)
             break;
 
         case ChunkedUpdateDrawingAreaType:
-            return adoptRef(new ChunkedUpdateDrawingArea(webPage));
+            return adoptRef(new ChunkedUpdateDrawingArea(identifier, webPage));
 
 #if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
         case LayerBackedDrawingAreaType:
-            return adoptRef(new LayerBackedDrawingArea(webPage));
+            return adoptRef(new LayerBackedDrawingArea(identifier, webPage));
 #endif
     }
 
     return 0;
 }
 
-DrawingArea::DrawingArea(Type type, WebPage* webPage)
-    : m_type(type)
+DrawingArea::DrawingArea(Type type, DrawingAreaID identifier, WebPage* webPage)
+    : DrawingAreaBase(type, identifier)
     , m_webPage(webPage)
 {
 }
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.h b/WebKit2/WebProcess/WebPage/DrawingArea.h
index a180e14..1ca3e27 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.h
@@ -26,46 +26,28 @@
 #ifndef DrawingArea_h
 #define DrawingArea_h
 
+#include "DrawingAreaBase.h"
 #include <WebCore/IntRect.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
 namespace WebCore {
-    class IntRect;
-    class IntSize;
 #if USE(ACCELERATED_COMPOSITING)
     class GraphicsLayer;
 #endif
 }
 
-namespace CoreIPC {
-    class ArgumentDecoder;
-    class Connection;
-    class MessageID;
-}
-
 namespace WebKit {
 
 class WebPage;
 
-class DrawingArea : public RefCounted<DrawingArea> {
+class DrawingArea : public DrawingAreaBase, public RefCounted<DrawingArea> {
 public:
-    // This has to match DrawingAreaProxy::Type.
-    enum Type {
-        None,
-        ChunkedUpdateDrawingAreaType,
-#if USE(ACCELERATED_COMPOSITING)
-        LayerBackedDrawingAreaType,
-#endif
-    };
-
     // FIXME: It might make sense to move this create function into a factory style class. 
-    static PassRefPtr<DrawingArea> create(Type, WebPage*);
+    static PassRefPtr<DrawingArea> create(Type, DrawingAreaID, WebPage*);
 
     virtual ~DrawingArea();
     
-    Type type() const { return m_type; }
-    
     virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate) = 0;
     virtual void invalidateContentsAndWindow(const WebCore::IntRect& rect, bool immediate) = 0;
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect& rect, bool immediate) = 0;
@@ -84,13 +66,9 @@ public:
 
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder&) = 0;
 
-    // The DrawingArea should never be encoded itself. Instead, the DrawingAreaProxy should be encoded.
-    // The DrawingArea should also never be decoded itself. Instead, the DrawingArea::Type should be decoded.
-
 protected:
-    DrawingArea(Type, WebPage*);
+    DrawingArea(Type, DrawingAreaID, WebPage*);
 
-    Type m_type;
     WebPage* m_webPage;
 };
 
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
index cca1cdf..213efa1 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
@@ -39,8 +39,8 @@ using namespace WebCore;
 
 namespace WebKit {
 
-LayerBackedDrawingArea::LayerBackedDrawingArea(WebPage* webPage)
-    : DrawingArea(LayerBackedDrawingAreaType, webPage)
+LayerBackedDrawingArea::LayerBackedDrawingArea(DrawingAreaID identifier, WebPage* webPage)
+    : DrawingArea(LayerBackedDrawingAreaType, identifier, webPage)
     , m_syncTimer(WebProcess::shared().runLoop(), this, &LayerBackedDrawingArea::syncCompositingLayers)
 #if PLATFORM(MAC) && HAVE(HOSTED_CORE_ANIMATION)
     , m_remoteLayerRef(0)
@@ -148,6 +148,14 @@ void LayerBackedDrawingArea::didUpdate()
 
 void LayerBackedDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder& arguments)
 {
+    DrawingAreaID targetDrawingAreaID;
+    if (!arguments.decode(CoreIPC::Out(targetDrawingAreaID)))
+        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())
+        return;
+
     switch (messageID.get<DrawingAreaMessage::Kind>()) {
         case DrawingAreaMessage::SetSize: {
             IntSize size;
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
index b446741..3749420 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
@@ -46,14 +46,13 @@ typedef struct __WKCARemoteLayerClientRef *WKCARemoteLayerClientRef;
 namespace WebCore {
     class GraphicsContext;
     class GraphicsLayer;
-    class IntRect;
 }
 
 namespace WebKit {
 
 class LayerBackedDrawingArea : public DrawingArea, private WebCore::GraphicsLayerClient {
 public:
-    LayerBackedDrawingArea(WebPage*);
+    LayerBackedDrawingArea(DrawingAreaID identifier, WebPage*);
     virtual ~LayerBackedDrawingArea();
 
     virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate);
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 76c5ca2..6a63d05 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -74,14 +74,14 @@ namespace WebKit {
 static WTF::RefCountedLeakCounter webPageCounter("WebPage");
 #endif
 
-PassRefPtr<WebPage> WebPage::create(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, DrawingArea::Type drawingAreaType)
+PassRefPtr<WebPage> WebPage::create(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, const DrawingAreaBase::DrawingAreaInfo& drawingAreaInfo)
 {
-    return adoptRef(new WebPage(pageID, viewSize, store, drawingAreaType));
+    return adoptRef(new WebPage(pageID, viewSize, store, drawingAreaInfo));
 }
 
-WebPage::WebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, DrawingArea::Type drawingAreaType)
+WebPage::WebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, const DrawingAreaBase::DrawingAreaInfo& drawingAreaInfo)
     : m_viewSize(viewSize)
-    , m_drawingArea(DrawingArea::create(drawingAreaType, this))
+    , m_drawingArea(DrawingArea::create(drawingAreaInfo.type, drawingAreaInfo.id, this))
     , m_pageID(pageID)
 {
     ASSERT(m_pageID);
@@ -178,15 +178,14 @@ void WebPage::changeAcceleratedCompositingMode(WebCore::GraphicsLayer* layer)
     
     // Tell the UI process that accelerated compositing changed. It may respond by changing
     // drawing area types.
-    uint32_t newDrawingAreaType;
+    DrawingArea::DrawingAreaInfo newDrawingAreaInfo;
     WebProcess::shared().connection()->sendSync(WebPageProxyMessage::DidChangeAcceleratedCompositing,
                                                 m_pageID, CoreIPC::In(compositing),
-                                                CoreIPC::Out(newDrawingAreaType),
+                                                CoreIPC::Out(newDrawingAreaInfo),
                                                 CoreIPC::Connection::NoTimeout);
     
-    DrawingArea::Type newType = static_cast<DrawingArea::Type>(newDrawingAreaType);
-    if (newType != drawingArea()->type()) {
-        m_drawingArea = DrawingArea::create(newType, this);
+    if (newDrawingAreaInfo.type != drawingArea()->type()) {
+        m_drawingArea = DrawingArea::create(newDrawingAreaInfo.type, newDrawingAreaInfo.id, this);
         m_drawingArea->setNeedsDisplay(IntRect(IntPoint(0, 0), m_viewSize));
     }
 }
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 35cbc18..2964a4c 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -65,7 +65,7 @@ class WebPage : public APIObject {
 public:
     static const Type APIType = TypeBundlePage;
 
-    static PassRefPtr<WebPage> create(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
+    static PassRefPtr<WebPage> create(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, const DrawingAreaBase::DrawingAreaInfo&);
     ~WebPage();
 
     void close();
@@ -120,7 +120,7 @@ public:
     static const WebEvent* currentEvent();
 
 private:
-    WebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
+    WebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, const DrawingAreaBase::DrawingAreaInfo&);
 
     virtual Type type() const { return APIType; }
 
diff --git a/WebKit2/WebProcess/WebProcess.cpp b/WebKit2/WebProcess/WebProcess.cpp
index 68a3fb9..7d48c6a 100644
--- a/WebKit2/WebProcess/WebProcess.cpp
+++ b/WebKit2/WebProcess/WebProcess.cpp
@@ -126,14 +126,14 @@ WebPage* WebProcess::webPage(uint64_t pageID) const
     return m_pageMap.get(pageID).get();
 }
 
-WebPage* WebProcess::createWebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, DrawingArea::Type drawingAreaType)
+WebPage* WebProcess::createWebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, const DrawingAreaBase::DrawingAreaInfo& drawingAreaInfo)
 {
     // It is necessary to check for page existence here since during a window.open() (or targeted
     // link) the WebPage gets created both in the synchronous handler and through the normal way. 
     std::pair<HashMap<uint64_t, RefPtr<WebPage> >::iterator, bool> result = m_pageMap.add(pageID, 0);
     if (result.second) {
         ASSERT(!result.first->second);
-        result.first->second = WebPage::create(pageID, viewSize, store, drawingAreaType);
+        result.first->second = WebPage::create(pageID, viewSize, store, drawingAreaInfo);
     }
 
     ASSERT(result.first->second);
@@ -224,11 +224,11 @@ void WebProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
                 uint64_t pageID = arguments->destinationID();
                 IntSize viewSize;
                 WebPreferencesStore store;
-                uint32_t drawingAreaType;
-                if (!arguments->decode(CoreIPC::Out(viewSize, store, drawingAreaType)))
+                DrawingArea::DrawingAreaInfo drawingAreaInfo;
+                if (!arguments->decode(CoreIPC::Out(viewSize, store, drawingAreaInfo)))
                     return;
 
-                createWebPage(pageID, viewSize, store, static_cast<DrawingArea::Type>(drawingAreaType));
+                createWebPage(pageID, viewSize, store, drawingAreaInfo);
                 return;
             }
             case WebProcessMessage::RegisterURLSchemeAsEmptyDocument: {
diff --git a/WebKit2/WebProcess/WebProcess.h b/WebKit2/WebProcess/WebProcess.h
index 0fb4ad1..73bd29b 100644
--- a/WebKit2/WebProcess/WebProcess.h
+++ b/WebKit2/WebProcess/WebProcess.h
@@ -52,7 +52,7 @@ public:
     RunLoop* runLoop() const { return m_runLoop; }
 
     WebPage* webPage(uint64_t pageID) const;
-    WebPage* createWebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, DrawingArea::Type);
+    WebPage* createWebPage(uint64_t pageID, const WebCore::IntSize& viewSize, const WebPreferencesStore&, const DrawingAreaBase::DrawingAreaInfo&);
     void removeWebPage(uint64_t pageID);
 
     InjectedBundle* injectedBundle() const { return m_injectedBundle.get(); }
diff --git a/WebKit2/win/WebKit2.vcproj b/WebKit2/win/WebKit2.vcproj
index 9c50ca2..a724324 100755
--- a/WebKit2/win/WebKit2.vcproj
+++ b/WebKit2/win/WebKit2.vcproj
@@ -397,6 +397,14 @@
 				>
 			</File>
 			<File
+				RelativePath="..\Shared\DrawingAreaBase.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Shared\DrawingAreaBase.h"
+				>
+			</File>
+			<File
 				RelativePath="..\Shared\ImmutableArray.cpp"
 				>
 			</File>

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list