Index: Source/web/WebPagePopupImpl.cpp |
diff --git a/Source/web/WebPagePopupImpl.cpp b/Source/web/WebPagePopupImpl.cpp |
index 46728a9bcf44dcfd0d7d6c0fbaf5d5e66b33ce38..ccb487da04cc69f8e5ccb93eafa7d66f6a5e8509 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/WebViewClient.h" |
#include "public/web/WebWidgetClient.h" |
@@ -392,6 +393,25 @@ void WebPagePopupImpl::closePopup() |
m_popupClient->didClosePopup(); |
} |
+void WebPagePopupImpl::compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* callback) |
+{ |
+ ASSERT(isAcceleratedCompositingActive()); |
+ callback->setIsPopup(true); |
+ callback->setReadbackPosition(WebPoint(m_windowRectInScreen.x, m_windowRectInScreen.y)); |
+ m_layerTreeView->compositeAndReadbackAsync(callback); |
+} |
+ |
+LocalDOMWindow* WebPagePopupImpl::window() |
+{ |
+ return m_page->mainFrame()->domWindow(); |
+} |
+ |
+WebPoint WebPagePopupImpl::relativePosition() |
+{ |
+ WebRect windowRect = m_webView->client()->rootWindowRect(); |
+ return WebPoint(m_windowRectInScreen.x - windowRect.x, m_windowRectInScreen.y - windowRect.y); |
+} |
+ |
// WebPagePopup ---------------------------------------------------------------- |
WebPagePopup* WebPagePopup::create(WebWidgetClient* client) |