Chromium Code Reviews| Index: Source/core/html/HTMLInputElement.cpp |
| diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
| index 315c4b93e67247cacfb2357dc8cfde8bfe6b718c..7fe3d392271e24a31b36d4c7f622a6de63161bfe 100644 |
| --- a/Source/core/html/HTMLInputElement.cpp |
| +++ b/Source/core/html/HTMLInputElement.cpp |
| @@ -88,7 +88,6 @@ namespace WebCore { |
| using namespace HTMLNames; |
| -#if ENABLE(DATALIST_ELEMENT) |
| class ListAttributeTargetObserver : IdTargetObserver { |
| WTF_MAKE_FAST_ALLOCATED; |
| public: |
| @@ -100,7 +99,6 @@ private: |
| HTMLInputElement* m_element; |
| }; |
| -#endif |
| // FIXME: According to HTML4, the length attribute's value can be arbitrarily |
| // large. However, due to https://bugs.webkit.org/show_bug.cgi?id=14536 things |
| @@ -122,9 +120,7 @@ HTMLInputElement::HTMLInputElement(const QualifiedName& tagName, Document* docum |
| , m_isActivatedSubmit(false) |
| , m_autocomplete(Uninitialized) |
| , m_isAutofilled(false) |
| -#if ENABLE(DATALIST_ELEMENT) |
| , m_hasNonEmptyList(false) |
| -#endif |
| , m_stateRestored(false) |
| , m_parsingInProgress(createdByParser) |
| , m_valueAttributeWasUpdatedAfterParsing(false) |
| @@ -345,12 +341,10 @@ StepRange HTMLInputElement::createStepRange(AnyStepHandling anyStepHandling) con |
| return m_inputType->createStepRange(anyStepHandling); |
| } |
| -#if ENABLE(DATALIST_ELEMENT) |
| Decimal HTMLInputElement::findClosestTickMarkValue(const Decimal& value) |
| { |
| return m_inputType->findClosestTickMarkValue(value); |
| } |
| -#endif |
| void HTMLInputElement::stepUp(int n, ExceptionCode& ec) |
| { |
| @@ -701,7 +695,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr |
| HTMLTextFormControlElement::parseAttribute(name, value); |
| m_inputType->readonlyAttributeChanged(); |
| } |
|
tkent
2013/05/20 21:32:11
should be "} else if (..."
|
| -#if ENABLE(DATALIST_ELEMENT) |
| else if (name == listAttr) { |
| m_hasNonEmptyList = !value.isEmpty(); |
| if (m_hasNonEmptyList) { |
| @@ -710,7 +703,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr |
| } |
| UseCounter::count(document(), UseCounter::ListAttribute); |
| } |
| -#endif |
| #if ENABLE(INPUT_SPEECH) |
| else if (name == webkitspeechAttr) { |
| if (renderer()) { |
| @@ -1425,9 +1417,7 @@ Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* |
| HTMLTextFormControlElement::insertedInto(insertionPoint); |
| if (insertionPoint->inDocument() && !form()) |
| addToRadioButtonGroup(); |
| -#if ENABLE(DATALIST_ELEMENT) |
| resetListAttributeTargetObserver(); |
| -#endif |
| return InsertionDone; |
| } |
| @@ -1437,9 +1427,7 @@ void HTMLInputElement::removedFrom(ContainerNode* insertionPoint) |
| removeFromRadioButtonGroup(); |
| HTMLTextFormControlElement::removedFrom(insertionPoint); |
| ASSERT(!inDocument()); |
| -#if ENABLE(DATALIST_ELEMENT) |
| resetListAttributeTargetObserver(); |
| -#endif |
| } |
| void HTMLInputElement::didMoveToNewDocument(Document* oldDocument) |
| @@ -1489,7 +1477,6 @@ void HTMLInputElement::selectColorInColorChooser(const Color& color) |
| } |
| #endif |
| -#if ENABLE(DATALIST_ELEMENT) |
| HTMLElement* HTMLInputElement::list() const |
| { |
| return dataList(); |
| @@ -1524,7 +1511,6 @@ void HTMLInputElement::listAttributeTargetChanged() |
| { |
| m_inputType->listAttributeTargetChanged(); |
| } |
| -#endif // ENABLE(DATALIST_ELEMENT) |
| bool HTMLInputElement::isSteppable() const |
| { |
| @@ -1787,7 +1773,6 @@ void HTMLInputElement::setWidth(unsigned width) |
| setAttribute(widthAttr, String::number(width)); |
| } |
| -#if ENABLE(DATALIST_ELEMENT) |
| PassOwnPtr<ListAttributeTargetObserver> ListAttributeTargetObserver::create(const AtomicString& id, HTMLInputElement* element) |
| { |
| return adoptPtr(new ListAttributeTargetObserver(id, element)); |
| @@ -1803,7 +1788,6 @@ void ListAttributeTargetObserver::idTargetChanged() |
| { |
| m_element->listAttributeTargetChanged(); |
| } |
| -#endif |
| void HTMLInputElement::setRangeText(const String& replacement, ExceptionCode& ec) |
| { |
| @@ -1853,7 +1837,6 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters& |
| parameters.anchorRectInRootView = document()->view()->contentsToRootView(pixelSnappedBoundingBox()); |
| parameters.currentValue = value(); |
| parameters.isAnchorElementRTL = computedStyle()->direction() == RTL; |
| -#if ENABLE(DATALIST_ELEMENT) |
| if (HTMLDataListElement* dataList = this->dataList()) { |
| RefPtr<HTMLCollection> options = dataList->options(); |
| for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options->item(i)); ++i) { |
| @@ -1864,7 +1847,6 @@ bool HTMLInputElement::setupDateTimeChooserParameters(DateTimeChooserParameters& |
| parameters.suggestionLabels.append(option->value() == option->label() ? String() : option->label()); |
| } |
| } |
| -#endif |
| return true; |
| } |
| @@ -1876,9 +1858,7 @@ void HTMLInputElement::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) con |
| info.addMember(m_valueIfDirty, "valueIfDirty"); |
| info.addMember(m_suggestedValue, "suggestedValue"); |
| info.addMember(m_inputType, "inputType"); |
| -#if ENABLE(DATALIST_ELEMENT) |
| info.addMember(m_listAttributeTargetObserver, "listAttributeTargetObserver"); |
| -#endif |
| } |
| #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |