Index: Source/web/ChromeClientImpl.cpp |
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
index 637b399993e528252e21c266544d287a2be35077..4bdb0a80c7b14e63c2c9f0a12dda8271dea974e0 100644 |
--- a/Source/web/ChromeClientImpl.cpp |
+++ b/Source/web/ChromeClientImpl.cpp |
@@ -54,6 +54,7 @@ |
#include "core/rendering/HitTestResult.h" |
#include "core/rendering/RenderPart.h" |
#include "core/rendering/RenderWidget.h" |
+#include "core/rendering/compositing/CompositedSelectionBound.h" |
#include "platform/ColorChooser.h" |
#include "platform/ColorChooserClient.h" |
#include "platform/Cursor.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" |
@@ -119,6 +121,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; |
+ return result; |
+} |
+ |
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView) |
: m_webView(webView) |
, m_toolbarsVisible(true) |
@@ -709,6 +722,11 @@ void ChromeClientImpl::clearCompositedSelectionBounds() |
m_webView->clearCompositedSelectionBounds(); |
} |
+void ChromeClientImpl::updateCompositedSelectionBounds(const WebCore::CompositedSelectionBound& anchor, const WebCore::CompositedSelectionBound& focus) |
+{ |
+ m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWebSelectionBound(focus)); |
+} |
+ |
bool ChromeClientImpl::hasOpenedPopup() const |
{ |
return m_webView->hasOpenedPopup(); |