New issue
Advanced search Search tips
Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 3
Type: Feature



Sign in to add a comment
link

Issue 905922: Implement form-associated custom elements

Reported by tkent@chromium.org, Nov 16 Project Member

Issue description

Comment 1 by bugdroid1@chromium.org, Nov 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6256f554e028732d5ac3cf0eaa9fbb40daea37f7

commit 6256f554e028732d5ac3cf0eaa9fbb40daea37f7
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Nov 16 09:02:44 2018

Form-associated custom elements: Implement 'disabledFeatures' static field.

CustomElementDefinition::disable_internals_ is initialized with the
content of 'disabledFeatures'.

This code is behind 'ElementInternals' runtime flag, and this CL doesn't
have user-visible behavior changes yet.

Bug: 905922
Change-Id: I9755835079cb71f34317a74a76cf4ac9486df60d
Reviewed-on: https://chromium-review.googlesource.com/c/1339500
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608701}
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.h
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.h
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/core/html/custom/custom_element_registry_test.cc
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
[modify] https://crrev.com/6256f554e028732d5ac3cf0eaa9fbb40daea37f7/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 2 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/165c8900c953f1bae6f8fb2d0b548ed4f11d4032

commit 165c8900c953f1bae6f8fb2d0b548ed4f11d4032
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Nov 19 10:39:57 2018

Form-associated custom elements: Implement HTMLElement.prototype.attachInternals().

- Introduce empty ElementInternals interface
- Add HTMLElement.prototype.attachInternals()
- Add a flag to ElementRareData about ElementInternals attachment
- Promote "ElementInternals" runtime flag to "test"

All the change is behind the runtime flag.
Some test cases in external/wpt/custom-elements/CustomElementRegistry.html
fail by this CL because this CL enables GET() operation for "disabledFeatures",
and these test cases doesn't expect it.  We should update the testcases later.


Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/758
Change-Id: I7b3dbfd1d422c7eae5c7a6e01ddea50a00134a6e
Reviewed-on: https://chromium-review.googlesource.com/c/1341734
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609231}
[add] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/WebKit/LayoutTests/custom-elements/tentative/HTMLElement-attachInternals.html
[add] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/WebKit/LayoutTests/external/wpt/custom-elements/CustomElementRegistry-expected.txt
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/dom/element_rare_data.cc
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/dom/element_rare_data.h
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/BUILD.gn
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[add] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/custom/element_internals.cc
[add] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/custom/element_internals.h
[add] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/custom/element_internals.idl
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/html_element.h
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/core/html/html_element.idl
[modify] https://crrev.com/165c8900c953f1bae6f8fb2d0b548ed4f11d4032/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 3 by bugdroid1@chromium.org, Nov 22

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185

commit 4f2dd5e4ebc124d19a7ef9a3482a7f679909a185
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Nov 22 10:19:31 2018

Form-associated custom elements: customElements.define() retrieves information for form-associated custom elements.

customElements.define() retrieves 'formAssociated',
'formAssociatedCallback', and 'disabledStateChangedCallback' from the
specified constructor and its prototype.

ScriptCustomElementDefinitionBuilder is responsible for the retrieval,
and ScriptCustomElementDefinition and CustomElementDefinition store the
information.

Introduce a new runtime flag 'FormAssociatedCustomElements', and
'ElementInternals' flag is enabled by it.

The new behavior is behind the runtime flag.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ibb4fef33a278a24a58af658983eb2387fb8efcdd
Reviewed-on: https://chromium-review.googlesource.com/c/1343468
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610361}
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/WebKit/LayoutTests/external/wpt/custom-elements/CustomElementRegistry-expected.txt
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.h
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.h
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/core/html/custom/custom_element_registry.idl
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
[modify] https://crrev.com/4f2dd5e4ebc124d19a7ef9a3482a7f679909a185/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 4 by bugdroid1@chromium.org, Nov 22

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/692edc281b8181f238b223bfcc3ed3a9a3eb3608

commit 692edc281b8181f238b223bfcc3ed3a9a3eb3608
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Nov 22 11:28:27 2018

Form-associated custom elements: Implement form association behavior

User-visible changes:
 - ElementInternals interface has |form| IDL attribute
 - form.elements and fieldset.elements contain form-associated custom elements

