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

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

Issue 2797073002: Move WebTextCheckClient reference from WebViewImpl to WebLocalFrameImpl (Closed)
Patch Set: Tue Apr 4 20:53:35 PDT 2017 Created 3 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
Index: third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
index 2d7e195b4f11ef323288bce29fe11fcd1e3d3aa7..e4f6b57e5df96ac680c9c9e3326535070ed80d42 100644
--- a/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
@@ -157,6 +157,8 @@ bool ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu,
r.setToShadowHostIfInRestrictedShadowRoot();
LocalFrame* selectedFrame = r.innerNodeFrame();
+ WebLocalFrameImpl* selectedWebFrame =
+ WebLocalFrameImpl::fromFrame(selectedFrame);
WebContextMenuData data;
data.mousePosition = selectedFrame->view()->contentsToViewport(
@@ -327,9 +329,9 @@ bool ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu,
Vector<String> suggestions;
description.split('\n', suggestions);
data.dictionarySuggestions = suggestions;
- } else if (m_webView->textCheckClient()) {
+ } else if (selectedWebFrame->textCheckClient()) {
int misspelledOffset, misspelledLength;
- m_webView->textCheckClient()->checkSpelling(
+ selectedWebFrame->textCheckClient()->checkSpelling(
data.misspelledWord, misspelledOffset, misspelledLength,
&data.dictionarySuggestions);
}
@@ -389,8 +391,6 @@ bool ContextMenuClientImpl::showContextMenu(const ContextMenu* defaultMenu,
if (fromTouch && !shouldShowContextMenuFromTouch(data))
return false;
- WebLocalFrameImpl* selectedWebFrame =
- WebLocalFrameImpl::fromFrame(selectedFrame);
selectedWebFrame->setContextMenuNode(r.innerNodeOrImageMapImage());
if (!selectedWebFrame->client())
return false;

Powered by Google App Engine
This is Rietveld 408576698