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

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

Issue 18970003: Introduce isHTMLOptGroupElement and toHTMLOptGroupElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLOptionElement.cpp
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp
index ab6269e21c235e6741347d974c1b7e43799a3ae0..39f3b7cd435cba01572a76db8bed7da1e5b0d4d3 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -34,6 +34,7 @@
#include "core/dom/ScriptLoader.h"
#include "core/dom/Text.h"
#include "core/html/HTMLDataListElement.h"
+#include "core/html/HTMLOptGroupElement.h"
#include "core/html/HTMLSelectElement.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/rendering/RenderTheme.h"
@@ -333,7 +334,7 @@ void HTMLOptionElement::didRecalcStyle(StyleChange)
String HTMLOptionElement::textIndentedToRespectGroupLabel() const
{
ContainerNode* parent = parentNode();
- if (parent && parent->hasTagName(optgroupTag))
+ if (parent && isHTMLOptGroupElement(parent))
return " " + text();
return text();
}
@@ -343,7 +344,7 @@ bool HTMLOptionElement::isDisabledFormControl() const
if (ownElementDisabled())
return true;
if (Element* parent = parentElement())
- return parent->hasTagName(optgroupTag) && parent->isDisabledFormControl();
+ return isHTMLOptGroupElement(parent) && parent->isDisabledFormControl();
return false;
}
« no previous file with comments | « Source/core/html/HTMLOptGroupElement.h ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698