Add ChromeClient function to paint custom overhang areas.
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Feb 2011 00:44:06 +0000 (00:44 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Feb 2011 00:44:06 +0000 (00:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=53639

Reviewed by Beth Dakin.

Source/WebCore:

* page/Chrome.cpp:
(WebCore::ChromeClient::paintCustomOverhangArea):
* page/ChromeClient.h:
Add ChromeClient function.

* page/FrameView.cpp:
(WebCore::FrameView::paintOverhangAreas):
* page/FrameView.h:
Call out the the ChromeClient, call ScrollView base implementation
if the ChromeClient returns false.

* platform/ScrollView.cpp:
(WebCore::ScrollView::paintOverhangAreas):
* platform/ScrollView.h:
Add dirty rect for use when painting overhang areas.

Source/WebKit2:

* Shared/API/c/WKBase.h:
* Shared/API/c/WKGraphicsContext.cpp: Added.
(WKGraphicsContextGetTypeID):
* Shared/API/c/WKGraphicsContext.h: Added.
* Shared/API/c/WKSharedAPICast.h:
* Shared/API/c/cg/WKGraphicsContextCG.cpp: Added.
(WKGraphicsContextGetCGContext):
* Shared/API/c/cg/WKGraphicsContextCG.h: Added.
* Shared/APIObject.h:
* Shared/WebGraphicsContext.cpp: Added.
(WebKit::WebGraphicsContext::WebGraphicsContext):
* Shared/WebGraphicsContext.h: Added.
(WebKit::WebGraphicsContext::create):
(WebKit::WebGraphicsContext::platformContext):
(WebKit::WebGraphicsContext::type):
Add WebGraphicsContext API type.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::pageDidScroll):
(WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea):
(WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::paintCustomOverhangArea):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient.

* UIProcess/API/C/WebKit2.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Generated.make:
Add new files.

Tools:

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
Stub out new callback.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77432 268f45cc-cd09-0410-ab3c-d52691b4dbfc

29 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/ScrollView.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/c/WKBase.h
Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp [new file with mode: 0644]
Source/WebKit2/Shared/API/c/WKGraphicsContext.h [new file with mode: 0644]
Source/WebKit2/Shared/API/c/WKSharedAPICast.h
Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp [new file with mode: 0644]
Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h [new file with mode: 0644]
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/Shared/WebGraphicsContext.cpp [new file with mode: 0644]
Source/WebKit2/Shared/WebGraphicsContext.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/C/WebKit2.h
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/win/WebKit2.vcproj
Source/WebKit2/win/WebKit2Generated.make
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp

index e4e1c8998e08ac67c990cfd6c936837d8422e2f0..636253b3c49f6017c36b4c2ab2b67f374a67d681 100644 (file)
@@ -1,3 +1,26 @@
+2011-02-02  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Beth Dakin.
+
+        Add ChromeClient function to paint custom overhang areas.
+        https://bugs.webkit.org/show_bug.cgi?id=53639
+
+        * page/Chrome.cpp:
+        (WebCore::ChromeClient::paintCustomOverhangArea):
+        * page/ChromeClient.h:
+        Add ChromeClient function.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::paintOverhangAreas):
+        * page/FrameView.h:
+        Call out the the ChromeClient, call ScrollView base implementation
+        if the ChromeClient returns false.
+
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::paintOverhangAreas):
+        * platform/ScrollView.h:
+        Add dirty rect for use when painting overhang areas.
+
 2011-02-02  Peter Kasting  <pkasting@google.com>
 
         Not reviewed, build fix.
index 9595fa07775c6b1cbcb4b8c863493d3c58154471..b78b3ffe16f8624838cf3590ff1b1cfbbef0c2b7 100644 (file)
@@ -503,6 +503,11 @@ bool ChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&)
     return false;
 }
 
+bool ChromeClient::paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&)
+{
+    return false;
+}
+
 bool Chrome::selectItemWritingDirectionIsNatural()
 {
     return m_client->selectItemWritingDirectionIsNatural();
index c2f87e007342491b8e8d95c8cd4ec6fa21d0466f..fdd5b5a7655188f446ca8eb58f71b89de4fdba5f 100644 (file)
@@ -211,6 +211,8 @@ namespace WebCore {
                                           float value, float proportion, ScrollbarControlPartMask);
         virtual bool paintCustomScrollCorner(GraphicsContext*, const FloatRect&);
 
+        virtual bool paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&);
+
         // FIXME: Remove once all ports are using client-based geolocation. https://bugs.webkit.org/show_bug.cgi?id=40373
         // For client-based geolocation, these two methods have moved to GeolocationClient. https://bugs.webkit.org/show_bug.cgi?id=50061
         // This can be either a synchronous or asynchronous call. The ChromeClient can display UI asking the user for permission
