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

Unified Diff: Source/web/ContextMenuClientImpl.cpp

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed a null check Created 6 years, 9 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 | « Source/core/testing/MockPagePopupDriver.cpp ('k') | Source/web/SpellCheckerClientImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ContextMenuClientImpl.cpp
diff --git a/Source/web/ContextMenuClientImpl.cpp b/Source/web/ContextMenuClientImpl.cpp
index 536d72cc8394da4ed3f34286fe866d8fb3246ffc..2610a3209a41ccd574e0519b9680a934a7795f05 100644
--- a/Source/web/ContextMenuClientImpl.cpp
+++ b/Source/web/ContextMenuClientImpl.cpp
@@ -195,17 +195,17 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
// Compute edit flags.
data.editFlags = WebContextMenuData::CanDoNone;
- if (m_webView->focusedWebCoreFrame()->editor().canUndo())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canUndo())
data.editFlags |= WebContextMenuData::CanUndo;
- if (m_webView->focusedWebCoreFrame()->editor().canRedo())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canRedo())
data.editFlags |= WebContextMenuData::CanRedo;
- if (m_webView->focusedWebCoreFrame()->editor().canCut())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canCut())
data.editFlags |= WebContextMenuData::CanCut;
- if (m_webView->focusedWebCoreFrame()->editor().canCopy())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canCopy())
data.editFlags |= WebContextMenuData::CanCopy;
- if (m_webView->focusedWebCoreFrame()->editor().canPaste())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canPaste())
data.editFlags |= WebContextMenuData::CanPaste;
- if (m_webView->focusedWebCoreFrame()->editor().canDelete())
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->editor().canDelete())
data.editFlags |= WebContextMenuData::CanDelete;
// We can always select all...
data.editFlags |= WebContextMenuData::CanSelectAll;
@@ -322,9 +322,9 @@ void ContextMenuClientImpl::showContextMenu(const WebCore::ContextMenu* defaultM
}
} else {
data.isSpellCheckingEnabled =
- m_webView->focusedWebCoreFrame()->spellChecker().isContinuousSpellCheckingEnabled();
+ toLocalFrame(m_webView->focusedWebCoreFrame())->spellChecker().isContinuousSpellCheckingEnabled();
// Spellchecking might be enabled for the field, but could be disabled on the node.
- if (m_webView->focusedWebCoreFrame()->spellChecker().isSpellCheckingEnabledInFocusedNode()) {
+ if (toLocalFrame(m_webView->focusedWebCoreFrame())->spellChecker().isSpellCheckingEnabledInFocusedNode()) {
data.misspelledWord = selectMisspelledWord(selectedFrame);
if (m_webView->spellCheckClient()) {
int misspelledOffset, misspelledLength;
« no previous file with comments | « Source/core/testing/MockPagePopupDriver.cpp ('k') | Source/web/SpellCheckerClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698