[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

andersca at apple.com andersca at apple.com
Sun Feb 20 22:49:04 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit d0f15ac43f4b99615b26e9268fe85e75a603dcee
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 11 21:20:35 2011 +0000

    2011-01-11  Anders Carlsson  <andersca at apple.com>
    
            Reviewed by Sam Weinig.
    
            Add DrawingAreaImpl skeleton class
            https://bugs.webkit.org/show_bug.cgi?id=52246
    
            * UIProcess/API/mac/WKView.mm:
            (useNewDrawingArea):
            New function which controls which drawing area to use, through an environment variable.
    
            (-[WKView drawRect:]):
            Bail if we're using the new drawing area (for now).
    
            (-[WKView WebKit::]):
            Create a DrawingAreaProxyImpl when asked to.
    
            * WebKit2.xcodeproj/project.pbxproj:
            Add new files.
    
            * WebProcess/WebPage/DrawingArea.cpp:
            (WebKit::DrawingArea::create):
            Create a DrawingAreaImpl when asked to.
    
            * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
            * WebProcess/WebPage/DrawingAreaImpl.h: Added.
            Add DrawingAreaImpl class.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index dc1756e..837a89f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,34 @@
 
         Reviewed by Sam Weinig.
 
+        Add DrawingAreaImpl skeleton class
+        https://bugs.webkit.org/show_bug.cgi?id=52246
+
+        * UIProcess/API/mac/WKView.mm:
+        (useNewDrawingArea):
+        New function which controls which drawing area to use, through an environment variable.
+
+        (-[WKView drawRect:]):
+        Bail if we're using the new drawing area (for now).
+
+        (-[WKView WebKit::]):
+        Create a DrawingAreaProxyImpl when asked to.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * WebProcess/WebPage/DrawingArea.cpp:
+        (WebKit::DrawingArea::create):
+        Create a DrawingAreaImpl when asked to.
+
+        * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
+        * WebProcess/WebPage/DrawingAreaImpl.h: Added.
+        Add DrawingAreaImpl class.
+
+2011-01-11  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
         Add Mac-only DrawingAreaProxyImpl class skeleton
         https://bugs.webkit.org/show_bug.cgi?id=52243
 
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index b09d69c..68fedc6 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -137,6 +137,13 @@ typedef HashMap<String, ValidationVector> ValidationMap;
 
 @implementation WKView
 
+static bool useNewDrawingArea()
+{
+    static bool useNewDrawingArea = getenv("USE_NEW_DRAWING_AREA");
+
+    return useNewDrawingArea;
+}
+
 - (id)initWithFrame:(NSRect)frame
 {
     return [self initWithFrame:frame contextRef:toAPI(WebContext::sharedProcessContext())];
@@ -1105,6 +1112,11 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 - (void)drawRect:(NSRect)rect
 {
+    if (useNewDrawingArea()) {
+        // FIXME: Implement.
+        return;
+    }
+
     if (_data->_page->isValid() && _data->_page->drawingArea()) {
         CGContextRef context = static_cast<CGContextRef>([[NSGraphicsContext currentContext] graphicsPort]);
         _data->_page->drawingArea()->paint(IntRect(rect), context);
@@ -1204,6 +1216,9 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
 
 - (PassOwnPtr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy
 {
+    if (useNewDrawingArea())
+        return DrawingAreaProxyImpl::create(_data->_page.get());
+
     return ChunkedUpdateDrawingAreaProxy::create(self, _data->_page.get());
 }
 
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 69acd2d..c05e975 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -126,6 +126,8 @@
 		1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */; };
 		1A64218612DCF49200CAAE2C /* DrawingAreaProxyImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A64218412DCF49200CAAE2C /* DrawingAreaProxyImpl.h */; };
 		1A64218712DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A64218512DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp */; };
+		1A6421F612DCFBAB00CAAE2C /* DrawingAreaImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */; };
+		1A6421F712DCFBAB00CAAE2C /* DrawingAreaImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */; };
 		1A6F9F9011E13EFC00DB1371 /* CommandLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */; };
 		1A6F9FB711E1408500DB1371 /* CommandLineMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */; };
 		1A6FA01E11E1526300DB1371 /* WebProcessMainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A6FA01D11E1526300DB1371 /* WebProcessMainMac.mm */; };
@@ -831,6 +833,8 @@
 		1A6420E312DCE2FF00CAAE2C /* ShareableBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShareableBitmap.h; sourceTree = "<group>"; };
 		1A64218412DCF49200CAAE2C /* DrawingAreaProxyImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaProxyImpl.h; sourceTree = "<group>"; };
 		1A64218512DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaProxyImpl.cpp; sourceTree = "<group>"; };
+		1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaImpl.h; sourceTree = "<group>"; };
+		1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingAreaImpl.cpp; sourceTree = "<group>"; };
 		1A6F9F8E11E13EFC00DB1371 /* CommandLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommandLine.h; sourceTree = "<group>"; };
 		1A6F9FB611E1408500DB1371 /* CommandLineMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommandLineMac.cpp; sourceTree = "<group>"; };
 		1A6FA01D11E1526300DB1371 /* WebProcessMainMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessMainMac.mm; sourceTree = "<group>"; };
@@ -1983,6 +1987,8 @@
 				93FC679E12D3CC7400A60610 /* DecoderAdapter.h */,
 				BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */,
 				BC8452A61162C80900CAB9B5 /* DrawingArea.h */,