index 454a184809f6ff00f52b252a02c324d4783d44f9..29526e13fd77b664d1ca54fc661cf042d0d57720 100644 (file)
@@ -2244,6 +2244,20 @@ void FrameView::setNodeToDraw(Node* node)
     m_nodeToDraw = node;
 }
 
+void FrameView::paintOverhangAreas(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
+{
+    if (context->paintingDisabled())
+        return;
+
+    Page* page = m_frame->page();
+    if (page->mainFrame() == m_frame) {
+        if (page->chrome()->client()->paintCustomOverhangArea(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect))
+            return;
+    }
+
+    return ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect);
+}
+
 void FrameView::updateLayoutAndStyleIfNeededRecursive()
 {
     // We have to crawl our entire tree looking for any FrameViews that need
index b606f87c8e7131010953f5cba5bbbd9f564ed902..992633f1f624255f18d18a3a7b71f540ad635fb1 100644 (file)
@@ -202,6 +202,8 @@ public:
     bool isPainting() const;
     void setNodeToDraw(Node*);
 
+    virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
+
     static double currentPaintTimeStamp() { return sCurrentPaintTimeStamp; } // returns 0 if not painting
     
     void updateLayoutAndStyleIfNeededRecursive();
index f4a5bf2448af20f3460a8092d29e3f3255d3bc69..fb54d775c8860d4ac4e17c3089c459dc7895fe34 100644 (file)
@@ -897,7 +897,7 @@ void ScrollView::paint(GraphicsContext* context, const IntRect& rect)
     calculateOverhangAreasForPainting(horizontalOverhangRect, verticalOverhangRect);
 
     if (!horizontalOverhangRect.isEmpty() || !verticalOverhangRect.isEmpty())
-        paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect);
+        paintOverhangAreas(context, horizontalOverhangRect, verticalOverhangRect, rect);
 
     // Now paint the scrollbars.
     if (!m_scrollbarsSuppressed && (m_horizontalScrollbar || m_verticalScrollbar)) {
@@ -949,7 +949,7 @@ void ScrollView::calculateOverhangAreasForPainting(IntRect& horizontalOverhangRe
     }
 }
 
-void ScrollView::paintOverhangAreas(GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect)
+void ScrollView::paintOverhangAreas(GraphicsContext* context, const IntRect& horizontalOverhangRect, const IntRect& verticalOverhangRect, const IntRect&)
 {
     // FIXME: This should be checking the dirty rect.
 
index 1b6de53d9dbe46bd01cba07acb7186ce66bc98af..3d3efe248ffe298c2c2e21d545b58c600c53f497 100644 (file)
@@ -280,6 +280,9 @@ protected:
     virtual void repaintContentRectangle(const IntRect&, bool now = false);
     virtual void paintContents(GraphicsContext*, const IntRect& damageRect) = 0;
 
+    void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
+    virtual void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect);
+
     virtual void contentsResized() = 0;
     virtual void visibleContentsResized() = 0;
 
@@ -361,9 +364,6 @@ private:
     // Called when the scroll position within this view changes.  FrameView overrides this to generate repaint invalidations.
     virtual void repaintFixedElementsAfterScrolling() {}
 
-    void calculateOverhangAreasForPainting(IntRect& horizontalOverhangRect, IntRect& verticalOverhangRect);
-    void paintOverhangAreas(GraphicsContext*, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea);
-
     void platformInit();
     void platformDestroy();
     void platformAddChild(Widget*);
