Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Unified Diff: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp

Issue 1763103002: WebPluginContainer: expose and implement localToScreenRect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
index d271fda573e4ac7c9021df040a087c5a84ec7b8a..8b8ca8b27a5d30f0a941a32fd81575131799f0d0 100644
--- a/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
@@ -589,6 +589,16 @@ WebPoint WebPluginContainerImpl::localToRootFramePoint(const WebPoint& pointInLo
return view->contentsToRootFrame(absolutePoint);
}
+WebRect WebPluginContainerImpl::localToScreenRect(const WebRect& rectInLocal)
+{
+ FrameView* view = toFrameView(parent());
+ if (!view)
+ return rectInLocal;
+ IntRect absoluteRect = roundedIntRect(m_element->layoutObject()->localToAbsoluteQuad(FloatQuad(FloatRect(rectInLocal)), UseTransforms).boundingBox());
+
+ return view->contentsToScreen(absoluteRect);
+}
+
void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response)
{
// Make sure that the plugin receives window geometry before data, or else
« no previous file with comments | « third_party/WebKit/Source/web/WebPluginContainerImpl.h ('k') | third_party/WebKit/public/web/WebPluginContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698