Implementation:

 - ElementInternals inherits from ListedElement, which has logic and data for
  form-association.
  A form-associated custom element requires an ElementInternals instance
  regardless of calling HTMLElement.prototype.attachInternals().
  ElementInternals is created on demand, and is stored in ElementRareData.

 - Hook CustomElementDefinition::Upgrade to handle form association and
  HTMLCollection invalidation.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ic7828741c112c3c7339eee43b814d23ff706818b
Reviewed-on: https://chromium-review.googlesource.com/c/1347950
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610380}
[add] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/WebKit/LayoutTests/custom-elements/tentative/form-association.html
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/dom/element.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/dom/element.h
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/dom/element_rare_data.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/dom/element_rare_data.h
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/custom/custom_element_definition.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/custom/element_internals.idl
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/forms/html_form_element.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/html_collection.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/692edc281b8181f238b223bfcc3ed3a9a3eb3608/third_party/blink/renderer/core/html/html_element.h

Comment 5 by bugdroid1@chromium.org, Nov 27

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f

commit 4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Nov 27 15:08:44 2018

Form-associated custom elements: Implement ElementInternals.prototype.setFormValue().

Add setFormValue() implementation to blink::ElementInternals, and it
also overrides ListElement::AppendToFormData().

Tests:
- custom-elements/form-submission-file.html
  This won't be merged to WPT because this test uses a Mojo interface mock.
- custom-elements/tentative/form-submission.html
  This will be merged to WPT.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I1d28d1d5e8c2c412e7db18a0b39eb9d517054c04
Reviewed-on: https://chromium-review.googlesource.com/c/1350418
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611111}
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/renderer/core/html/custom/element_internals.idl
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/renderer/core/html/forms/form_data.cc
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/renderer/core/html/forms/form_data.h
[add] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/web_tests/custom-elements/form-submission-file.html
[add] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/web_tests/custom-elements/tentative/form-submission.html
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/web_tests/fast/forms/resources/mock-file-chooser.js
[modify] https://crrev.com/4a5b059df2cbcc26b9f4586f8ad8ee37bf5d101f/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

Comment 6 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71193ebe67ba11851490929f2e66d1bfc6bda25b

commit 71193ebe67ba11851490929f2e66d1bfc6bda25b
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Nov 28 07:28:38 2018

Form-associated custom elements: Implement formAssociatedCallback

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I979d51cdf399d78aa51b2d5692b7e93df3461410
Reviewed-on: https://chromium-review.googlesource.com/c/1353029
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611585}
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/BUILD.gn
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/custom_element.cc
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/custom_element.h
[add] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/custom_element_form_associated_callback_reaction.cc
[add] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/custom_element_form_associated_callback_reaction.h
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/71193ebe67ba11851490929f2e66d1bfc6bda25b/third_party/blink/web_tests/custom-elements/tentative/form-association.html

Comment 7 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34bc581ecd880d2fcfc7985a09007955681de02c

commit 34bc581ecd880d2fcfc7985a09007955681de02c
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Nov 29 00:36:23 2018

Form-associated custom elements: Add more state checks

 - HTMLElement.prototype.attachInternals() should throw InvalidStateErrors
   for customized built-in elements.
 - Form-related operations and attributes of ElementInternals should throw
   InvalidStateErrors for non-form-associated custom elements.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I09e574a843296b236fe4c63eb2cd0912c7a673b1
Reviewed-on: https://chromium-review.googlesource.com/c/1353035
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611960}
[modify] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/renderer/core/html/custom/element_internals.idl
[modify] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/renderer/core/html/html_element.cc
[add] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/web_tests/custom-elements/tentative/ElementInternals.html
[modify] https://crrev.com/34bc581ecd880d2fcfc7985a09007955681de02c/third_party/blink/web_tests/custom-elements/tentative/HTMLElement-attachInternals.html

Comment 8 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/784f74e85fada2c74145d9fe97f9c39e6df35cd6

commit 784f74e85fada2c74145d9fe97f9c39e6df35cd6
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Nov 29 04:08:24 2018

Form-associated custom elements: Refactor 'disabled' state handling code

Move 'disabled' state handling code from HTMLFormControlElement to
ListedElement. This is a preparation to support 'disabledStateChangedCallback'
of form-associated custom elmeents.

