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

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-18T17:22:32 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
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index 1d9d813b3e7548a845023376669094cb93df7d60..8ac7944bfbb02101b1bde149798faae64f38749e 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().didEndEditingOnTextField(*this);
+ }
}
bool HTMLInputElement::shouldUseInputMethod()
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/html/HTMLTextAreaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698