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

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

Issue 2797073002: Move WebTextCheckClient reference from WebViewImpl to WebLocalFrameImpl (Closed)
Patch Set: Spell my name correctly 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 a174450cdb46faeb774edb74b276068a11a5bb25..032fe492afb8cc40b6f3683ded2346a99eda1b84 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(
@@ -326,9 +328,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);
}
@@ -388,8 +390,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;
« no previous file with comments | « content/shell/test_runner/web_test_runner.h ('k') | third_party/WebKit/Source/web/TextCheckerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698