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

Unified Diff: Source/WebKit/chromium/src/WebSearchableFormData.cpp

Issue 16081007: Introduce toHTMLInputElement(Node*), and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/WebKit/chromium/src/WebPageSerializer.cpp ('k') | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebSearchableFormData.cpp
diff --git a/Source/WebKit/chromium/src/WebSearchableFormData.cpp b/Source/WebKit/chromium/src/WebSearchableFormData.cpp
index 8f0218fd3d9923c7f3ce9f554367fb69f01879a9..3f98fc3c531af24f8d679ffee72e9c218770a95f 100644
--- a/Source/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/Source/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -138,7 +138,7 @@ bool IsSelectInDefaultState(HTMLSelectElement* select)
bool IsInDefaultState(HTMLFormControlElement* formElement)
{
if (formElement->hasTagName(HTMLNames::inputTag)) {
- const HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(formElement);
+ const HTMLInputElement* inputElement = toHTMLInputElement(formElement);
if (inputElement->isCheckbox() || inputElement->isRadioButton())
return inputElement->checked() == inputElement->hasAttribute(checkedAttr);
} else if (formElement->hasTagName(HTMLNames::selectTag))
@@ -181,7 +181,7 @@ HTMLInputElement* findSuitableSearchInputElement(const HTMLFormElement* form)
// This form has multiple fields; don't treat it as searchable.
return 0;
}
- textElement = static_cast<HTMLInputElement*>(formElement);
+ textElement = toHTMLInputElement(formElement);
}
}
}
« no previous file with comments | « Source/WebKit/chromium/src/WebPageSerializer.cpp ('k') | Source/WebKit/chromium/src/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698