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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 72543005: Get rid of explict editor dependency from text field (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-11-15T16:10:10 Created 7 years, 1 month 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/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 68eee97068935b42507fd5c863eb823ed345e926..509e5452170676cbfd84df709f4631db335517c3 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -41,8 +41,8 @@
#include "core/dom/shadow/ElementShadow.h"
#include "core/dom/shadow/InsertionPoint.h"
#include "core/dom/shadow/ShadowRoot.h"
-#include "core/editing/Editor.h"
#include "core/editing/FrameSelection.h"
+#include "core/editing/SpellChecker.h"
#include "core/events/BeforeTextInsertedEvent.h"
#include "core/events/KeyboardEvent.h"
#include "core/events/MouseEvent.h"
@@ -65,6 +65,9 @@
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/html/shadow/ShadowElementNames.h"
#include "core/frame/UseCounter.h"
+#include "core/page/Chrome.h"
+#include "core/page/ChromeClient.h"
+#include "core/page/Page.h"
#include "core/rendering/RenderTextControlSingleLine.h"
#include "core/rendering/RenderTheme.h"
#include "platform/DateTimeChooser.h"
@@ -352,7 +355,7 @@ void HTMLInputElement::beginEditing()
return;
if (Frame* frame = document().frame())
- frame->editor().textAreaOrTextFieldDidBeginEditing(this);
+ frame->spellChecker().didBeginEditing(this);
}
void HTMLInputElement::endEditing()
@@ -360,8 +363,11 @@ void HTMLInputElement::endEditing()
if (!isTextField())
return;
- if (Frame* frame = document().frame())
- frame->editor().textFieldDidEndEditing(this);
+ if (Frame* frame = document().frame()) {
+ frame->spellChecker().didEndEditingOnTextField(this);
+ if (Page* page = frame->page())
+ page->chrome().client().textFieldDidEndEditing(this);
+ }
}
bool HTMLInputElement::shouldUseInputMethod()

Powered by Google App Engine
This is Rietveld 408576698