Index: Source/web/ChromeClientImpl.cpp |
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
index 3a2b428185978edf3a9687f8a4cd37d81e6c403b..be17b72df8ca00f007103a7be45d9db73bc9bbc8 100644 |
--- a/Source/web/ChromeClientImpl.cpp |
+++ b/Source/web/ChromeClientImpl.cpp |
@@ -57,6 +57,7 @@ |
#include "core/rendering/HitTestResult.h" |
#include "core/rendering/RenderPart.h" |
#include "core/rendering/RenderWidget.h" |
+#include "core/rendering/compositing/CompositedSelectionBound.h" |
#include "platform/Cursor.h" |
#include "platform/FileChooser.h" |
#include "platform/NotImplemented.h" |
@@ -70,6 +71,7 @@ |
#include "public/platform/Platform.h" |
#include "public/platform/WebCursorInfo.h" |
#include "public/platform/WebRect.h" |
+#include "public/platform/WebSelectionBound.h" |
#include "public/platform/WebURLRequest.h" |
#include "public/web/WebAXObject.h" |
#include "public/web/WebAutofillClient.h" |
@@ -117,6 +119,17 @@ static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification) |
return static_cast<WebAXEvent>(notification); |
} |
+static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bound) |
+{ |
+ ASSERT(bound.layer); |
+ |
+ // These enums have the same values; enforced in AssertMatchingEnums.cpp. |
+ WebSelectionBound result(static_cast<WebSelectionBound::Type>(bound.type)); |
+ result.layerId = bound.layer->platformLayer()->id(); |
+ result.edgeRectInLayer = bound.edgeRectInLayer; |
jdduke (slow)
2014/09/03 16:51:41
I think you need to assign the edge points instead
|
+ return result; |
+} |
+ |
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
: m_webView(webView) |
, m_toolbarsVisible(true) |
@@ -702,6 +715,11 @@ void ChromeClientImpl::clearCompositedSelectionBounds() |
m_webView->clearCompositedSelectionBounds(); |
} |
+void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelectionBound& anchor, const CompositedSelectionBound& focus) |
+{ |
+ m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWebSelectionBound(focus)); |
+} |
+ |
bool ChromeClientImpl::hasOpenedPopup() const |
{ |
return m_webView->hasOpenedPopup(); |