index 46d5643b4aca3dc5553dc61b91f08c2a0392acfb..a66237712d62e8d903f9051514eb94ef725efa04 100644 (file)
@@ -1,3 +1,45 @@
+2011-02-02  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Beth Dakin.
+
+        Add ChromeClient function to paint custom overhang areas.
+        https://bugs.webkit.org/show_bug.cgi?id=53639
+
+        * Shared/API/c/WKBase.h:
+        * Shared/API/c/WKGraphicsContext.cpp: Added.
+        (WKGraphicsContextGetTypeID):
+        * Shared/API/c/WKGraphicsContext.h: Added.
+        * Shared/API/c/WKSharedAPICast.h:
+        * Shared/API/c/cg/WKGraphicsContextCG.cpp: Added.
+        (WKGraphicsContextGetCGContext):
+        * Shared/API/c/cg/WKGraphicsContextCG.h: Added.
+        * Shared/APIObject.h:
+        * Shared/WebGraphicsContext.cpp: Added.
+        (WebKit::WebGraphicsContext::WebGraphicsContext):
+        * Shared/WebGraphicsContext.h: Added.
+        (WebKit::WebGraphicsContext::create):
+        (WebKit::WebGraphicsContext::platformContext):
+        (WebKit::WebGraphicsContext::type):
+        Add WebGraphicsContext API type.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
+        (WebKit::InjectedBundlePageUIClient::pageDidScroll):
+        (WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea):
+        (WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea):
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::paintCustomOverhangArea):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient.
+
+        * UIProcess/API/C/WebKit2.h:
+        * WebKit2.pro:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * win/WebKit2.vcproj:
+        * win/WebKit2Generated.make:
+        Add new files.
+
 2011-02-02  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Dan Bernstein.
index b79494c4cf394e4fcfcbf3ebd8963880b6041685..d44432b303470ca008b7e4e0195fab62214eade7 100644 (file)
@@ -49,6 +49,7 @@ typedef const struct OpaqueWKContextMenuItem* WKContextMenuItemRef;
 typedef const struct OpaqueWKData* WKDataRef;
 typedef const struct OpaqueWKDouble* WKDoubleRef;
 typedef const struct OpaqueWKError* WKErrorRef;
+typedef const struct OpaqueWKGraphicsContext* WKGraphicsContextRef;
 typedef const struct OpaqueWKImage* WKImageRef;
 typedef const struct OpaqueWKSecurityOrigin* WKSecurityOriginRef;
 typedef const struct OpaqueWKSerializedScriptValue* WKSerializedScriptValueRef;
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp b/Source/WebKit2/Shared/API/c/WKGraphicsContext.cpp
new file mode 100644 (file)
index 0000000..6c97f5d
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * 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 "config.h"
+#include "WKGraphicsContext.h"
+
+#include "WKSharedAPICast.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebKit;
+
+WKTypeID WKGraphicsContextGetTypeID()
+{
+    return toAPI(WebGraphicsContext::APIType);
+}
diff --git a/Source/WebKit2/Shared/API/c/WKGraphicsContext.h b/Source/WebKit2/Shared/API/c/WKGraphicsContext.h
new file mode 100644 (file)
index 0000000..dfd039e
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * 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 WKGraphicsContext_h
+#define WKGraphicsContext_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKGraphicsContextGetTypeID();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKGraphicsContext_h */
index 6dc80e8e2f5a4bc7111a4bddf9ad5c1c43eac53f..ed97bbdbec31e4e9dd04e70054f2105ad451fdac 100644 (file)
@@ -56,6 +56,7 @@ class MutableDictionary;
 class WebCertificateInfo;
 class WebContextMenuItem;
 class WebData;
+class WebGraphicsContext;
 class WebImage;
 class WebSecurityOrigin;
 class WebSerializedScriptValue;
@@ -78,6 +79,7 @@ WK_ADD_API_MAPPING(WKDataRef, WebData)
 WK_ADD_API_MAPPING(WKDictionaryRef, ImmutableDictionary)
 WK_ADD_API_MAPPING(WKDoubleRef, WebDouble)
 WK_ADD_API_MAPPING(WKErrorRef, WebError)