This CL has no behavior changes.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I34703dd7b167be13e4b19324b5e931bda224a866
Reviewed-on: https://chromium-review.googlesource.com/c/1353039
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612032}
[modify] https://crrev.com/784f74e85fada2c74145d9fe97f9c39e6df35cd6/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
[modify] https://crrev.com/784f74e85fada2c74145d9fe97f9c39e6df35cd6/third_party/blink/renderer/core/html/forms/html_form_control_element.h
[modify] https://crrev.com/784f74e85fada2c74145d9fe97f9c39e6df35cd6/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/784f74e85fada2c74145d9fe97f9c39e6df35cd6/third_party/blink/renderer/core/html/forms/listed_element.h

Comment 9 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faf7d127540ae5205ac30e4c5e8b8501d7e92619

commit faf7d127540ae5205ac30e4c5e8b8501d7e92619
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Nov 30 03:55:44 2018

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/1354752
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612551}
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/forms/html_field_set_element.cc
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/renderer/core/html/html_element.h
[add] https://crrev.com/faf7d127540ae5205ac30e4c5e8b8501d7e92619/third_party/blink/web_tests/custom-elements/tentative/form-associated-disabled.html

Comment 10 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d56736164abe8b62c1423354c0e4300e957069b

commit 0d56736164abe8b62c1423354c0e4300e957069b
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Nov 30 05:48:31 2018

Form-associated custom elements: Fix an issue about 'form' content attribute change

Updating 'form' attribute didn't update the element's owner <form>.
HTMLElement should call ListedElement::FormAttributeChanged() when 'form'
content attribute is changed.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Iec16f0c40290fda963c2a8c863ea8925f3a154b3
Reviewed-on: https://chromium-review.googlesource.com/c/1356174
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612577}
[modify] https://crrev.com/0d56736164abe8b62c1423354c0e4300e957069b/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/0d56736164abe8b62c1423354c0e4300e957069b/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/0d56736164abe8b62c1423354c0e4300e957069b/third_party/blink/renderer/core/html/html_element.h
[modify] https://crrev.com/0d56736164abe8b62c1423354c0e4300e957069b/third_party/blink/web_tests/custom-elements/tentative/form-association.html

Comment 11 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35c4f91e70d3971819dfce2611b3ee2418c4f621

commit 35c4f91e70d3971819dfce2611b3ee2418c4f621
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Nov 30 09:57:58 2018

Fold LabelableElement into HTMLElement

HTMLElement::IsLabelable meant "this is a LabelableElement", and
now supersedes LabelableElement::SupportLabels.

This CL is a preparation to add support of <label> and 'labels' IDL
attribute to form-associated custom elements.

This CL has no behavior changes.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I93868364d754df1b43b8269e539c29e29ab8e563
Reviewed-on: https://chromium-review.googlesource.com/c/1356177
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612604}
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/exported/web_label_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/BUILD.gn
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_button_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_form_control_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_input_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_input_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_label_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_label_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_output_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_select_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/html_text_area_element.h
[delete] https://crrev.com/22005d62a4c46b57109f28a697e6a4769510ccdc/third_party/blink/renderer/core/html/forms/labelable_element.cc
[delete] https://crrev.com/22005d62a4c46b57109f28a697e6a4769510ccdc/third_party/blink/renderer/core/html/forms/labelable_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/forms/labels_node_list.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_meter_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_meter_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_progress_element.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/core/html/html_progress_element.h
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
[modify] https://crrev.com/35c4f91e70d3971819dfce2611b3ee2418c4f621/third_party/blink/renderer/modules/accessibility/ax_relation_cache.cc

Comment 12 by bugdroid1@chromium.org, Dec 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/108ea5aad23abd9b8bb297c2cd99f81df18a3394

commit 108ea5aad23abd9b8bb297c2cd99f81df18a3394
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Dec 03 08:22:45 2018

Move validation-related code from HTMLFormControlElement to ListedElement

This is a preparation to support validation in form-associated custom elements.
This CL has no behavior changes.

This CL also does:
 - Rename SetNeedsWillValidateCheck() to UpdateWillValidateCache() to match
   to the reality
 - Change a checkValidity() argument from |HeapVector<Member<
   HTMLFormControlElement>>| to |HeapVector<Member<ListedElement>>|, which is
   typedefed as |ListedElement::List|

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I0a97ae7eb85406eb0160c9bffa0568440c554a7e
Reviewed-on: https://chromium-review.googlesource.com/c/1358116
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613021}
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_button_element.cc
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_form_control_element.cc
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_form_control_element.h
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_form_element.cc
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_form_element.h
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/html_input_element.cc
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/108ea5aad23abd9b8bb297c2cd99f81df18a3394/third_party/blink/renderer/modules/accessibility/ax_node_object.cc

