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

Unified Diff: Source/core/editing/SpellChecker.cpp

Issue 196683003: Use new is*Element() helper functions more in editing code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/SpellChecker.cpp
diff --git a/Source/core/editing/SpellChecker.cpp b/Source/core/editing/SpellChecker.cpp
index 3f8cb4bb921b158d01dda6bf1a8bbd3095634c75..770ce9307d52dffff2280cf3f290ceaf1eaa96ca 100644
--- a/Source/core/editing/SpellChecker.cpp
+++ b/Source/core/editing/SpellChecker.cpp
@@ -55,7 +55,7 @@ namespace {
bool isSelectionInTextField(const VisibleSelection& selection)
{
HTMLTextFormControlElement* textControl = enclosingTextFormControl(selection.start());
- return textControl && textControl->hasTagName(inputTag) && toHTMLInputElement(textControl)->isTextField();
+ return isHTMLInputElement(textControl) && toHTMLInputElement(textControl)->isTextField();
}
} // namespace
@@ -128,7 +128,7 @@ void SpellChecker::didBeginEditing(Element* element)
HTMLTextFormControlElement* textControl = toHTMLTextFormControlElement(element);
parent = textControl;
element = textControl->innerTextElement();
- isTextField = textControl->hasTagName(inputTag) && toHTMLInputElement(textControl)->isTextField();
+ isTextField = isHTMLInputElement(*textControl) && toHTMLInputElement(*textControl).isTextField();
}
if (isTextField || !parent->isAlreadySpellChecked()) {
« no previous file with comments | « Source/core/editing/ReplaceSelectionCommand.cpp ('k') | Source/core/editing/TextIterator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698