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

Unified Diff: Source/web/WebPagePopupImpl.cpp

Issue 513723003: Add pixel readback to page popup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added WebPagePopup::positionRelativeToOwner Created 6 years, 3 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
« no previous file with comments | « Source/web/WebPagePopupImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebPagePopupImpl.cpp
diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp
index a199ba4258e31045086305614abb9208082cd6cc..9f5d47079ad778fe0252f777f798f975a007625a 100644
--- a/Source/web/WebPagePopupImpl.cpp
+++ b/Source/web/WebPagePopupImpl.cpp
@@ -44,6 +44,7 @@
#include "core/page/Page.h"
#include "core/page/PagePopupClient.h"
#include "platform/TraceEvent.h"
+#include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
#include "public/platform/WebCursorInfo.h"
#include "public/web/WebAXObject.h"
#include "public/web/WebFrameClient.h"
@@ -424,6 +425,18 @@ void WebPagePopupImpl::closePopup()
m_popupClient->didClosePopup();
}
+void WebPagePopupImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* callback)
+{
+ ASSERT(isAcceleratedCompositingActive());
+ m_layerTreeView->compositeAndReadbackAsync(callback);
+}
+
+WebPoint WebPagePopupImpl::positionRelativeToOwner()
+{
+ WebRect windowRect = m_webView->client()->rootWindowRect();
+ return WebPoint(m_windowRectInScreen.x - windowRect.x, m_windowRectInScreen.y - windowRect.y);
+}
+
// WebPagePopup ----------------------------------------------------------------
WebPagePopup* WebPagePopup::create(WebWidgetClient* client)
« no previous file with comments | « Source/web/WebPagePopupImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698