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

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

Issue 14859003: Remove the compile time flag for DATALIST Element. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebasing after r150849 Created 7 years, 7 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/HTMLOptionElement.h ('k') | Source/core/html/HTMLTagNames.in » ('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 e689cd38b8651c4d3f70a81628c51fcaf5373997..8e81552cb60c72cabaa3f779f611bcef6dd148da 100644
--- a/Source/core/html/HTMLOptionElement.cpp
+++ b/Source/core/html/HTMLOptionElement.cpp
@@ -194,13 +194,10 @@ int HTMLOptionElement::index() const
void HTMLOptionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
{
-#if ENABLE(DATALIST_ELEMENT)
if (name == valueAttr) {
if (HTMLDataListElement* dataList = ownerDataListElement())
dataList->optionElementChildrenChanged();
- } else
-#endif
- if (name == disabledAttr) {
+ } else if (name == disabledAttr) {
bool oldDisabled = m_disabled;
m_disabled = !value.isNull();
if (oldDisabled != m_disabled) {
@@ -275,17 +272,13 @@ void HTMLOptionElement::setSelectedState(bool selected)
void HTMLOptionElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
{
-#if ENABLE(DATALIST_ELEMENT)
if (HTMLDataListElement* dataList = ownerDataListElement())
dataList->optionElementChildrenChanged();
- else
-#endif
- if (HTMLSelectElement* select = ownerSelectElement())
+ else if (HTMLSelectElement* select = ownerSelectElement())
select->optionElementChildrenChanged();
HTMLElement::childrenChanged(changedByParser, beforeChange, afterChange, childCountDelta);
}
-#if ENABLE(DATALIST_ELEMENT)
HTMLDataListElement* HTMLOptionElement::ownerDataListElement() const
{
for (ContainerNode* parent = parentNode(); parent ; parent = parent->parentNode()) {
@@ -294,7 +287,6 @@ HTMLDataListElement* HTMLOptionElement::ownerDataListElement() const
}
return 0;
}
-#endif
HTMLSelectElement* HTMLOptionElement::ownerSelectElement() const
{
« no previous file with comments | « Source/core/html/HTMLOptionElement.h ('k') | Source/core/html/HTMLTagNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698