Commit 38495995 authored by hs1217.lee's avatar hs1217.lee Committed by Commit bot

Implement disabledAttributeChanged() in HTMLInputElement.

when called disabledAttributeChanged() at of HTMLFieldSetElement,
call the m_inputTypeView->disabledAttributeChanged() for update at HTMLInputElement.

BUG=621870

Review-Url: https://codereview.chromium.org/2093383002
Cr-Commit-Position: refs/heads/master@{#402562}
parent 03b9d1bd
<!DOCTYPE html>
<body>
<form>
<fieldset id="a">
<input id="b" type="file">
<br />
<input id="c" type="submit">
</fieldset>
</form>
</body>
<!DOCTYPE html>
<html>
<body>
<form>
<fieldset id="a" disabled="true">
<input id="b" type="file" disabled="true">
<br />
<input id="c" type="submit" disabled="true">
</fieldset>
</form>
</body>
<script>
document.getElementById("b").removeAttribute("disabled");
document.getElementById("c").removeAttribute("disabled");
document.getElementById("a").removeAttribute("disabled");
</script>
</html>
...@@ -744,9 +744,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr ...@@ -744,9 +744,6 @@ void HTMLInputElement::parseAttribute(const QualifiedName& name, const AtomicStr
} else if (name == patternAttr) { } else if (name == patternAttr) {
setNeedsValidityCheck(); setNeedsValidityCheck();
UseCounter::count(document(), UseCounter::PatternAttribute); UseCounter::count(document(), UseCounter::PatternAttribute);
} else if (name == disabledAttr) {
HTMLTextFormControlElement::parseAttribute(name, oldValue, value);
m_inputTypeView->disabledAttributeChanged();
} else if (name == readonlyAttr) { } else if (name == readonlyAttr) {
HTMLTextFormControlElement::parseAttribute(name, oldValue, value); HTMLTextFormControlElement::parseAttribute(name, oldValue, value);
m_inputTypeView->readonlyAttributeChanged(); m_inputTypeView->readonlyAttributeChanged();
...@@ -1533,6 +1530,12 @@ void HTMLInputElement::requiredAttributeChanged() ...@@ -1533,6 +1530,12 @@ void HTMLInputElement::requiredAttributeChanged()
m_inputTypeView->requiredAttributeChanged(); m_inputTypeView->requiredAttributeChanged();
} }
void HTMLInputElement::disabledAttributeChanged()
{
HTMLTextFormControlElement::disabledAttributeChanged();
m_inputTypeView->disabledAttributeChanged();
}
void HTMLInputElement::selectColorInColorChooser(const Color& color) void HTMLInputElement::selectColorInColorChooser(const Color& color)
{ {
if (ColorChooserClient* client = m_inputType->colorChooserClient()) if (ColorChooserClient* client = m_inputType->colorChooserClient())
......
...@@ -351,6 +351,7 @@ private: ...@@ -351,6 +351,7 @@ private:
bool isRequiredFormControl() const final; bool isRequiredFormControl() const final;
bool recalcWillValidate() const final; bool recalcWillValidate() const final;
void requiredAttributeChanged() final; void requiredAttributeChanged() final;
void disabledAttributeChanged() final;
void updateTouchEventHandlerRegistry(); void updateTouchEventHandlerRegistry();
void initializeTypeInParsing(); void initializeTypeInParsing();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment