Form-associated custom elements: Support 'disabled' attribute behavior
Form-associated custom elements should support 'disabled' content attribute and <fieldset disabled> ancestors. It affects form submission, focusability, :disabled :enabled CSS selectors. Implementation: - HTMLElement::IsDisabledFormControl() is hooked to refer to ListedElement::IsActuallyDisabled(). This affects :disabled selector. - HTMLElement::MatchesEnabledPseudoClass() is hooked to support :enabled selector. - HTMLElement::AttributeChanged() handles 'disabled' attribute change. - HTMLElement::SupportsFocus() takes into account IsDisabledFormControl() - ElementInternals::AppendToFormData() aborts if IsDisabledFOrmControl(). - HTMLFieldSetElement should handle form-associated custom elements as well as HTMLFormControlElements. - Form-associated checks in ElementInternals is updated so that SetFormValue() and 'form' work in constructors. Note that 'disabledStateChangedCallback' will be implemented by a following CL. Bug: 905922 Bug: https://github.com/w3c/webcomponents/issues/187 Change-Id: If4a348b6f3fec5cd6faab6da04ac2de1c228caf7 Reviewed-on: https://chromium-review.googlesource.com/c/1354752Reviewed-by:Hayato Ito <hayato@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#612551}
Showing
Please register or sign in to comment