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

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

Issue 17381010: Introduce toHTMLFormControlElement, and use it. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase 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/core/accessibility/AccessibilityNodeObject.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FrameSelection.cpp
diff --git a/Source/core/editing/FrameSelection.cpp b/Source/core/editing/FrameSelection.cpp
index f15e997a27ccfdb6fe8bd4087586884829171daf..6414c4db61ddcbe640572c0dd43b5aa0e52041fd 100644
--- a/Source/core/editing/FrameSelection.cpp
+++ b/Source/core/editing/FrameSelection.cpp
@@ -1963,7 +1963,7 @@ static HTMLFormElement* scanForForm(Node* start)
if (element->hasTagName(formTag))
return static_cast<HTMLFormElement*>(element);
if (element->isHTMLElement() && toHTMLElement(element)->isFormControlElement())
- return static_cast<HTMLFormControlElement*>(element)->form();
+ return toHTMLFormControlElement(element)->form();
if (element->hasTagName(frameTag) || element->hasTagName(iframeTag)) {
Node* childDocument = static_cast<HTMLFrameElementBase*>(element)->contentDocument();
if (HTMLFormElement* frameResult = scanForForm(childDocument))
@@ -1987,7 +1987,7 @@ HTMLFormElement* FrameSelection::currentForm() const
if (node->hasTagName(formTag))
return static_cast<HTMLFormElement*>(node);
if (node->isHTMLElement() && toHTMLElement(node)->isFormControlElement())
- return static_cast<HTMLFormControlElement*>(node)->form();
+ return toHTMLFormControlElement(node)->form();
}
// Try walking forward in the node tree to find a form element.
« no previous file with comments | « Source/core/accessibility/AccessibilityNodeObject.cpp ('k') | Source/core/html/HTMLFieldSetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698