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

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

Issue 195813003: Use new is*Element() helper functions further more in HTML code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix bad assertion 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
Index: Source/core/html/HTMLLegendElement.cpp
diff --git a/Source/core/html/HTMLLegendElement.cpp b/Source/core/html/HTMLLegendElement.cpp
index 889056f495f2b9130250e76b60caab5bf743a4b1..858578d812f79483110e8a93fda24ca6f7370fd0 100644
--- a/Source/core/html/HTMLLegendElement.cpp
+++ b/Source/core/html/HTMLLegendElement.cpp
@@ -50,7 +50,7 @@ HTMLFormControlElement* HTMLLegendElement::associatedControl()
{
// Check if there's a fieldset belonging to this legend.
Element* fieldset = parentElement();
- while (fieldset && !fieldset->hasTagName(fieldsetTag))
+ while (fieldset && !isHTMLFieldSetElement(*fieldset))
fieldset = fieldset->parentElement();
if (!fieldset)
return 0;
@@ -82,7 +82,7 @@ HTMLFormElement* HTMLLegendElement::form() const
// its parent, then the form attribute must return the same value as the
// form attribute on that fieldset element. Otherwise, it must return null.
ContainerNode* fieldset = parentNode();
- if (!fieldset || !fieldset->hasTagName(fieldsetTag))
+ if (!isHTMLFieldSetElement(fieldset))
return 0;
return toHTMLFieldSetElement(fieldset)->formOwner();

Powered by Google App Engine
This is Rietveld 408576698