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

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

Issue 190633010: Use DEFINE_ELEMENT_TYPE_CASTS*() macros for Element subclasses (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/html/HTMLFrameOwnerElement.h ('k') | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLLegendElement.cpp
diff --git a/Source/core/html/HTMLLegendElement.cpp b/Source/core/html/HTMLLegendElement.cpp
index 20a6e8f6b60e5fa27fbc9245a8bff1f0009b2313..889056f495f2b9130250e76b60caab5bf743a4b1 100644
--- a/Source/core/html/HTMLLegendElement.cpp
+++ b/Source/core/html/HTMLLegendElement.cpp
@@ -57,13 +57,7 @@ HTMLFormControlElement* HTMLLegendElement::associatedControl()
// Find first form element inside the fieldset that is not a legend element.
// FIXME: Should we consider tabindex?
- Element* element = fieldset;
- while ((element = ElementTraversal::next(*element, fieldset))) {
- if (element->isFormControlElement())
- return toHTMLFormControlElement(element);
- }
-
- return 0;
+ return Traversal<HTMLFormControlElement>::next(*fieldset, fieldset);
}
void HTMLLegendElement::focus(bool, FocusType type)
« no previous file with comments | « Source/core/html/HTMLFrameOwnerElement.h ('k') | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698