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

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: 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/ChromeClientImpl.h ('k') | Source/web/WebSelection.cpp » ('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 606a744527bbfdd7a3b14c839e06bbfea32cc572..e09f68a880d796007136d7002a7dd12eb76dafa7 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/CompositedSelection.h"
#include "core/loader/DocumentLoader.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/page/Page.h"
@@ -64,7 +64,6 @@
#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"
@@ -78,6 +77,7 @@
#include "public/web/WebNode.h"
#include "public/web/WebPlugin.h"
#include "public/web/WebPopupMenuInfo.h"
+#include "public/web/WebSelection.h"
#include "public/web/WebSettings.h"
#include "public/web/WebTextDirection.h"
#include "public/web/WebTouchAction.h"
@@ -116,18 +116,6 @@ 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.edgeTopInLayer = roundedIntPoint(bound.edgeTopInLayer);
- result.edgeBottomInLayer = roundedIntPoint(bound.edgeBottomInLayer);
- return result;
-}
-
ChromeClientImpl::ChromeClientImpl(WebViewImpl* webView)
: m_webView(webView)
{
@@ -758,14 +746,14 @@ void ChromeClientImpl::exitFullScreenForElement(Element* element)
m_webView->exitFullScreenForElement(element);
}
-void ChromeClientImpl::clearCompositedSelectionBounds()
+void ChromeClientImpl::clearCompositedSelection()
{
- m_webView->clearCompositedSelectionBounds();
+ m_webView->clearCompositedSelection();
}
-void ChromeClientImpl::updateCompositedSelectionBounds(const CompositedSelectionBound& anchor, const CompositedSelectionBound& focus)
+void ChromeClientImpl::updateCompositedSelection(const CompositedSelection& selection)
{
- m_webView->updateCompositedSelectionBounds(toWebSelectionBound(anchor), toWebSelectionBound(focus));
+ m_webView->updateCompositedSelection(WebSelection(selection));
}
bool ChromeClientImpl::hasOpenedPopup() const
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/WebSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698