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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 929213004: Plumb selection bounds as a single unit (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TODO for moving WebSelectionBound Created 5 years, 8 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/WebViewImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index f93bb2df4bc70da71d10bbdfd2806fc381f83770..50a9d84742d99a31c48274c54d42174bc6df2596 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -133,6 +133,7 @@
#include "public/web/WebPlugin.h"
#include "public/web/WebPluginAction.h"
#include "public/web/WebRange.h"
+#include "public/web/WebSelection.h"
#include "public/web/WebTextInputInfo.h"
#include "public/web/WebViewClient.h"
#include "public/web/WebWindowFeatures.h"
@@ -2005,16 +2006,19 @@ void WebViewImpl::exitFullScreenForElement(Element* element)
m_fullscreenController->exitFullScreenForElement(element);
}
-void WebViewImpl::clearCompositedSelectionBounds()
+void WebViewImpl::clearCompositedSelection()
{
if (m_layerTreeView)
m_layerTreeView->clearSelection();
}
-void WebViewImpl::updateCompositedSelectionBounds(const WebSelectionBound& anchor, const WebSelectionBound& focus)
+void WebViewImpl::updateCompositedSelection(const WebSelection& selection)
{
- if (m_layerTreeView)
- m_layerTreeView->registerSelection(anchor, focus);
+ if (m_layerTreeView) {
+ m_layerTreeView->registerSelection(selection);
+ // TODO(jdduke): Remove this overload when downstream consumers have been updated, crbug.com/466672.
+ m_layerTreeView->registerSelection(selection.start(), selection.end());
+ }
}
bool WebViewImpl::hasHorizontalScrollbar()
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698