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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 352173002: Expose public interface for composited selection bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 03a17e4291a42a38a598eb6315447ce66eea4a2f..cbece100b227ca4ed85b426580d5ebc285fab93d 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -123,6 +123,7 @@
#include "public/web/WebPlugin.h"
#include "public/web/WebPluginAction.h"
#include "public/web/WebRange.h"
+#include "public/web/WebSelectionBound.h"
#include "public/web/WebTextInputInfo.h"
#include "public/web/WebViewClient.h"
#include "public/web/WebWindowFeatures.h"
@@ -1802,6 +1803,18 @@ void WebViewImpl::exitFullScreenForElement(WebCore::Element* element)
m_fullscreenController->exitFullScreenForElement(element);
}
+void WebViewImpl::clearCompositedSelectionBounds()
+{
+ if (m_layerTreeView)
+ m_layerTreeView->clearSelection();
+}
+
+void WebViewImpl::updateCompositedSelectionBounds(const WebSelectionBound& anchor, const WebSelectionBound& focus)
+{
+ if (m_layerTreeView)
+ m_layerTreeView->registerSelection(anchor, focus);
+}
+
bool WebViewImpl::hasHorizontalScrollbar()
{
return mainFrameImpl()->frameView()->horizontalScrollbar();
@@ -3908,7 +3921,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
ASSERT(m_layerTreeView);
// In threaded compositing mode, force compositing mode is always on so setIsAcceleratedCompositingActive(false)
// means that we're transitioning to a new page. Suppress commits until WebKit generates invalidations so
- // we don't attempt to paint too early in the next page load.
+
m_layerTreeView->setDeferCommits(true);
m_layerTreeViewCommitsDeferred = true;
}

Powered by Google App Engine
This is Rietveld 408576698