diff options
| author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
|---|---|---|
| committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
| commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
| tree | db769fadd053248f85db67434a5b275224defef7 /Source/WebKit2/WebProcess/InjectedBundle | |
| parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
| download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 | |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebKit2/WebProcess/InjectedBundle')
6 files changed, 27 insertions, 0 deletions
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp index 9410642..f02044c 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp @@ -85,6 +85,11 @@ JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef) return toImpl(frameRef)->jsContext(); } +WKBundleFrameRef WKBundleFrameForJavaScriptContext(JSContextRef context) +{ + return toAPI(WebFrame::frameForContext(context)); +} + JSGlobalContextRef WKBundleFrameGetJavaScriptContextForWorld(WKBundleFrameRef frameRef, WKBundleScriptWorldRef worldRef) { return toImpl(frameRef)->jsContextForWorld(toImpl(worldRef)); @@ -197,3 +202,8 @@ WK_EXPORT WKSize WKBundleFrameGetScrollOffset(WKBundleFrameRef frameRef) return toAPI(view->scrollOffset()); } + +WKStringRef WKBundleFrameCopySuggestedFilenameForResourceWithURL(WKBundleFrameRef frameRef, WKURLRef urlRef) +{ + return toCopiedAPI(toImpl(frameRef)->suggestedFilenameForResourceWithURL(WebCore::KURL(WebCore::KURL(), toImpl(urlRef)->string()))); +} diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h index a6a20b2..59c2d75 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h @@ -46,6 +46,8 @@ WK_EXPORT WKURLRef WKBundleFrameCopyProvisionalURL(WKBundleFrameRef frame); WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frame); WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContextForWorld(WKBundleFrameRef frame, WKBundleScriptWorldRef world); +WK_EXPORT WKBundleFrameRef WKBundleFrameForJavaScriptContext(JSContextRef context); + WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForNodeForWorld(WKBundleFrameRef frame, WKBundleNodeHandleRef nodeHandle, WKBundleScriptWorldRef world); WK_EXPORT JSValueRef WKBundleFrameGetJavaScriptWrapperForRangeForWorld(WKBundleFrameRef frame, WKBundleRangeHandleRef rangeHandle, WKBundleScriptWorldRef world); @@ -57,6 +59,8 @@ WK_EXPORT WKRect WKBundleFrameGetContentBounds(WKBundleFrameRef frame); WK_EXPORT WKRect WKBundleFrameGetVisibleContentBounds(WKBundleFrameRef frame); WK_EXPORT WKSize WKBundleFrameGetScrollOffset(WKBundleFrameRef frame); +WK_EXPORT WKStringRef WKBundleFrameCopySuggestedFilenameForResourceWithURL(WKBundleFrameRef frame, WKURLRef url); + #ifdef __cplusplus } #endif diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp index 86d913b..bf853d1 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp @@ -49,6 +49,11 @@ WKRect WKBundleNodeHandleGetElementBounds(WKBundleNodeHandleRef nodeHandleRef) return toAPI(toImpl(nodeHandleRef)->elementBounds()); } +WKRect WKBundleNodeHandleGetRenderRect(WKBundleNodeHandleRef nodeHandleRef, bool* isReplaced) +{ + return toAPI(toImpl(nodeHandleRef)->renderRect(isReplaced)); +} + void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandleRef, WKStringRef valueRef) { toImpl(htmlInputElementHandleRef)->setHTMLInputElementValueForUser(toWTFString(valueRef)); diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h index 854677b..8953ff8 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h @@ -40,6 +40,8 @@ WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleCreate(JSContextRef context, J /* Additional DOM Operations */ WK_EXPORT WKRect WKBundleNodeHandleGetElementBounds(WKBundleNodeHandleRef nodeHandle); +WK_EXPORT WKRect WKBundleNodeHandleGetRenderRect(WKBundleNodeHandleRef nodeHandle, bool* isReplaced); + /* HTMLInputElement Specific Operations */ WK_EXPORT void WKBundleNodeHandleSetHTMLInputElementValueForUser(WKBundleNodeHandleRef htmlInputElementHandle, WKStringRef value); diff --git a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp index e9370c6..6ee3b31 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp +++ b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp @@ -104,6 +104,11 @@ IntRect InjectedBundleNodeHandle::elementBounds() const return static_cast<Element*>(m_node.get())->boundsInWindowSpace(); } + +IntRect InjectedBundleNodeHandle::renderRect(bool* isReplaced) const +{ + return m_node.get()->renderRect(isReplaced); +} void InjectedBundleNodeHandle::setHTMLInputElementValueForUser(const String& value) { diff --git a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h index eff4600..a02f7f2 100644 --- a/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h +++ b/Source/WebKit2/WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h @@ -56,6 +56,7 @@ public: // Additional DOM Operations // Note: These should only be operations that are not exposed to JavaScript. WebCore::IntRect elementBounds() const; + WebCore::IntRect renderRect(bool*) const; void setHTMLInputElementValueForUser(const String&); bool isHTMLInputElementAutofilled() const; void setHTMLInputElementAutofilled(bool); |
