Commit 17b00bde authored by aroben@apple.com's avatar aroben@apple.com
Browse files

Add IWebFramePrivate::visibleContentRect

Fixes <http://webkit.org/b/34956> Add API to get a WebFrame's visible
content rect

Reviewed by Jon Honeycutt.

* Interfaces/IWebFramePrivate.idl: Added visibleContentRect.

* Interfaces/WebKit.idl: Touched to force a build.

* WebFrame.cpp:
(WebFrame::visibleContentRect):
* WebFrame.h:
Added. Calls through to FrameView::visibleContentRect.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54796 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 98a96e3a
2010-02-15 Adam Roben <aroben@apple.com>
Add IWebFramePrivate::visibleContentRect
Fixes <http://webkit.org/b/34956> Add API to get a WebFrame's visible
content rect
Reviewed by Jon Honeycutt.
* Interfaces/IWebFramePrivate.idl: Added visibleContentRect.
* Interfaces/WebKit.idl: Touched to force a build.
* WebFrame.cpp:
(WebFrame::visibleContentRect):
* WebFrame.h:
Added. Calls through to FrameView::visibleContentRect.
2010-02-12 Brian Weinstein <bweinstein@apple.com>
Reviewed by Adam Roben.
......
......@@ -102,4 +102,6 @@ interface IWebFramePrivate : IUnknown
HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result);
HRESULT pauseSVGAnimation([in] BSTR elementId, [in] IDOMNode* node, [in] double secondsFromNow, [out, retval] BOOL* animationWasRunning);
HRESULT visibleContentRect([out, retval] RECT*);
}
......@@ -294,3 +294,4 @@ library WebKit
[default] interface IWebGeolocationPosition;
}
}
......@@ -1192,6 +1192,24 @@ HRESULT WebFrame::pauseSVGAnimation(BSTR elementId, IDOMNode* node, double secon
return S_OK;
}
HRESULT WebFrame::visibleContentRect(RECT* rect)
{
if (!rect)
return E_POINTER;
SetRectEmpty(rect);
Frame* frame = core(this);
if (!frame)
return E_FAIL;
FrameView* view = frame->view();
if (!view)
return E_FAIL;
*rect = view->visibleContentRect(false);
return S_OK;
}
HRESULT WebFrame::numberOfActiveAnimations(UINT* number)
{
if (!number)
......
......@@ -252,6 +252,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE stringByEvaluatingJavaScriptInScriptWorld(IWebScriptWorld*, JSObjectRef globalObjectRef, BSTR script, BSTR* evaluationResult);
virtual JSGlobalContextRef STDMETHODCALLTYPE globalContextForScriptWorld(IWebScriptWorld*);
virtual HRESULT STDMETHODCALLTYPE visibleContentRect(RECT*);
// IWebDocumentText
virtual HRESULT STDMETHODCALLTYPE supportsTextEncoding(
/* [retval][out] */ BOOL* result);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment