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

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: Fix PDF print dialog tests. 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
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..81074b2ea4c02229431b87e1df393e365b0fe6fd 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();
bokan 2016/08/11 14:14:06 I don't think `auto` helps in these cases. My read
wjmaclean 2016/08/11 14:35:06 Done.
+ 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();
+ auto client = WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()->client();
+ if (!client)
+ return;
+
+ auto layerTreeView = client->layerTreeView();
+ if (layerTreeView)
+ layerTreeView->registerSelection(WebSelection(selection));
}
bool ChromeClientImpl::hasOpenedPopup() const

Powered by Google App Engine
This is Rietveld 408576698