+WK_ADD_API_MAPPING(WKGraphicsContextRef, WebGraphicsContext)
 WK_ADD_API_MAPPING(WKImageRef, WebImage)
 WK_ADD_API_MAPPING(WKMutableArrayRef, MutableArray)
 WK_ADD_API_MAPPING(WKMutableDictionaryRef, MutableDictionary)
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.cpp
new file mode 100644 (file)
index 0000000..ede248a
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * 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 "config.h"
+#include "WKGraphicsContextCG.h"
+
+#include "WKSharedAPICast.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebKit;
+
+CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContextRef)
+{
+    return toImpl(graphicsContextRef)->platformContext();
+}
diff --git a/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h b/Source/WebKit2/Shared/API/c/cg/WKGraphicsContextCG.h
new file mode 100644 (file)
index 0000000..bc7cbd0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * 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 WKGraphicsContextCG_h
+#define WKGraphicsContextCG_h
+
+#include <CoreGraphics/CGContext.h>
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT CGContextRef WKGraphicsContextGetCGContext(WKGraphicsContextRef graphicsContext);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKGraphicsContextCG_h */
index 2c26bceeea612cbd40c7a18ac8ad652329067adc..61d866d88c4a4423f42da5c87b615294e5a55179 100644 (file)
@@ -44,6 +44,7 @@ public:
         TypeData,
         TypeDictionary,
         TypeError,
+        TypeGraphicsContext,
         TypeImage,
         TypeProtectionSpace,
         TypeSecurityOrigin,
diff --git a/Source/WebKit2/Shared/WebGraphicsContext.cpp b/Source/WebKit2/Shared/WebGraphicsContext.cpp
new file mode 100644 (file)
index 0000000..f112146
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  WebGraphicsContext.cpp
+ *  WebKit2
+ *
+ *  Created by Sam Weinig on 2/1/11.
+ *  Copyright 2011 Apple Inc. All rights reserved.
+ *
+ */
+
+#include "config.h"
+#include "WebGraphicsContext.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebGraphicsContext::WebGraphicsContext(GraphicsContext* graphicsContext)
+#if PLATFORM(CG)
+    : m_platformContext(graphicsContext->platformContext())
+#endif
+{
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/Shared/WebGraphicsContext.h b/Source/WebKit2/Shared/WebGraphicsContext.h
new file mode 100644 (file)
index 0000000..04c1e55
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * 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 WebGraphicsContext_h
+#define WebGraphicsContext_h
+
+#include "APIObject.h"
+#include <WebCore/GraphicsContext.h>
+#include <wtf/PassRefPtr.h>
+
+#if PLATFORM(CG)
+#include <wtf/RetainPtr.h>
+#endif
+
+namespace WebKit {
+
+class WebGraphicsContext : public APIObject {
+public:
+    static const Type APIType = TypeGraphicsContext;
+
+    static PassRefPtr<WebGraphicsContext> create(WebCore::GraphicsContext* graphicsContext)
+    {
+        return adoptRef(new WebGraphicsContext(graphicsContext));
+    }
+
+#if PLATFORM(CG)
+    CGContextRef platformContext() { return m_platformContext.get(); }
+#endif
+
+private:
+    explicit WebGraphicsContext(WebCore::GraphicsContext*);
+
+    virtual Type type() const { return APIType; }
+
+#if PLATFORM(CG)
+    RetainPtr<CGContextRef> m_platformContext;
+#endif
+};
+
+} // namespace WebKit
+
+#endif // WebGraphicsContext_h
index 2425c49e47b3dde1b949e8df1ca4c52e6cd58284..47d7c7b7bf6be38ab11f61886692bc5d93655fb3 100644 (file)
@@ -42,6 +42,7 @@
 #include <WebKit2/WKGeolocationManager.h>
 #include <WebKit2/WKGeolocationPermissionRequest.h>
 #include <WebKit2/WKGeolocationPosition.h>
+#include <WebKit2/WKGraphicsContext.h>
 #include <WebKit2/WKMutableArray.h>
 #include <WebKit2/WKMutableDictionary.h>
 #include <WebKit2/WKNavigationData.h>
index b2f3b1625876151e9bd7c2c4c530b5d22371ab10..ab93e8884cb2f75d50f0f36e8fa9f8fff35adb03 100644 (file)
@@ -234,6 +234,7 @@ HEADERS += \
     Shared/API/c/WKContextMenuItem.h \
     Shared/API/c/WKContextMenuItemTypes.h \
     Shared/API/c/WKGeometry.h \
+    Shared/API/c/WKGraphicsContext.h \
     Shared/API/c/WKImage.h \
     Shared/API/c/WKNumber.h \
     Shared/API/c/WKPageLoadTypes.h \
@@ -276,6 +277,7 @@ HEADERS += \
     Shared/WebEventConversion.h \
     Shared/WebFindOptions.h \
     Shared/WebGeolocationPosition.h \
+    Shared/WebGraphicsContext.h \
     Shared/WebImage.h \
     Shared/WebNavigationDataStore.h \
     Shared/WebNumber.h \
@@ -467,6 +469,7 @@ SOURCES += \
     Shared/API/c/WKArray.cpp \
     Shared/API/c/WKCertificateInfo.cpp \
     Shared/API/c/WKContextMenuItem.cpp \
+    Shared/API/c/WKGraphicsContext.cpp \
     Shared/API/c/WKImage.cpp \
     Shared/API/c/WKNumber.cpp \
     Shared/API/c/WKSecurityOrigin.cpp \
@@ -497,6 +500,7 @@ SOURCES += \
     Shared/WebEvent.cpp \
     Shared/WebEventConversion.cpp \
     Shared/WebGeolocationPosition.cpp \
+    Shared/WebGraphicsContext.cpp \
     Shared/WebKeyboardEvent.cpp \
     Shared/WebImage.cpp \
     Shared/WebMouseEvent.cpp \
index 8c7c08856fce296c4818f68e69622dd163d850e4..fa00bdfd7dee95562765f55fa320c192cac131a8 100644 (file)
                BCA0EF8012331E78007D3CFB /* WebEditCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA0EF7E12331E78007D3CFB /* WebEditCommand.cpp */; };
                BCA0EF9F12332642007D3CFB /* WebEditCommandProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA0EF9D12332642007D3CFB /* WebEditCommandProxy.h */; };
                BCA0EFA012332642007D3CFB /* WebEditCommandProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA0EF9E12332642007D3CFB /* WebEditCommandProxy.cpp */; };
