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

Side by Side Diff: Source/web/EditorClientImpl.cpp

Issue 33353003: Have Frame::tree() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.cpp ('k') | Source/web/StorageAreaProxy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple, Inc. All rights reserved.
3 * Copyright (C) 2012 Google, Inc. All rights reserved. 3 * Copyright (C) 2012 Google, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (m_spellCheckThisFieldStatus == SpellCheckForcedOn) 132 if (m_spellCheckThisFieldStatus == SpellCheckForcedOn)
133 return true; 133 return true;
134 return shouldSpellcheckByDefault(); 134 return shouldSpellcheckByDefault();
135 } 135 }
136 136
137 void EditorClientImpl::toggleContinuousSpellChecking() 137 void EditorClientImpl::toggleContinuousSpellChecking()
138 { 138 {
139 if (isContinuousSpellCheckingEnabled()) { 139 if (isContinuousSpellCheckingEnabled()) {
140 m_spellCheckThisFieldStatus = SpellCheckForcedOff; 140 m_spellCheckThisFieldStatus = SpellCheckForcedOff;
141 if (Page* page = m_webView->page()) { 141 if (Page* page = m_webView->page()) {
142 for (Frame* frame = page->mainFrame(); frame && frame->document(); f rame = frame->tree()->traverseNext()) { 142 for (Frame* frame = page->mainFrame(); frame && frame->document(); f rame = frame->tree().traverseNext()) {
143 frame->document()->markers()->removeMarkers(DocumentMarker::Miss pellingMarkers()); 143 frame->document()->markers()->removeMarkers(DocumentMarker::Miss pellingMarkers());
144 } 144 }
145 } 145 }
146 } else { 146 } else {
147 m_spellCheckThisFieldStatus = SpellCheckForcedOn; 147 m_spellCheckThisFieldStatus = SpellCheckForcedOn;
148 if (Frame* frame = m_webView->focusedWebCoreFrame()) { 148 if (Frame* frame = m_webView->focusedWebCoreFrame()) {
149 VisibleSelection frameSelection = frame->selection().selection(); 149 VisibleSelection frameSelection = frame->selection().selection();
150 // If a selection is in an editable element spell check its content. 150 // If a selection is in an editable element spell check its content.
151 if (Element* rootEditableElement = frameSelection.rootEditableElemen t()) { 151 if (Element* rootEditableElement = frameSelection.rootEditableElemen t()) {
152 frame->editor().didBeginEditing(rootEditableElement); 152 frame->editor().didBeginEditing(rootEditableElement);
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 #endif 693 #endif
694 } 694 }
695 695
696 void EditorClientImpl::willSetInputMethodState() 696 void EditorClientImpl::willSetInputMethodState()
697 { 697 {
698 if (m_webView->client()) 698 if (m_webView->client())
699 m_webView->client()->resetInputMethod(); 699 m_webView->client()->resetInputMethod();
700 } 700 }
701 701
702 } // namesace WebKit 702 } // namesace WebKit
OLDNEW
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.cpp ('k') | Source/web/StorageAreaProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698