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

Unified Diff: Source/web/SpellCheckerClientImpl.cpp

Issue 317493002: Change FrameTree to return Frames instead of LocalFrames. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed conflicts Created 6 years, 6 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 378616131f2d4271c584d5982baa592b98fa8047..ced145104b221cc0a792db48d86b393d9fbb9e47 100644
--- a/Source/web/SpellCheckerClientImpl.cpp
+++ b/Source/web/SpellCheckerClientImpl.cpp
@@ -96,8 +96,12 @@ void SpellCheckerClientImpl::toggleContinuousSpellChecking()
if (isContinuousSpellCheckingEnabled()) {
m_spellCheckThisFieldStatus = SpellCheckForcedOff;
if (Page* page = m_webView->page()) {
- for (LocalFrame* frame = page->mainFrame(); frame && frame->document(); frame = frame->tree().traverseNext()) {
- frame->document()->markers().removeMarkers(DocumentMarker::MisspellingMarkers());
+ for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (!frame->isLocalFrame())
+ continue;
+ if (!toLocalFrame(frame)->document())
+ break;
dcheng 2014/06/04 18:06:37 groby, is it intentional that we break out of the
dcheng 2014/06/04 18:12:29 I mean *null* document, sorry for the confusion.
groby-ooo-7-16 2014/06/04 18:28:14 I'm not 100% certain - This was written by pstanek
dcheng 2014/06/04 20:08:30 In general, I don't think this is a normal conditi
+ toLocalFrame(frame)->document()->markers().removeMarkers(DocumentMarker::MisspellingMarkers());
}
}
} else {

Powered by Google App Engine
This is Rietveld 408576698