+				1A6421F512DCFBAB00CAAE2C /* DrawingAreaImpl.cpp */,
+				1A6421F412DCFBAB00CAAE2C /* DrawingAreaImpl.h */,
 				93FC679F12D3CC7400A60610 /* EncoderAdapter.cpp */,
 				93FC67A012D3CC7400A60610 /* EncoderAdapter.h */,
 				1A90C1F31264FD71003E44D4 /* FindController.cpp */,
@@ -2977,6 +2983,7 @@
 				BC06F44E12DBDF3F002D78DE /* WKGeolocationPermissionRequest.h in Headers */,
 				1A6420E512DCE2FF00CAAE2C /* ShareableBitmap.h in Headers */,
 				1A64218612DCF49200CAAE2C /* DrawingAreaProxyImpl.h in Headers */,
+				1A6421F612DCFBAB00CAAE2C /* DrawingAreaImpl.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -3426,6 +3433,7 @@
 				BC06F44F12DBDF3F002D78DE /* WKGeolocationPermissionRequest.cpp in Sources */,
 				1A6420E412DCE2FF00CAAE2C /* ShareableBitmap.cpp in Sources */,
 				1A64218712DCF49200CAAE2C /* DrawingAreaProxyImpl.cpp in Sources */,
+				1A6421F712DCFBAB00CAAE2C /* DrawingAreaImpl.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.cpp b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
index 8e494b9..3b76aaf 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
@@ -27,6 +27,11 @@
 
 // Subclasses
 #include "ChunkedUpdateDrawingArea.h"
+
+#ifdef __APPLE__
+#include "DrawingAreaImpl.h"
+#endif
+
 #if USE(ACCELERATED_COMPOSITING)
 #include "LayerBackedDrawingArea.h"
 #endif
@@ -45,8 +50,11 @@ PassRefPtr<DrawingArea> DrawingArea::create(DrawingAreaInfo::Type type, DrawingA
             break;
 
         case DrawingAreaInfo::Impl:
+#ifdef __APPLE__
+            return DrawingAreaImpl::create(identifier, webPage);
+#else
             return 0;
-
+#endif
         case DrawingAreaInfo::ChunkedUpdate:
             return adoptRef(new ChunkedUpdateDrawingArea(identifier, webPage));
 
diff --git a/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp b/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
new file mode 100644
index 0000000..43d3644
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2011 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 "DrawingAreaImpl.h"
+
+#ifndef __APPLE__
+#error "This drawing area is not ready for use by other ports yet."
+#endif
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PassRefPtr<DrawingAreaImpl> DrawingAreaImpl::create(DrawingAreaInfo::Identifier identifier, WebPage* webPage)
+{
+    return adoptRef(new DrawingAreaImpl(identifier, webPage));
+}
+
+DrawingAreaImpl::~DrawingAreaImpl()
+{
+}
+
+DrawingAreaImpl::DrawingAreaImpl(DrawingAreaInfo::Identifier identifier, WebPage* webPage)
+    : DrawingArea(DrawingAreaInfo::Impl, identifier, webPage)
+{
+}
+
+void DrawingAreaImpl::setNeedsDisplay(const IntRect&)
+{
+}
+
+void DrawingAreaImpl::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect)
+{
+}
+
+void DrawingAreaImpl::attachCompositingContext()
+{
+}
+
+void DrawingAreaImpl::detachCompositingContext()
+{
+}
+
+void DrawingAreaImpl::setRootCompositingLayer(WebCore::GraphicsLayer*)
+{
+}
+
+void DrawingAreaImpl::scheduleCompositingLayerSync()
+{
+}
+
+void DrawingAreaImpl::syncCompositingLayers()
+{
+}
+
+void DrawingAreaImpl::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
+{
+}
+    
+} // namespace WebKit
diff --git a/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h b/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
new file mode 100644
index 0000000..2cd33eb
--- /dev/null
+++ b/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2011 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 DrawingAreaImpl_h
+#define DrawingAreaImpl_h
+
+#include "DrawingArea.h"
+
+namespace WebKit {
+
+class DrawingAreaImpl : public DrawingArea {
+public:
+    static PassRefPtr<DrawingAreaImpl> create(DrawingAreaInfo::Identifier, WebPage*);
+    virtual ~DrawingAreaImpl();
+
+private:
+    DrawingAreaImpl(DrawingAreaInfo::Identifier, WebPage*);
+
+    // DrawingArea
+    virtual void setNeedsDisplay(const WebCore::IntRect&);
+    virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& rectToScroll, const WebCore::IntRect& clipRect);
+    virtual void attachCompositingContext();
+    virtual void detachCompositingContext();
+    virtual void setRootCompositingLayer(WebCore::GraphicsLayer*);
+    virtual void scheduleCompositingLayerSync();
+    virtual void syncCompositingLayers();
+    virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+};
+
+} // namespace WebKit
+
+#endif // DrawingAreaImpl_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list