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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2230993002: Refactor composited selection code out of WebViewImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use single localFrame clearing. Created 4 years, 4 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 | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 1c2e7784d2bde4cddf3a0c06d41c1d99231a2e2a..a419836a15b2f6fc9875f53c84e1b0189ab0cd4e 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -825,14 +825,28 @@ void ChromeClientImpl::exitFullScreenForElement(Element* element)
m_webView->exitFullScreenForElement(element);
}
-void ChromeClientImpl::clearCompositedSelection()
+void ChromeClientImpl::clearCompositedSelection(LocalFrame* frame)
{
- m_webView->clearCompositedSelection();
+ LocalFrame* localRoot = frame->localFrameRoot();
+ auto client = WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()->client();
+ if (!client)
+ return;
+
+ auto layerTreeView = client->layerTreeView();
+ if (layerTreeView)
+ layerTreeView->clearSelection();
}
-void ChromeClientImpl::updateCompositedSelection(const CompositedSelection& selection)
+void ChromeClientImpl::updateCompositedSelection(LocalFrame* frame, const CompositedSelection& selection)
{
- m_webView->updateCompositedSelection(WebSelection(selection));
+ LocalFrame* localRoot = frame->localFrameRoot();
+ WebWidgetClient* client = WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()->client();
+ if (!client)
+ return;
+
+ WebLayerTreeView* layerTreeView = client->layerTreeView();
+ if (layerTreeView)
+ layerTreeView->registerSelection(WebSelection(selection));
}
bool ChromeClientImpl::hasOpenedPopup() const
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698