+               BCA56A1C12F9028E00C566C7 /* WebGraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA56A1A12F9028E00C566C7 /* WebGraphicsContext.h */; };
+               BCA56A1D12F9028E00C566C7 /* WebGraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA56A1B12F9028E00C566C7 /* WebGraphicsContext.cpp */; };
+               BCA56A6512F9C8F900C566C7 /* WKGraphicsContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA56A6312F9C8F900C566C7 /* WKGraphicsContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               BCA56A6612F9C8F900C566C7 /* WKGraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA56A6412F9C8F900C566C7 /* WKGraphicsContext.cpp */; };
+               BCA56A6912F9C9AD00C566C7 /* WKGraphicsContextCG.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA56A6712F9C9AD00C566C7 /* WKGraphicsContextCG.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               BCA56A6A12F9C9AD00C566C7 /* WKGraphicsContextCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA56A6812F9C9AD00C566C7 /* WKGraphicsContextCG.cpp */; };
                BCA8C6A811E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C6A611E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.cpp */; };
                BCA8C6A911E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C6A711E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h */; };
                BCA8C6AF11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA8C6AD11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp */; };
                BCA0EF7E12331E78007D3CFB /* WebEditCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebEditCommand.cpp; sourceTree = "<group>"; };
                BCA0EF9D12332642007D3CFB /* WebEditCommandProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebEditCommandProxy.h; sourceTree = "<group>"; };
                BCA0EF9E12332642007D3CFB /* WebEditCommandProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebEditCommandProxy.cpp; sourceTree = "<group>"; };
+               BCA56A1A12F9028E00C566C7 /* WebGraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGraphicsContext.h; sourceTree = "<group>"; };
+               BCA56A1B12F9028E00C566C7 /* WebGraphicsContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGraphicsContext.cpp; sourceTree = "<group>"; };
+               BCA56A6312F9C8F900C566C7 /* WKGraphicsContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKGraphicsContext.h; sourceTree = "<group>"; };
+               BCA56A6412F9C8F900C566C7 /* WKGraphicsContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGraphicsContext.cpp; sourceTree = "<group>"; };
+               BCA56A6712F9C9AD00C566C7 /* WKGraphicsContextCG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKGraphicsContextCG.h; sourceTree = "<group>"; };
+               BCA56A6812F9C9AD00C566C7 /* WKGraphicsContextCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKGraphicsContextCG.cpp; sourceTree = "<group>"; };
                BCA8C6A611E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageLoaderClient.cpp; sourceTree = "<group>"; };
                BCA8C6A711E3BA5F00812FB7 /* InjectedBundlePageLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageLoaderClient.h; sourceTree = "<group>"; };
                BCA8C6AD11E3C08700812FB7 /* InjectedBundlePageUIClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageUIClient.cpp; sourceTree = "<group>"; };
                                1A90C1ED1264FD50003E44D4 /* WebFindOptions.h */,
                                BC0E607212D6BC200012A72A /* WebGeolocationPosition.cpp */,
                                BC0E607112D6BC200012A72A /* WebGeolocationPosition.h */,