Comment 13 by bugdroid1@chromium.org, Dec 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ee8020b5ff6a2c3911fc78a8eda80ad04409caa6

commit ee8020b5ff6a2c3911fc78a8eda80ad04409caa6
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Dec 04 05:14:07 2018

Upgrade "FormAssociatedCustomElements" feature to "experimental" state

The feature is workable though it lacks some parts.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I402ed974a7cfaa3a1bcdcd59db830219e0e4d1d4
Reviewed-on: https://chromium-review.googlesource.com/c/1360212
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613427}
[modify] https://crrev.com/ee8020b5ff6a2c3911fc78a8eda80ad04409caa6/third_party/blink/renderer/platform/runtime_enabled_features.json5

Comment 14 by bugdroid1@chromium.org, Dec 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3f610bc020c876ddb1d31f7037e8890cc986488

commit c3f610bc020c876ddb1d31f7037e8890cc986488
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Dec 04 10:48:21 2018

Form-associated custom elements: customElements.define() should check existence of 'value' property setter.

https://docs.google.com/document/d/1JO8puctCSpW-ZYGU8lF-h4FWRIDQNDVexzHoOQ2iQmY/edit?pli=1#heading=h.nutlnit4n3sm

This behavior change is behind a runtime flag.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ib277279863a7734ac90f8fac1cfdfc4731b757dd
Reviewed-on: https://chromium-review.googlesource.com/c/1359994
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613499}
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.h
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/core/html/custom/custom_element_registry.idl
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/platform/bindings/callback_method_retriever.cc
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/renderer/platform/bindings/callback_method_retriever.h
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/web_tests/custom-elements/tentative/form-associated-disabled.html
[modify] https://crrev.com/c3f610bc020c876ddb1d31f7037e8890cc986488/third_party/blink/web_tests/custom-elements/tentative/form-association.html

Comment 15 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261

commit e8aaff57eaa130b2a7cdc1ce68328ad113a9e261
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Dec 05 03:18:54 2018

Form-associated custom elements: Implement form-validation

This CL adds the followings to ElementInternals:
 - validationMessage attribute
 - validity attribute
 - willValidate attribute
 - checkValidity() operation
 - reportValidity() operation
 - setValidity() operation

The first five are same as existing IDL attributes/operations of form
control elements though they have additional form-associated custom
elements checks.
setValidity() makes it possible to change validity state of a
form-associated custom element.

This CL also enables :valid :invalid CSS selectors for form-associated
custom elements, and FORM/FIELDSET ancestors take into account of
form-associated custom elements.

* Implementation
 - New attributes/operations of ElementInternals use ListedElement
  methods.
 - As for setValidity(), an ElementInternals keeps a ValidityStateFlags
  instance.
 - ElementInternals overrides callbacks for ValidityState.
 - HTMLFieldSetElmeent and HTMLFormElement: we need to update code so
  that it supports form-associated custom elements as well as
  HTMLFormControlElement.
 - HTMLElement overrides MatchesValidityPseudoClasses() and
  IsValidElement() to support :valid :invalid selectors.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I0c7e27c9c02286c455a4c63348462794ea5d7b39
Reviewed-on: https://chromium-review.googlesource.com/c/1358320
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613843}
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/core_idl_files.gni
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/custom/element_internals.idl
[add] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/custom/validity_state_flags.idl
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/forms/html_field_set_element.cc
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/forms/html_form_element.cc
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/renderer/core/html/html_element.h
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/web_tests/custom-elements/tentative/ElementInternals.html
[add] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/web_tests/custom-elements/tentative/form-validation.html
[modify] https://crrev.com/e8aaff57eaa130b2a7cdc1ce68328ad113a9e261/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

Comment 16 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f816475e9349b34f84fec4200f1af73be76369d4

commit f816475e9349b34f84fec4200f1af73be76369d4
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Dec 05 05:04:18 2018

Form-associated custom elements: Implement <label> association.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Id32b997df7e97d3f5d13dfaa9fc0d3dbf53a20c6
Reviewed-on: https://chromium-review.googlesource.com/c/1360813
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613871}
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/custom/element_internals.idl
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/forms/html_label_element.cc
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/html_element.cc
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/renderer/core/html/html_element.h
[add] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/web_tests/custom-elements/tentative/form-label.html
[modify] https://crrev.com/f816475e9349b34f84fec4200f1af73be76369d4/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt

