summaryrefslogtreecommitdiffstats
path: root/Source/WebKit2/UIProcess/API/C/win
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebKit2/UIProcess/API/C/win
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebKit2/UIProcess/API/C/win')
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h2
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h35
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h4
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKContextWin.cpp5
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKView.cpp22
-rw-r--r--Source/WebKit2/UIProcess/API/C/win/WKView.h24
6 files changed, 57 insertions, 35 deletions
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h b/Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h
index 6acb1a6..09cf06f 100644
--- a/Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h
+++ b/Source/WebKit2/UIProcess/API/C/win/WKAPICastWin.h
@@ -33,8 +33,10 @@
namespace WebKit {
class WebView;
+class WebEditCommandProxy;
WK_ADD_API_MAPPING(WKViewRef, WebView)
+WK_ADD_API_MAPPING(WKEditCommandRef, WebEditCommandProxy)
}
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h b/Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
deleted file mode 100644
index e2ee9a7..0000000
--- a/Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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 WKBaseWin_h
-#define WKBaseWin_h
-
-#ifndef WKBase_h
-#error "Please #include \"WKBase.h\" instead of this file directly."
-#endif
-
-typedef const struct OpaqueWKView* WKViewRef;
-
-#endif /* WKBaseWin_h */
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h b/Source/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h
index c8a9c34..0d49ac9 100644
--- a/Source/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h
+++ b/Source/WebKit2/UIProcess/API/C/win/WKContextPrivateWin.h
@@ -28,6 +28,7 @@
#include <WebKit2/WKBase.h>
#include <WebKit2/WKContext.h>
+#include <WebKit2/WKCookieManager.h>
#ifndef __cplusplus
#include <stdbool.h>
@@ -40,6 +41,9 @@ extern "C" {
// Defaults to true.
WK_EXPORT void WKContextSetShouldPaintNativeControls(WKContextRef, bool);
+// Defaults to WKHTTPCookieAcceptPolicyAlways.
+WK_EXPORT void WKContextSetInitialHTTPCookieAcceptPolicy(WKContextRef, WKHTTPCookieAcceptPolicy);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKContextWin.cpp b/Source/WebKit2/UIProcess/API/C/win/WKContextWin.cpp
index 110951f..4971540 100644
--- a/Source/WebKit2/UIProcess/API/C/win/WKContextWin.cpp
+++ b/Source/WebKit2/UIProcess/API/C/win/WKContextWin.cpp
@@ -36,3 +36,8 @@ void WKContextSetShouldPaintNativeControls(WKContextRef contextRef, bool b)
{
toImpl(contextRef)->setShouldPaintNativeControls(b);
}
+
+void WKContextSetInitialHTTPCookieAcceptPolicy(WKContextRef contextRef, WKHTTPCookieAcceptPolicy policy)
+{
+ toImpl(contextRef)->setInitialHTTPCookieAcceptPolicy(toHTTPCookieAcceptPolicy(policy));
+}
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKView.cpp b/Source/WebKit2/UIProcess/API/C/win/WKView.cpp
index 62603fe..05ae0d7 100644
--- a/Source/WebKit2/UIProcess/API/C/win/WKView.cpp
+++ b/Source/WebKit2/UIProcess/API/C/win/WKView.cpp
@@ -72,6 +72,11 @@ void WKViewSetInitialFocus(WKViewRef viewRef, bool forward)
toImpl(viewRef)->setInitialFocus(forward);
}
+void WKViewSetScrollOffsetOnNextResize(WKViewRef viewRef, WKSize scrollOffset)
+{
+ toImpl(viewRef)->setScrollOffsetOnNextResize(toIntSize(scrollOffset));
+}
+
void WKViewSetFindIndicatorCallback(WKViewRef viewRef, WKViewFindIndicatorCallback callback, void* context)
{
toImpl(viewRef)->setFindIndicatorCallback(callback, context);
@@ -81,3 +86,20 @@ WKViewFindIndicatorCallback WKViewGetFindIndicatorCallback(WKViewRef viewRef, vo
{
return toImpl(viewRef)->getFindIndicatorCallback(context);
}
+
+void WKViewSetViewUndoClient(WKViewRef viewRef, const WKViewUndoClient* wkClient)
+{
+ if (wkClient && wkClient->version)
+ return;
+ toImpl(viewRef)->initializeUndoClient(wkClient);
+}
+
+void WKViewReapplyEditCommand(WKViewRef viewRef, WKEditCommandRef command)
+{
+ toImpl(viewRef)->reapplyEditCommand(toImpl(command));
+}
+
+void WKViewUnapplyEditCommand(WKViewRef viewRef, WKEditCommandRef command)
+{
+ toImpl(viewRef)->unapplyEditCommand(toImpl(command));
+}
diff --git a/Source/WebKit2/UIProcess/API/C/win/WKView.h b/Source/WebKit2/UIProcess/API/C/win/WKView.h
index 213897e..c8ac44c 100644
--- a/Source/WebKit2/UIProcess/API/C/win/WKView.h
+++ b/Source/WebKit2/UIProcess/API/C/win/WKView.h
@@ -27,12 +27,31 @@
#define WKView_h
#include <WebKit2/WKBase.h>
+#include <WebKit2/WKGeometry.h>
#include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif
+// Undo Client.
+enum {
+ kWKViewUndo = 0,
+ kWKViewRedo = 1
+};
+typedef uint32_t WKViewUndoType;
+
+typedef void (*WKViewRegisterEditCommandCallback)(WKViewRef, WKEditCommandRef, WKViewUndoType undoOrRedo, const void *clientInfo);
+typedef void (*WKViewClearAllEditCommandsCallback)(WKViewRef, const void *clientInfo);
+
+struct WKViewUndoClient {
+ int version;
+ const void * clientInfo;
+ WKViewRegisterEditCommandCallback registerEditCommand;
+ WKViewClearAllEditCommandsCallback clearAllEditCommands;
+};
+typedef struct WKViewUndoClient WKViewUndoClient;
+
WK_EXPORT WKTypeID WKViewGetTypeID();
WK_EXPORT WKViewRef WKViewCreate(RECT rect, WKContextRef context, WKPageGroupRef pageGroup, HWND parentWindow);
@@ -41,10 +60,15 @@ WK_EXPORT HWND WKViewGetWindow(WKViewRef view);
WK_EXPORT WKPageRef WKViewGetPage(WKViewRef view);
+WK_EXPORT void WKViewSetViewUndoClient(WKViewRef view, const WKViewUndoClient* client);
+WK_EXPORT void WKViewReapplyEditCommand(WKViewRef view, WKEditCommandRef command);
+WK_EXPORT void WKViewUnapplyEditCommand(WKViewRef view, WKEditCommandRef command);
+
WK_EXPORT void WKViewSetParentWindow(WKViewRef view, HWND parentWindow);
WK_EXPORT void WKViewWindowAncestryDidChange(WKViewRef view);
WK_EXPORT void WKViewSetIsInWindow(WKViewRef view, bool isInWindow);
WK_EXPORT void WKViewSetInitialFocus(WKViewRef view, bool forward);
+WK_EXPORT void WKViewSetScrollOffsetOnNextResize(WKViewRef view, WKSize scrollOffset);
typedef void (*WKViewFindIndicatorCallback)(WKViewRef, HBITMAP selectionBitmap, RECT selectionRectInWindowCoordinates, bool fadeout, void*);
WK_EXPORT void WKViewSetFindIndicatorCallback(WKViewRef view, WKViewFindIndicatorCallback callback, void* context);