+                               BCA56A1B12F9028E00C566C7 /* WebGraphicsContext.cpp */,
+                               BCA56A1A12F9028E00C566C7 /* WebGraphicsContext.h */,
                                BCCF6ABA12C91EF9008F9C35 /* WebImage.cpp */,
                                BCCF6ABB12C91EF9008F9C35 /* WebImage.h */,
                                C0337DD2127A2A0E008FF4F4 /* WebKeyboardEvent.cpp */,
                BCCF6AC412C91F3B008F9C35 /* cg */ = {
                        isa = PBXGroup;
                        children = (
+                               BCA56A6812F9C9AD00C566C7 /* WKGraphicsContextCG.cpp */,
+                               BCA56A6712F9C9AD00C566C7 /* WKGraphicsContextCG.h */,
                                BCCF6AC712C91F59008F9C35 /* WKImageCG.cpp */,
                                BCCF6AC812C91F59008F9C35 /* WKImageCG.h */,
                        );
                                BC40783C1250FADD0068F20A /* WKEvent.h */,
                                37F623B712A57B6200E3FDF6 /* WKFindOptions.h */,
                                BCC8B373125FB69000DE46A4 /* WKGeometry.h */,
+                               BCA56A6412F9C8F900C566C7 /* WKGraphicsContext.cpp */,
+                               BCA56A6312F9C8F900C566C7 /* WKGraphicsContext.h */,
                                BCCF6AC012C91F34008F9C35 /* WKImage.cpp */,
                                BCCF6AC112C91F34008F9C35 /* WKImage.h */,
                                BC4075E1124FF0270068F20A /* WKMutableArray.cpp */,
                                1A9639F712F38ECD0078A062 /* CoreAnimationRenderer.h in Headers */,
                                1A690D1712F39E3300ECD289 /* LayerTreeHostMac.h in Headers */,
                                1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */,
+                               BCA56A1C12F9028E00C566C7 /* WebGraphicsContext.h in Headers */,
+                               BCA56A6512F9C8F900C566C7 /* WKGraphicsContext.h in Headers */,
+                               BCA56A6912F9C9AD00C566C7 /* WKGraphicsContextCG.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                1A9636BC12F348490078A062 /* ShareableSurface.cpp in Sources */,
                                1A9639F812F38ECD0078A062 /* CoreAnimationRenderer.mm in Sources */,
                                1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */,
+                               BCA56A1D12F9028E00C566C7 /* WebGraphicsContext.cpp in Sources */,
+                               BCA56A6612F9C8F900C566C7 /* WKGraphicsContext.cpp in Sources */,
+                               BCA56A6A12F9C9AD00C566C7 /* WKGraphicsContextCG.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index d24817b2c508b066022b819c72780143bf520923..7c3e1e6ff917a409db1b22fc60a284779a95fce3 100644 (file)
@@ -125,6 +125,7 @@ typedef void (*WKBundlePageWillRunJavaScriptConfirmCallback)(WKBundlePageRef pag
 typedef void (*WKBundlePageWillRunJavaScriptPromptCallback)(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo);
 typedef void (*WKBundlePageMouseDidMoveOverElementCallback)(WKBundlePageRef page, WKBundleHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef* userData, const void *clientInfo);
 typedef void (*WKBundlePageDidScrollCallback)(WKBundlePageRef page, const void *clientInfo);
+typedef void (*WKBundlePagePaintCustomOverhangAreaCallback)(WKBundlePageRef page, WKGraphicsContextRef graphicsContext, WKRect horizontalOverhang, WKRect verticalOverhang, WKRect dirtyRect, const void* clientInfo);
 
 struct WKBundlePageUIClient {
     int                                                                 version;
@@ -136,6 +137,7 @@ struct WKBundlePageUIClient {
     WKBundlePageWillRunJavaScriptPromptCallback                         willRunJavaScriptPrompt;
     WKBundlePageMouseDidMoveOverElementCallback                         mouseDidMoveOverElement;
     WKBundlePageDidScrollCallback                                       pageDidScroll;
+    WKBundlePagePaintCustomOverhangAreaCallback                         paintCustomOverhangArea;
 };
 typedef struct WKBundlePageUIClient WKBundlePageUIClient;
 
index f7d1e9dfec674d3186212cab25891178f246cbe1..7bb4f89990a91f5089c6b6d5119d04a6e42d65d8 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "InjectedBundleHitTestResult.h"
 #include "WKAPICast.h"
+#include "WebGraphicsContext.h"
 #include "WKBundleAPICast.h"
 #include <wtf/text/WTFString.h>
 
@@ -79,8 +80,23 @@ void InjectedBundlePageUIClient::mouseDidMoveOverElement(WebPage* page, const Hi
 
 void InjectedBundlePageUIClient::pageDidScroll(WebPage* page)
 {
-    if (m_client.pageDidScroll)
-        m_client.pageDidScroll(toAPI(page), m_client.clientInfo);
+    if (!m_client.pageDidScroll)
+        return;
+
+    m_client.pageDidScroll(toAPI(page), m_client.clientInfo);
+}
+
+bool InjectedBundlePageUIClient::shouldPaintCustomOverhangArea()
+{
+    return m_client.paintCustomOverhangArea;
+}
+
+void InjectedBundlePageUIClient::paintCustomOverhangArea(WebPage* page, GraphicsContext* graphicsContext, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
+{
+    ASSERT(shouldPaintCustomOverhangArea());
+
+    RefPtr<WebGraphicsContext> context = WebGraphicsContext::create(graphicsContext);
+    m_client.paintCustomOverhangArea(toAPI(page), toAPI(context.get()), toAPI(horizontalOverhangArea), toAPI(verticalOverhangArea), toAPI(dirtyRect), m_client.clientInfo);
 }
 
 } // namespace WebKit
index 93c19e9be2fa8f6f5a76baf85ea75cd6f07602b1..94925b75ce0bfae306d75d7521583ebe4acf77da 100644 (file)
@@ -32,7 +32,9 @@
 #include <wtf/Forward.h>
 
 namespace WebCore {
+    class GraphicsContext;
     class HitTestResult;
+    class IntRect;
 }
 
 namespace WebKit {
@@ -50,6 +52,9 @@ public:
     void willRunJavaScriptPrompt(WebPage*, const String&, const String&, WebFrame*);
     void mouseDidMoveOverElement(WebPage*, const WebCore::HitTestResult&, WebEvent::Modifiers, RefPtr<APIObject>& userData);
     void pageDidScroll(WebPage*);
+
+    bool shouldPaintCustomOverhangArea();
+    void paintCustomOverhangArea(WebPage*, WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
 };
 
 } // namespace WebKit
index 30b32872059075c92aa0e121b70f48e48398db70..27211c2dad1afed686db52dedd99a55aa50fa6bd 100644 (file)
@@ -551,6 +551,15 @@ bool WebChromeClient::paintCustomScrollCorner(GraphicsContext*, const FloatRect&
     return false;
 }
 
+bool WebChromeClient::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
+{
+    if (!m_page->injectedBundleUIClient().shouldPaintCustomOverhangArea())
+        return false;
+
+    m_page->injectedBundleUIClient().paintCustomOverhangArea(m_page, context, horizontalOverhangArea, verticalOverhangArea, dirtyRect);
+    return true;
+}
+
 void WebChromeClient::requestGeolocationPermissionForFrame(Frame*, Geolocation*)
 {
     notImplemented();
index 40d6c6ab652d86020a1cfae64d0c83e753ecebfd..8586f3c18110965cf9b277043e5dc1adf0792cc9 100644 (file)
@@ -154,7 +154,9 @@ private:
                                       WebCore::ScrollbarControlState, WebCore::ScrollbarPart pressedPart, bool vertical,
                                       float value, float proportion, WebCore::ScrollbarControlPartMask);
     virtual bool paintCustomScrollCorner(WebCore::GraphicsContext*, const WebCore::FloatRect&);
-    
+
+    virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
+
     // This is an asynchronous call. The ChromeClient can display UI asking the user for permission
     // to use Geolococation. The ChromeClient must call Geolocation::setShouldClearCache() appropriately.
     virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
index 0f6cbe90eaa755457d67dad0984e68bf4f7e6419..b544808636fc0e708fcc2efae5880c39d17c4ac3 100755 (executable)
                                RelativePath="..\Shared\WebGeolocationPosition.h"
                                >
                        </File>
+                       <File
+                               RelativePath="..\Shared\WebGraphicsContext.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\Shared\WebGraphicsContext.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\Shared\WebImage.cpp"
                                >
                                        RelativePath="..\Shared\API\c\WKGeometry.h"
                                        >
                                </File>
+                               <File
+                                       RelativePath="..\Shared\API\c\WKGraphicsContext.cpp"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath="..\Shared\API\c\WKGraphicsContext.h"
+                                       >
+                               </File>
                                <File
                                        RelativePath="..\Shared\API\c\WKImage.cpp"
                                        >
                                                RelativePath="..\Shared\API\c\cg\WKImageCG.h"
                                                >
                                        </File>
+                                       <File
+                                               RelativePath="..\Shared\API\c\cg\WKGraphicsContextCG.cpp"
+                                               >
+                                               <FileConfiguration
+                                                       Name="Debug_Cairo_CFLite|Win32"
+                                                       ExcludedFromBuild="true"
+                                                       >
+                                                       <Tool
+                                                               Name="VCCLCompilerTool"
+                                                       />
+                                               </FileConfiguration>
+                                               <FileConfiguration
+                                                       Name="Release_Cairo_CFLite|Win32"
+                                                       ExcludedFromBuild="true"
+                                                       >
+                                                       <Tool
+                                                               Name="VCCLCompilerTool"
+                                                       />
+                                               </FileConfiguration>
+                                       </File>
+                                       <File
+                                               RelativePath="..\Shared\API\c\cg\WKGraphicsContextCG.h"
+                                               >
+                                       </File>
                                </Filter>
                        </Filter>
                        <Filter
index 930fd1fd11225d06075417350c80189e99684417..abfc7be0baf1656bc2c4a28d342211cb0b38c1b6 100644 (file)
@@ -6,6 +6,7 @@ all:
     xcopy /y /d "..\Shared\API\c\cf\WKURLRequestCF.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\cf\WKURLResponseCF.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\cg\WKImageCG.h" "%ConfigurationBuildDir%\include\WebKit2"
+    xcopy /y /d "..\Shared\API\c\cg\WKGraphicsContextCG.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\win\WKBaseWin.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\win\WKCertificateInfoWin.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKArray.h" "%ConfigurationBuildDir%\include\WebKit2"
@@ -19,6 +20,7 @@ all:
     xcopy /y /d "..\Shared\API\c\WKEvent.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKFindOptions.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKGeometry.h" "%ConfigurationBuildDir%\include\WebKit2"
+    xcopy /y /d "..\Shared\API\c\WKGraphicsContext.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKImage.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKMutableArray.h" "%ConfigurationBuildDir%\include\WebKit2"
     xcopy /y /d "..\Shared\API\c\WKMutableDictionary.h" "%ConfigurationBuildDir%\include\WebKit2"
index 4e044487dc127341f38106f5aa2dc4490e827070..42880896e9ae976f3c60c91ed7de92e9100d4115 100644 (file)
@@ -1,3 +1,14 @@
+2011-02-02  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Beth Dakin.
+
+        Add ChromeClient function to paint custom overhang areas.
+        https://bugs.webkit.org/show_bug.cgi?id=53639
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::InjectedBundlePage::InjectedBundlePage):
+        Stub out new callback.
+
 2011-02-02  Dirk Pranke  <dpranke@chromium.org>
 
         Reviewed by Tony Chang.
index c5f4909d5d34529caa9f35b09ee5ec30f375b2c2..0875ca4a894e7d8a50fb8d7463e82f9420828547 100644 (file)
@@ -204,6 +204,7 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
         willRunJavaScriptPrompt,
         0, /*mouseDidMoveOverElement*/
         0, /*pageDidScroll*/
+        0, /*paintCustomOverhangArea*/
     };
     WKBundlePageSetUIClient(m_page, &uiClient);