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

Unified Diff: Source/web/SpellCheckerClientImpl.cpp

Issue 189573002: Convert HTMLFrameOwnerElement and FocusController to use Frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve FocusController handling of RemoteFrames 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
Index: Source/web/SpellCheckerClientImpl.cpp
diff --git a/Source/web/SpellCheckerClientImpl.cpp b/Source/web/SpellCheckerClientImpl.cpp
index 224be4ec2ebb57d3c3771571734cdac93e55f4da..29b8364a587bf034b74c62fddf4baf6a3c117b4a 100644
--- a/Source/web/SpellCheckerClientImpl.cpp
+++ b/Source/web/SpellCheckerClientImpl.cpp
@@ -56,7 +56,7 @@ bool SpellCheckerClientImpl::shouldSpellcheckByDefault()
{
// Spellcheck should be enabled for all editable areas (such as textareas,
// contentEditable regions, designMode docs and inputs).
- const LocalFrame* frame = m_webView->focusedWebCoreFrame();
+ const LocalFrame* frame = toLocalFrame(m_webView->focusedWebCoreFrame());
if (!frame)
return false;
if (frame->spellChecker().isSpellCheckingEnabledInFocusedNode())
@@ -100,7 +100,7 @@ void SpellCheckerClientImpl::toggleContinuousSpellChecking()
}
} else {
m_spellCheckThisFieldStatus = SpellCheckForcedOn;
- if (LocalFrame* frame = m_webView->focusedWebCoreFrame()) {
+ if (LocalFrame* frame = toLocalFrame(m_webView->focusedWebCoreFrame())) {
VisibleSelection frameSelection = frame->selection().selection();
// If a selection is in an editable element spell check its content.
if (Element* rootEditableElement = frameSelection.rootEditableElement()) {
@@ -112,13 +112,13 @@ void SpellCheckerClientImpl::toggleContinuousSpellChecking()
bool SpellCheckerClientImpl::isGrammarCheckingEnabled()
{
- const LocalFrame* frame = m_webView->focusedWebCoreFrame();
+ const LocalFrame* frame = toLocalFrame(m_webView->focusedWebCoreFrame());
return frame && frame->settings() && (frame->settings()->asynchronousSpellCheckingEnabled() || frame->settings()->unifiedTextCheckerEnabled());
}
bool SpellCheckerClientImpl::shouldEraseMarkersAfterChangeSelection(TextCheckingType type) const
{
- const LocalFrame* frame = m_webView->focusedWebCoreFrame();
+ const LocalFrame* frame = toLocalFrame(m_webView->focusedWebCoreFrame());
return !frame || !frame->settings() || (!frame->settings()->asynchronousSpellCheckingEnabled() && !frame->settings()->unifiedTextCheckerEnabled());
}

Powered by Google App Engine
This is Rietveld 408576698