Comment 17 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d9ed6e49bcf8bae2c29965935fbebb7b771f327

commit 2d9ed6e49bcf8bae2c29965935fbebb7b771f327
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Dec 05 08:13:17 2018

Form-associated custom elements: Implement disabledStateChangedCallback

ElementInternals caches the 'disabled' state, and enqueues callback
reactions when the state is changed.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ib9ef98a7d67f6d99efc4c0587ad5e57dac3f7e58
Reviewed-on: https://chromium-review.googlesource.com/c/1360910
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613904}
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/BUILD.gn
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/custom_element.cc
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/custom_element.h
[add] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/custom_element_disabled_state_changed_callback_reaction.cc
[add] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/custom_element_disabled_state_changed_callback_reaction.h
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/renderer/core/html/forms/listed_element.h
[modify] https://crrev.com/2d9ed6e49bcf8bae2c29965935fbebb7b771f327/third_party/blink/web_tests/custom-elements/tentative/form-associated-disabled.html

Comment 18 by bugdroid1@chromium.org, Dec 6

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193

commit 2e6eb70fa0fe55992e61f7b0dc3179f9cd844193
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Dec 06 14:18:41 2018

Form-associated custom elements: Fix missing validation bubble

- Override validationMessage() and ValidationSubMessage() to return
  correct strings

- ValidationMessaeClientImpl doesn't reject display:inline anchor
  elements.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ie743d6018bb38f30db0b8624a6313519dd5737f4
Reviewed-on: https://chromium-review.googlesource.com/c/1365108
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614334}
[modify] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/renderer/core/html/custom/element_internals.h
[modify] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/renderer/core/page/validation_message_client_impl.cc
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/custom-elements/form-validation-bubble-appearance-expected.txt
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/custom-elements/form-validation-bubble-appearance.html
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/linux/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/mac-mac10.10/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/mac-mac10.11/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/mac-mac10.12/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/mac/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/win/custom-elements/form-validation-bubble-appearance-expected.png
[add] https://crrev.com/2e6eb70fa0fe55992e61f7b0dc3179f9cd844193/third_party/blink/web_tests/platform/win7/custom-elements/form-validation-bubble-appearance-expected.png

Comment 19 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9aadea2b2c22ea9fa6dda5cfd53af577e6e193b6

commit 9aadea2b2c22ea9fa6dda5cfd53af577e6e193b6
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Dec 11 12:19:23 2018

Form-associated custom elements: customElements.define() should check existence of 'value' property setter on a prototype chain

This is a follow-up of crrev.com/613499.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I0c364d1f3031dde063d40867b5b93cde8a4bdc0e
Reviewed-on: https://chromium-review.googlesource.com/c/1370240
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615497}
[modify] https://crrev.com/9aadea2b2c22ea9fa6dda5cfd53af577e6e193b6/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/9aadea2b2c22ea9fa6dda5cfd53af577e6e193b6/third_party/blink/web_tests/custom-elements/tentative/form-association.html

Comment 20 by bugdroid1@chromium.org, Jan 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0805511ab23978fb01c669467fd5d2ce0b1140d0

commit 0805511ab23978fb01c669467fd5d2ce0b1140d0
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Jan 07 05:34:06 2019

Form-associated custom elements: setFormValue with an empty FormData should submit nothing

UA should provide a way to specify "send nothing".

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: Ia8cb2c4c4eac5a049c2825b26705d668b60f2d08
Reviewed-on: https://chromium-review.googlesource.com/c/1396015
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620254}
[modify] https://crrev.com/0805511ab23978fb01c669467fd5d2ce0b1140d0/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/0805511ab23978fb01c669467fd5d2ce0b1140d0/third_party/blink/web_tests/custom-elements/tentative/form-submission.html

Comment 21 by bugdroid1@chromium.org, Jan 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faaacd85f36af95984254680a45552f1e43cde28

commit faaacd85f36af95984254680a45552f1e43cde28
Author: Kent Tamura <tkent@chromium.org>
Date: Mon Jan 07 05:40:53 2019

Form-associated custom elements: Add a 'name' attribute to a test case

In the test case, we'd like to test if a 'name' attribute on a custom
element is ignored. However it had no 'name' attribute.  This CL adds
it.

