diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-11-07 11:22:47 +0100 |
| commit | cfd86b747d32ac22246a1aa908eaa720c63a88c1 (patch) | |
| tree | 24d68c6f61c464ecba1e05670b80390ea3b0e50c /Source/WebKit2/UIProcess/API/C | |
| parent | 69d7c744c9de19d152dbe2d8e46eb7dfd4511d1a (diff) | |
| download | qtwebkit-cfd86b747d32ac22246a1aa908eaa720c63a88c1.tar.gz | |
Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733)
New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes.
Diffstat (limited to 'Source/WebKit2/UIProcess/API/C')
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKAPICast.h | 3 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKInspector.cpp | 56 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKInspector.h | 4 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKPage.cpp | 6 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKPage.h | 2 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKPreferences.cpp | 10 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/WKPreferences.h | 4 | ||||
| -rw-r--r-- | Source/WebKit2/UIProcess/API/C/efl/WKView.cpp | 5 |
8 files changed, 74 insertions, 16 deletions
diff --git a/Source/WebKit2/UIProcess/API/C/WKAPICast.h b/Source/WebKit2/UIProcess/API/C/WKAPICast.h index ba627708e..713b4f896 100644 --- a/Source/WebKit2/UIProcess/API/C/WKAPICast.h +++ b/Source/WebKit2/UIProcess/API/C/WKAPICast.h @@ -142,10 +142,7 @@ WK_ADD_API_MAPPING(WKRenderLayerRef, WebRenderLayer) WK_ADD_API_MAPPING(WKRenderObjectRef, WebRenderObject) WK_ADD_API_MAPPING(WKTextCheckerRef, WebTextChecker) WK_ADD_API_MAPPING(WKVibrationRef, WebVibrationProxy) - -#if ENABLE(INSPECTOR) WK_ADD_API_MAPPING(WKInspectorRef, WebInspectorProxy) -#endif /* Enum conversions */ diff --git a/Source/WebKit2/UIProcess/API/C/WKInspector.cpp b/Source/WebKit2/UIProcess/API/C/WKInspector.cpp index 7e2187dda..891388c9a 100644 --- a/Source/WebKit2/UIProcess/API/C/WKInspector.cpp +++ b/Source/WebKit2/UIProcess/API/C/WKInspector.cpp @@ -26,8 +26,6 @@ #include "config.h" #include "WKInspector.h" -#if ENABLE(INSPECTOR) - #include "WKAPICast.h" #include "WebInspectorProxy.h" @@ -35,92 +33,142 @@ using namespace WebKit; WKTypeID WKInspectorGetTypeID() { +#if ENABLE(INSPECTOR) return toAPI(WebInspectorProxy::APIType); +#else + return 0; +#endif } WKPageRef WKInspectorGetPage(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toAPI(toImpl(inspectorRef)->page()); +#else + return 0; +#endif } bool WKInspectorIsVisible(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isVisible(); +#else + return false; +#endif } bool WKInspectorIsFront(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isFront(); +#else + return false; +#endif } void WKInspectorShow(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->show(); +#endif } void WKInspectorClose(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->close(); +#endif } void WKInspectorShowConsole(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showConsole(); +#endif } void WKInspectorShowResources(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showResources(); +#endif } void WKInspectorShowMainResourceForFrame(WKInspectorRef inspectorRef, WKFrameRef frameRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->showMainResourceForFrame(toImpl(frameRef)); +#endif } bool WKInspectorIsAttached(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isAttached(); +#else + return false; +#endif } void WKInspectorAttach(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->attach(); +#endif } void WKInspectorDetach(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->detach(); +#endif } bool WKInspectorIsDebuggingJavaScript(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isDebuggingJavaScript(); +#else + return false; +#endif } void WKInspectorToggleJavaScriptDebugging(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->toggleJavaScriptDebugging(); +#endif } bool WKInspectorIsProfilingJavaScript(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isProfilingJavaScript(); +#else + return false; +#endif } void WKInspectorToggleJavaScriptProfiling(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->toggleJavaScriptProfiling(); +#endif } bool WKInspectorIsProfilingPage(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) return toImpl(inspectorRef)->isProfilingPage(); +#else + return false; +#endif } void WKInspectorTogglePageProfiling(WKInspectorRef inspectorRef) { +#if ENABLE(INSPECTOR) toImpl(inspectorRef)->togglePageProfiling(); +#endif } - -#endif // ENABLE(INSPECTOR) diff --git a/Source/WebKit2/UIProcess/API/C/WKInspector.h b/Source/WebKit2/UIProcess/API/C/WKInspector.h index a00d103de..fd3438afa 100644 --- a/Source/WebKit2/UIProcess/API/C/WKInspector.h +++ b/Source/WebKit2/UIProcess/API/C/WKInspector.h @@ -28,8 +28,6 @@ #include <WebKit2/WKBase.h> -#if ENABLE(INSPECTOR) - #ifndef __cplusplus #include <stdbool.h> #endif @@ -68,6 +66,4 @@ WK_EXPORT void WKInspectorTogglePageProfiling(WKInspectorRef inspector); } #endif -#endif // ENABLE(INSPECTOR) - #endif // WKInspector_h diff --git a/Source/WebKit2/UIProcess/API/C/WKPage.cpp b/Source/WebKit2/UIProcess/API/C/WKPage.cpp index 52e1cebf8..bdbcb554d 100644 --- a/Source/WebKit2/UIProcess/API/C/WKPage.cpp +++ b/Source/WebKit2/UIProcess/API/C/WKPage.cpp @@ -182,12 +182,14 @@ uint64_t WKPageGetRenderTreeSize(WKPageRef page) return toImpl(page)->renderTreeSize(); } -#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR WKInspectorRef WKPageGetInspector(WKPageRef pageRef) { +#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR return toAPI(toImpl(pageRef)->inspector()); -} +#else + return 0; #endif +} double WKPageGetEstimatedProgress(WKPageRef pageRef) { diff --git a/Source/WebKit2/UIProcess/API/C/WKPage.h b/Source/WebKit2/UIProcess/API/C/WKPage.h index 9dfd52e3c..dadebbc91 100644 --- a/Source/WebKit2/UIProcess/API/C/WKPage.h +++ b/Source/WebKit2/UIProcess/API/C/WKPage.h @@ -387,9 +387,7 @@ WK_EXPORT uint64_t WKPageGetRenderTreeSize(WKPageRef page); WK_EXPORT void WKPageSetMemoryCacheClientCallsEnabled(WKPageRef page, bool memoryCacheClientCallsEnabled); -#if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR WK_EXPORT WKInspectorRef WKPageGetInspector(WKPageRef page); -#endif WK_EXPORT WKStringRef WKPageCopyUserAgent(WKPageRef page); diff --git a/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp index 532d82caf..068563d1f 100644 --- a/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp +++ b/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp @@ -943,3 +943,13 @@ bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferencesRef) { return toImpl(preferencesRef)->pdfPluginEnabled(); } + +void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled) +{ + toImpl(preferencesRef)->setUsesEncodingDetector(enabled); +} + +bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef) +{ + return toImpl(preferencesRef)->usesEncodingDetector(); +} diff --git a/Source/WebKit2/UIProcess/API/C/WKPreferences.h b/Source/WebKit2/UIProcess/API/C/WKPreferences.h index d91b82d83..ff2e0a006 100644 --- a/Source/WebKit2/UIProcess/API/C/WKPreferences.h +++ b/Source/WebKit2/UIProcess/API/C/WKPreferences.h @@ -220,6 +220,10 @@ WK_EXPORT WKStorageBlockingPolicy WKPreferencesGetStorageBlockingPolicy(WKPrefer WK_EXPORT void WKPreferencesSetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled); WK_EXPORT bool WKPreferencesGetPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef); +// Defaults to false. +WK_EXPORT void WKPreferencesSetEncodingDetectorEnabled(WKPreferencesRef preferencesRef, bool enabled); +WK_EXPORT bool WKPreferencesGetEncodingDetectorEnabled(WKPreferencesRef preferencesRef); + #ifdef __cplusplus } #endif diff --git a/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp b/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp index 03f6930dd..a03d189df 100644 --- a/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp +++ b/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp @@ -20,6 +20,7 @@ #include "config.h" #include "WKView.h" +#include "EwkViewImpl.h" #include "WKAPICast.h" #include "ewk_view_private.h" @@ -32,5 +33,7 @@ WKViewRef WKViewCreate(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pag WKPageRef WKViewGetPage(WKViewRef viewRef) { - return toAPI(ewk_view_page_get(toImpl(viewRef))); + EwkViewImpl* viewImpl = EwkViewImpl::fromEvasObject(toImpl(viewRef)); + + return viewImpl->wkPage(); } |
