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

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix copyright Created 5 years, 9 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: Source/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index 98377cec588585c34a4b2762d7e0ef5df5921c5c..64efbc2a9d1c572e0a7d6814d5e40a7fcc969ccf 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -48,7 +48,7 @@
#include "core/html/forms/DateTimeChooser.h"
#include "core/layout/HitTestResult.h"
#include "core/layout/LayoutPart.h"
-#include "core/layout/compositing/CompositedSelectionBound.h"
+#include "core/layout/compositing/CompositedSelectionBounds.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/page/Page.h"
@@ -64,7 +64,7 @@
#include "public/platform/Platform.h"
#include "public/platform/WebCursorInfo.h"
#include "public/platform/WebRect.h"
-#include "public/platform/WebSelectionBound.h"
+#include "public/platform/WebSelectionBounds.h"
#include "public/platform/WebURLRequest.h"
#include "public/web/WebAXObject.h"
#include "public/web/WebAutofillClient.h"
@@ -126,6 +126,14 @@ static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
return result;
}
+static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bounds)
+{
+ WebSelectionBounds result(toWebSelectionBound(bounds.start), toWebSelectionBound(bounds.end));
+ result.isEditable = bounds.isEditable;
+ result.isEditableRegionEmpty = bounds.isEditableRegionEmpty;
+ return result;
+}
+
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
@@ -723,9 +731,9 @@ void ChromeClientImpl::clearCompositedSelectionBounds()
m_webView->clearCompositedSelectionBounds();
}
-void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelectionBound& anchor, const CompositedSelectionBound& focus)
+void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelectionBounds& bounds)
{
- m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWebSelectionBound(focus));
+ m_webView->updateCompositedSelectionBounds(toWebSelectionBounds(bounds));
}
bool ChromeClientImpl::hasOpenedPopup() const

Powered by Google App Engine
This is Rietveld 408576698