Bug: 905922
Change-Id: Id8eca7cd5be14a2a334a08bbc20380ef60192ba2
Reviewed-on: https://chromium-review.googlesource.com/c/1395866
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620255}
[modify] https://crrev.com/faaacd85f36af95984254680a45552f1e43cde28/third_party/blink/web_tests/custom-elements/tentative/form-submission.html

Comment 22 by bugdroid1@chromium.org, Jan 10

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651

commit d1a9e16e38225d64c99b9b42c2d8d06f2d50f651
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Jan 10 09:26:29 2019

Form-associated custom elements: Implement formResetCallback

Form reset is invoked via two paths.

* HTMLFormElement.prototype.reset()
* Activation behavior of <input type=reset> and <button type=reset>

The callback enqueued by CustomElement::EnqueueFormResetCallback() will
be invoked at

* CEReactions epilogue for the former
* A microtask dispatched by "enqueue an element on the appropriate
  element queue" [1]

[1] https://html.spec.whatwg.org/multipage/custom-elements.html#enqueue-an-element-on-the-appropriate-element-queue

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I9be604cc5893db69ac1bc0e02e4283e6f45086bd
Reviewed-on: https://chromium-review.googlesource.com/c/1404548
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621518}
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_data.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element.cc
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element_reaction_factory.cc
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element_reaction_factory.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
[modify] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/renderer/core/html/forms/html_form_element.cc
[add] https://crrev.com/d1a9e16e38225d64c99b9b42c2d8d06f2d50f651/third_party/blink/web_tests/custom-elements/tentative/form-associated-reset.html

Comment 23 by bugdroid1@chromium.org, Jan 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f2339a925d6db554833bd7d148374ee7930b107c

commit f2339a925d6db554833bd7d148374ee7930b107c
Author: Kent Tamura <tkent@chromium.org>
Date: Tue Jan 15 08:48:25 2019

form-associated custom elements: Change mandatory 'value' setter to 'restoreValueCallback' callback.

It was changed due to
https://github.com/w3c/webcomponents/issues/187#issuecomment-450105076

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/187
Change-Id: I88952ca5f0aa7d3f48cb2161e5e1d2257e66dfad
Reviewed-on: https://chromium-review.googlesource.com/c/1405951
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622784}
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/renderer/bindings/core/v8/BUILD.gn
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.h
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_data.h
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/renderer/core/html/custom/custom_element_registry.idl
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/form-submission-file.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/form-validation-bubble-appearance.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-associated-disabled.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-associated-reset.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-association.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-label.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-submission.html
[modify] https://crrev.com/f2339a925d6db554833bd7d148374ee7930b107c/third_party/blink/web_tests/custom-elements/tentative/form-validation.html

Comment 24 by bugdroid1@chromium.org, Jan 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976

commit 7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jan 16 02:50:22 2019

blink::DocumentState doesn't use DoublyLinkedList for form_controls_.

Stop using DoublyLinkedList for form_controls_, and stop applying
DoublyLinkedListNode to HTMLFormControlElementWithState. Instead,
DocumentState creates a list of HTMLFormControlElementWithState
on demand, and caches it.

This CL is a preparation to support state restoring for form-associated
custom elements, which are not HTMLFormControlElementWithState.

* DocumentState stores a Document pointer, which is a starting point
  of the traversal.
  - Pass Document& to DocumentState constructor and FormController
    constructor.  Also, remove unnecessary static Create() for them.

* Replace AddControl() and RemoveControl() of DocumentState with
  InvalidateControlList()

* Replace RegisterStatefulFormControl() and
  UnregisterStatefulFormControl() of FormController with
  InvalidateStatefulFormControlList().

Bug: 905922
Change-Id: Ie0ad788042bfca533a2efdff5adc07ce9adf395c
Reviewed-on: https://chromium-review.googlesource.com/c/1411972
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623068}
[modify] https://crrev.com/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976/third_party/blink/renderer/core/dom/document.cc
[modify] https://crrev.com/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976/third_party/blink/renderer/core/html/forms/form_controller.cc
[modify] https://crrev.com/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976/third_party/blink/renderer/core/html/forms/form_controller.h
[modify] https://crrev.com/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc
[modify] https://crrev.com/7a43a7ae271a49768bbcaa9a8f28c5afd2ce5976/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.h

Comment 25 by bugdroid1@chromium.org, Jan 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b62fdeea7d015597b119dfc3c1142ff3b9b1c613

