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

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: Created 5 years, 10 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/ChromeClientImpl.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/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index 71dec94aef307ac20870ed182dc19e1b4dc61df0..d8876d8a11dddf286c88a9b840662c3252393258 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -114,7 +114,7 @@ static WebAXEvent toWebAXEvent(AXObjectCache::AXNotification notification)
return static_cast<WebAXEvent>(notification);
}
-static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bound)
+static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bound)
mfomitchev 2015/02/17 22:25:51 This doesn't need to be changed, right?
jdduke (slow) 2015/02/17 22:28:50 Oops, yeah this was a typo, I never actually compi
{
ASSERT(bound.layer);
@@ -126,6 +126,15 @@ static WebSelectionBound toWebSelectionBound(const CompositedSelectionBound& bou
return result;
}
+static WebSelectionBounds toWebSelectionBounds(const CompositedSelectionBounds& bounds)
+{
+ WebSelectionBounds result(toWebSelectionBound(bounds.start), toWebSelectionBound(bounds.end));
+ result.length = bounds.length;
+ result.isEditable = bounds.isEditable;
+ result.isUserTriggered = bounds.isUserTriggered;
+ return result;
+}
+
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
@@ -734,9 +743,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(anchor));
mfomitchev 2015/02/17 22:25:51 anchor -> bounds
}
bool ChromeClientImpl::hasOpenedPopup() const
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698