diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
commit | 8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch) | |
tree | 17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp | |
parent | b9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff) | |
download | qtwebkit-8995b83bcbfbb68245f779b64e5517627c6cc6ea.tar.gz |
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well
as the previously cherry-picked changes
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp index 15088e7d6..53ddf6107 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp @@ -212,12 +212,12 @@ WKStringRef WKBundlePageCopyRenderTreeExternalRepresentation(WKBundlePageRef pag void WKBundlePageExecuteEditingCommand(WKBundlePageRef pageRef, WKStringRef name, WKStringRef argument) { - toImpl(pageRef)->executeEditingCommand(toImpl(name)->string(), toImpl(argument)->string()); + toImpl(pageRef)->executeEditingCommand(toWTFString(name), toWTFString(argument)); } bool WKBundlePageIsEditingCommandEnabled(WKBundlePageRef pageRef, WKStringRef name) { - return toImpl(pageRef)->isEditingCommandEnabled(toImpl(name)->string()); + return toImpl(pageRef)->isEditingCommandEnabled(toWTFString(name)); } void WKBundlePageClearMainFrameName(WKBundlePageRef pageRef) @@ -277,7 +277,7 @@ void WKBundlePageUninstallPageOverlay(WKBundlePageRef pageRef, WKBundlePageOverl bool WKBundlePageHasLocalDataForURL(WKBundlePageRef pageRef, WKURLRef urlRef) { - return toImpl(pageRef)->hasLocalDataForURL(WebCore::KURL(WebCore::KURL(), toImpl(urlRef)->string())); + return toImpl(pageRef)->hasLocalDataForURL(WebCore::KURL(WebCore::KURL(), toWTFString(urlRef))); } bool WKBundlePageCanHandleRequest(WKURLRequestRef requestRef) @@ -287,7 +287,7 @@ bool WKBundlePageCanHandleRequest(WKURLRequestRef requestRef) bool WKBundlePageFindString(WKBundlePageRef pageRef, WKStringRef target, WKFindOptions findOptions) { - return toImpl(pageRef)->findStringFromInjectedBundle(toImpl(target)->string(), toFindOptions(findOptions)); + return toImpl(pageRef)->findStringFromInjectedBundle(toWTFString(target), toFindOptions(findOptions)); } WKImageRef WKBundlePageCreateSnapshotWithOptions(WKBundlePageRef pageRef, WKRect rect, WKSnapshotOptions options) @@ -403,7 +403,7 @@ WKArrayRef WKBundlePageCopyTrackedRepaintRects(WKBundlePageRef pageRef) void WKBundlePageSetComposition(WKBundlePageRef pageRef, WKStringRef text, int from, int length) { - toImpl(pageRef)->setCompositionForTesting(toImpl(text)->string(), from, length); + toImpl(pageRef)->setCompositionForTesting(toWTFString(text), from, length); } bool WKBundlePageHasComposition(WKBundlePageRef pageRef) @@ -418,26 +418,12 @@ void WKBundlePageConfirmComposition(WKBundlePageRef pageRef) void WKBundlePageConfirmCompositionWithText(WKBundlePageRef pageRef, WKStringRef text) { - toImpl(pageRef)->confirmCompositionForTesting(toImpl(text)->string()); + toImpl(pageRef)->confirmCompositionForTesting(toWTFString(text)); } bool WKBundlePageCanShowMIMEType(WKBundlePageRef, WKStringRef mimeTypeRef) { - using WebCore::MIMETypeRegistry; + const String mimeType = toWTFString(mimeTypeRef); - const WTF::String mimeType = toImpl(mimeTypeRef)->string(); - - if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) - return true; - - if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType)) - return true; - - if (MIMETypeRegistry::isSupportedMediaMIMEType(mimeType)) - return true; - - if (mimeType.startsWith("text/", false)) - return !MIMETypeRegistry::isUnsupportedTextMIMEType(mimeType); - - return false; + return WebCore::MIMETypeRegistry::canShowMIMEType(mimeType); } |