commit b62fdeea7d015597b119dfc3c1142ff3b9b1c613
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Jan 17 09:33:47 2019

Form-associated custom elements: Move the code related to control state restore in HTMLFormControlElementWithState to ListedElement.

This is a preparation to support control state restore feature in
form-associated custom elements.
This CL has no behavior changes.

Bug: 905922
Change-Id: I9eee6c509b6ab974965b0bce397fed14f2dd019c
Reviewed-on: https://chromium-review.googlesource.com/c/1417390
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623623}
[modify] https://crrev.com/b62fdeea7d015597b119dfc3c1142ff3b9b1c613/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.cc
[modify] https://crrev.com/b62fdeea7d015597b119dfc3c1142ff3b9b1c613/third_party/blink/renderer/core/html/forms/html_form_control_element_with_state.h
[modify] https://crrev.com/b62fdeea7d015597b119dfc3c1142ff3b9b1c613/third_party/blink/renderer/core/html/forms/listed_element.cc
[modify] https://crrev.com/b62fdeea7d015597b119dfc3c1142ff3b9b1c613/third_party/blink/renderer/core/html/forms/listed_element.h

Comment 26 by bugdroid, Jan 25

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5773118c74409d011ad3054c06731ea31c939088

commit 5773118c74409d011ad3054c06731ea31c939088
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jan 25 04:51:56 2019

Form-associated custom elements: Add infrastructure to invoke restoreValueCallback

This is a preparation to support the state restore feature for form-associated
custom elements.

- Store restoreValueCallback in blink::ScriptCustomElementDefinition
- Add HasRestoreValeuCallback() and RunRestoreValueCallback() to
  blink::CustomElementDefinition
- Add blink::CustomElement::EnqueueRestoreValueCallback()
- Add blink::CustomElementReactionFactory::CreateRestoreValue()

The new code isn't used yet.  This CL has no behavior changes.

Bug: 905922
Change-Id: I93434313dc1043a9e0080a59ae96c23d36750e4f
Reviewed-on: https://chromium-review.googlesource.com/c/1433256
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625997}

Comment 27 by bugdroid, Jan 25

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9b699890071c207fff6a67c5eaca36bc77c1839

commit c9b699890071c207fff6a67c5eaca36bc77c1839
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Jan 25 05:41:50 2019

Form-associated custom elements: FormController handles ListedElement instead of HTMLFormControlElementWithState

Introduce ListedElement::ClassSupportsStateRestore(), and only
HTMLFormControlElementWithState returns true for it at this moment.

This is a preparation to support the state restore feature for
form-associated custom elements, which are not
HTMLFormControlElementWithState but are ListedElement.

This CL has no behavior changes.

Bug: 905922
Change-Id: I5931a1f9477d5122702120c8d6ddf534e14c97d8
Reviewed-on: https://chromium-review.googlesource.com/c/1433347
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#626004}

Comment 28 by bugdroid, Jan 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b9478516c7899698185a55ba012c8cf738a6fb93

commit b9478516c7899698185a55ba012c8cf738a6fb93
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jan 30 08:52:47 2019

Form-associated custom elements: Update restoreValueCallback

- Stop to make it mandatory
  It didn't make much sense because web developers can provide empty callbacks.

- Add 'mode' argument
  It is 'restore' if the callback called for state restore by UA.
  It will be 'autocomplete' if UA's autofilling feature calls the callback.

Bug: 905922
Bug: https://github.com/w3c/webcomponents/issues/758
Change-Id: I747eb3f1cba97bd9d0b62ed18fd0504fae7250f9
Reviewed-on: https://chromium-review.googlesource.com/c/1438794
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627355}
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.cc
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition.h
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/bindings/core/v8/script_custom_element_definition_builder.cc
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element.cc
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element.h
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element_definition.h
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element_reaction_factory.cc
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element_reaction_factory.h
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element_registry.idl
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/custom_element_test_helpers.h
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/renderer/core/html/custom/element_internals.cc
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/form-associated-state-restore.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/form-submission-file.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/form-validation-bubble-appearance.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/resources/form-associated-state-restore-frame.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-associated-disabled.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-associated-reset.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-association.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-label.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-submission.html
[modify] https://crrev.com/b9478516c7899698185a55ba012c8cf738a6fb93/third_party/blink/web_tests/custom-elements/tentative/form-validation.html

Sign in to add a comment