Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 594918 Launch Autonomous Custom Elements ("v1")
Starred by 23 users Project Member Reported by hayato@chromium.org, Mar 15 2016 Back to list
Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux, Android, Windows, Chrome, Mac
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Status: ----
Launch-Test: ----
Launch-UI: ----


Sign in to add a comment
Change description:
Launch Custom Elements v1

Changes to API surface:
- document.defineElement(), and other accompanying APIs to define custom elements

Links:
Public standards discussion: https://github.com/w3c/webcomponents/issues?q=is%3Aissue+is%3Aopen+label%3Acustom-elementsThe spec: https://w3c.github.io/webcomponents/spec/custom/

Support in other browsers:
Internet Explorer / Edge: Not yet
Firefox: Not yet
Safari: In development - https://bugs.webkit.org/show_bug.cgi?id=154907


 
Project Member Comment 1 by bugdroid1@chromium.org, Apr 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68afca08701383ce31d01bac172e90e01b149dc1

commit 68afca08701383ce31d01bac172e90e01b149dc1
Author: kojii <kojii@chromium.org>
Date: Wed Apr 06 17:43:02 2016

Add the CustomElementsRegistry interface behind the flag

This patch adds the CustomElementsRegistry interface defined in the
custom elements spec[1] behind the runtime flag.

The actual logic is not included in this patch.

[1] http://w3c.github.io/webcomponents/spec/custom/#custom-elements-api

BUG=594918

Review URL: https://codereview.chromium.org/1810973004

Cr-Commit-Position: refs/heads/master@{#385499}

[add] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/LayoutTests/fast/dom/custom/custom-elements-registry.html
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[add] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[add] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.idl
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/DOMWindow.h
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/RemoteDOMWindow.cpp
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/RemoteDOMWindow.h
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/core/frame/Window.idl
[modify] https://crrev.com/68afca08701383ce31d01bac172e90e01b149dc1/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Blockedon: 604552
Owner: dominicc@chromium.org
Status: Started
I can help with this.
Project Member Comment 4 by bugdroid1@chromium.org, Apr 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31

commit 32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31
Author: kojii <kojii@chromium.org>
Date: Tue Apr 26 04:10:59 2016

Rename all existing custom element classes as V0

This patch renames existing custom element classes as V0 in order to
clarify which parts were modified or reviewed for the V1 spec.

BUG=594918

Review URL: https://codereview.chromium.org/1914923002

Cr-Commit-Position: refs/heads/master@{#389689}

[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V0CustomElementBinding.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V0CustomElementBinding.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/core/v8/v8.gypi
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/scripts/v8_methods.py
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/templates/attributes.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/templates/methods.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/DocumentInit.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/DocumentInit.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/ElementRareData.h
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementCallbackInvocation.cpp
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskDispatcher.cpp
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskDispatcher.h
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskQueueBase.h
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementMicrotaskRunQueue.h
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementScheduler.cpp
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.cpp
[delete] https://crrev.com/c749d3e1f04d7cedea33adb280229e7b923f20cf/third_party/WebKit/Source/core/dom/custom/CustomElementSyncMicrotaskQueue.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElement.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementAsyncImportMicrotaskQueue.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementAsyncImportMicrotaskQueue.h
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackInvocation.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackQueue.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementCallbackQueue.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementDefinition.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementDefinition.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementDescriptor.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementDescriptorHash.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementException.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementException.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementLifecycleCallbacks.h
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskDispatcher.cpp
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskDispatcher.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskImportStep.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskImportStep.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskQueueBase.cpp
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskQueueBase.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskResolutionStep.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskResolutionStep.h
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskRunQueue.cpp
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskRunQueue.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementMicrotaskStep.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementObserver.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementObserver.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementProcessingStack.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementProcessingStack.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementProcessingStep.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistrationContext.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistrationContext.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.h
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementScheduler.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementScheduler.h
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementSyncMicrotaskQueue.cpp
[add] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementSyncMicrotaskQueue.h
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementUpgradeCandidateMap.cpp
[rename] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/dom/custom/V0CustomElementUpgradeCandidateMap.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/html/imports/HTMLImportChild.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/html/imports/HTMLImportChild.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/core/html/imports/HTMLImportLoader.h
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/web/WebCustomElement.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/web/WebDocument.cpp
[modify] https://crrev.com/32fca76b0a7f4ccfb2128f3400d8cc87a3c58e31/third_party/WebKit/Source/web/WebElement.cpp

Project Member Comment 5 by bugdroid1@chromium.org, Apr 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6b316d166bc70f33bd342a00236a8adda68994ef

commit 6b316d166bc70f33bd342a00236a8adda68994ef
Author: kojii <kojii@chromium.org>
Date: Wed Apr 27 10:23:07 2016

Implement PotentialCustomElementName

This patch implements PotentialCustomElementName, which is part of
validating custom element name.

A valid custom element name must be PotentialCustomElementName and also
exclude all hyphen-containing element names. It will be in a following
patch.

Spec:
https://html.spec.whatwg.org/multipage/scripting.html#prod-potentialcustomelementname

BUG=594918

Review URL: https://codereview.chromium.org/1916013004

Cr-Commit-Position: refs/heads/master@{#390039}

[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[add] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[add] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/Character.cpp
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/Character.h
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/CharacterProperty.h
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/CharacterPropertyData.cpp
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp
[modify] https://crrev.com/6b316d166bc70f33bd342a00236a8adda68994ef/third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.h

Project Member Comment 6 by bugdroid1@chromium.org, Apr 28 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/53c4c0ac74bf3fbe6d1fcda1ee798b5d3817e1f3

commit 53c4c0ac74bf3fbe6d1fcda1ee798b5d3817e1f3
Author: kojii <kojii@chromium.org>
Date: Thu Apr 28 05:41:31 2016

Implement CustomElement::isValidName()

This patch implements CustomElement::IsValidName().

A valid custom element name is PotentialCustomElementName except all
hyphen-containing element names from the applicable specifications,
according to the spec below:
https://html.spec.whatwg.org/multipage/scripting.html#valid-custom-element-name

BUG=594918

Review-Url: https://codereview.chromium.org/1914383002
Cr-Commit-Position: refs/heads/master@{#390308}

[modify] https://crrev.com/53c4c0ac74bf3fbe6d1fcda1ee798b5d3817e1f3/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/53c4c0ac74bf3fbe6d1fcda1ee798b5d3817e1f3/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/53c4c0ac74bf3fbe6d1fcda1ee798b5d3817e1f3/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp

Project Member Comment 7 by bugdroid1@chromium.org, May 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00c4f05945de64e240b230db5b22536be02d09e7

commit 00c4f05945de64e240b230db5b22536be02d09e7
Author: dominicc <dominicc@chromium.org>
Date: Fri May 13 08:10:55 2016

Implement custom element construction and some 'define' checks

BUG=594918
TEST=LayoutTests/custom-elements

Review-Url: https://codereview.chromium.org/1952893003
Cr-Commit-Position: refs/heads/master@{#393469}

[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/gc.html
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/isolated-worlds.html
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/bindings/core/v8/V8HiddenValue.h
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/bindings/core/v8/custom/custom.gypi
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[add] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/README.md
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistrationContext.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistrationContext.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistry.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/DOMWindow.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/RemoteDOMWindow.cpp
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/RemoteDOMWindow.h
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/frame/Window.idl
[modify] https://crrev.com/00c4f05945de64e240b230db5b22536be02d09e7/third_party/WebKit/Source/core/html/HTMLElement.idl

Project Member Comment 8 by bugdroid1@chromium.org, May 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/baf58e07fe7a17c3e8faff4b354b9901e62a5734

commit baf58e07fe7a17c3e8faff4b354b9901e62a5734
Author: dominicc <dominicc@chromium.org>
Date: Tue May 17 01:11:49 2016

When defining custom elements, check that the argument is a constructor

BUG=594918

Review-Url: https://codereview.chromium.org/1983743002
Cr-Commit-Position: refs/heads/master@{#394002}

[modify] https://crrev.com/baf58e07fe7a17c3e8faff4b354b9901e62a5734/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/baf58e07fe7a17c3e8faff4b354b9901e62a5734/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp

Project Member Comment 9 by bugdroid1@chromium.org, May 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/495340a5749264cb14ea138bbeef237424cdbef6

commit 495340a5749264cb14ea138bbeef237424cdbef6
Author: kojii <kojii@chromium.org>
Date: Tue May 17 01:18:37 2016

Rename v0 custom element flags to V0

This patch renames flags for v0 custom element to have "V0" in their
names, and the same changes to getter/setter of such flags, in order
to distinguish them from flags for custom element v1.

BUG=594918

Review-Url: https://codereview.chromium.org/1982003002
Cr-Commit-Position: refs/heads/master@{#394004}

[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/css/SelectorChecker.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/Node.h
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp
[modify] https://crrev.com/495340a5749264cb14ea138bbeef237424cdbef6/third_party/WebKit/Source/core/dom/custom/V0CustomElementRegistrationContext.cpp

Project Member Comment 10 by bugdroid1@chromium.org, May 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f15adc94e6c7c22940472feefcee2e59071fec0c

commit f15adc94e6c7c22940472feefcee2e59071fec0c
Author: kojii <kojii@chromium.org>
Date: Thu May 19 11:11:12 2016

Add CustomElementState for Custom Elements v1

This patch adds CustomElementState[1] for Custom Elements v1.

In order for v0 and v1 to co-exist and avoid complexity, the state is
stored separately from V0CustomElementState.

They can be set independently from each other, except DCHECK to ensure
an element can be customized by only by one of them.

[1] https://dom.spec.whatwg.org/#concept-element-custom-element-state

BUG=594918

Review-Url: https://codereview.chromium.org/1982973002
Cr-Commit-Position: refs/heads/master@{#394734}

[modify] https://crrev.com/f15adc94e6c7c22940472feefcee2e59071fec0c/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/f15adc94e6c7c22940472feefcee2e59071fec0c/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/f15adc94e6c7c22940472feefcee2e59071fec0c/third_party/WebKit/Source/core/dom/Node.h
[modify] https://crrev.com/f15adc94e6c7c22940472feefcee2e59071fec0c/third_party/WebKit/Source/core/dom/NodeTest.cpp

Project Member Comment 11 by bugdroid1@chromium.org, May 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be6415b2a676083838cb45ef84772819834a5b5e

commit be6415b2a676083838cb45ef84772819834a5b5e
Author: dominicc <dominicc@chromium.org>
Date: Fri May 20 06:12:10 2016

CustomElementUpgradeSorter puts elements in shadow-including tree order.

This is part of "element definition", step 21.
https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-define

BUG=594918

Review-Url: https://codereview.chromium.org/1995933005
Cr-Commit-Position: refs/heads/master@{#395014}

[modify] https://crrev.com/be6415b2a676083838cb45ef84772819834a5b5e/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/be6415b2a676083838cb45ef84772819834a5b5e/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
[add] https://crrev.com/be6415b2a676083838cb45ef84772819834a5b5e/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.h
[add] https://crrev.com/be6415b2a676083838cb45ef84772819834a5b5e/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorterTest.cpp

Project Member Comment 12 by bugdroid1@chromium.org, May 21 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4de05fac9bf71bd0724f7a0becb0668cf43ab763

commit 4de05fac9bf71bd0724f7a0becb0668cf43ab763
Author: dominicc <dominicc@chromium.org>
Date: Sat May 21 07:40:59 2016

Add a tuple of name, local name for hashing custom element definitions.

BUG=594918

Review-Url: https://codereview.chromium.org/1996213002
Cr-Commit-Position: refs/heads/master@{#395254}

[modify] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[add] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptor.h
[add] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorHash.h
[add] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp
[modify] https://crrev.com/4de05fac9bf71bd0724f7a0becb0668cf43ab763/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp

Project Member Comment 13 by bugdroid1@chromium.org, May 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853

commit 1d85c7a9c9f2c5d668adef2ae8c35f17679a5853
Author: kojii <kojii@chromium.org>
Date: Thu May 26 01:23:57 2016

Hook createElement for Custom Elements V1

This patch hooks Custom Element V1 creation points and set the Custom
Element State to Undefined when it meets the criteria.

When and how to set the Custom Element State has open issues and is
subject to change. We may need to change when the spec changes.

Most of the logic to create an element[1] is not implemented yet.

[1] https://dom.spec.whatwg.org/#concept-create-element

BUG=594918

Review-Url: https://codereview.chromium.org/2002903002
Cr-Commit-Position: refs/heads/master@{#396078}

[modify] https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853/third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp

Project Member Comment 14 by bugdroid1@chromium.org, May 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7b0c4a78866841553fe991142d3a516c89f5f851

commit 7b0c4a78866841553fe991142d3a516c89f5f851
Author: kojii <kojii@chromium.org>
Date: Thu May 26 05:18:01 2016

Change "bool createdByParser" of createElement() to enum

The "create an element"[1] defines "synchronous custom elements flag"
that is set to false if:
1. To clone a node[2].
2. The parser was originally created for the HTML fragment parsing
   algorithm[3].

This patch changes "bool createdByParser" of createElement() to an enum
so that callers can pass this flag to "create an element"[1].

Using the "synchronous custom elements flag" is not implemented yet,
and thus no behavior changes.

[1] https://dom.spec.whatwg.org/#concept-create-element
[2] https://dom.spec.whatwg.org/#concept-node-clone
[3] https://html.spec.whatwg.org/#create-an-element-for-the-token

BUG=594918

Review-Url: https://codereview.chromium.org/2002063003
Cr-Commit-Position: refs/heads/master@{#396125}

[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/build/scripts/templates/ElementFactory.h.tmpl
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/editing/commands/IndentOutdentCommand.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/events/EventPathTest.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
[modify] https://crrev.com/7b0c4a78866841553fe991142d3a516c89f5f851/third_party/WebKit/Source/core/xml/parser/XMLErrors.cpp

Project Member Comment 15 by bugdroid1@chromium.org, May 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/533a15025f7409bf1d820bb361b4972aa320a43a

commit 533a15025f7409bf1d820bb361b4972aa320a43a
Author: kojii <kojii@chromium.org>
Date: Thu May 26 07:23:58 2016

Implement :defined pseudo-class selector for Custom Elements

This patch implements :defined pseudo-class selector[1].

Adding use counter is in a separate patch, as it's updated more often
and needs other reviewers.

[1] https://html.spec.whatwg.org/multipage/scripting.html#selector-defined

BUG=594918

Review-Url: https://codereview.chromium.org/1989343002
Cr-Commit-Position: refs/heads/master@{#396139}

[add] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/css/CSSSelector.cpp
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/css/CSSSelector.h
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/css/RuleFeature.cpp
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/533a15025f7409bf1d820bb361b4972aa320a43a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp

Project Member Comment 16 by bugdroid1@chromium.org, May 27 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f5750fbf520618038fe934a25db4e8bfde0f0ca5

commit f5750fbf520618038fe934a25db4e8bfde0f0ca5
Author: kojii <kojii@chromium.org>
Date: Fri May 27 05:28:21 2016

Implement the use counter for :defined pseudo-class selector

This patch implements the use counter for :defined pseudo-class
selector[1].

This selector was implemented in crrev.com/396139.

[1] https://html.spec.whatwg.org/multipage/scripting.html#selector-defined

BUG=594918

Review-Url: https://codereview.chromium.org/2014153002
Cr-Commit-Position: refs/heads/master@{#396398}

[modify] https://crrev.com/f5750fbf520618038fe934a25db4e8bfde0f0ca5/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
[modify] https://crrev.com/f5750fbf520618038fe934a25db4e8bfde0f0ca5/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/f5750fbf520618038fe934a25db4e8bfde0f0ca5/tools/metrics/histograms/histograms.xml

Project Member Comment 17 by bugdroid1@chromium.org, May 30 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4

commit c4ccc6b681aba1870c8aed69b3a18201ee97ddd4
Author: dominicc <dominicc@chromium.org>
Date: Mon May 30 04:19:55 2016

Split custom element script use and move it into bindings

In the future Web Modules may define custom elements from C++. This
adds some abstract classes in preparation for that.

In addition, adds some context death tests.

BUG=594918

Review-Url: https://codereview.chromium.org/2003033004
Cr-Commit-Position: refs/heads/master@{#396672}

[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/LayoutTests/custom-elements/constructor-context-dies-before-super.html
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/LayoutTests/custom-elements/constructor-context-dies-cross-context-call.html
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/LayoutTests/custom-elements/define-context-dies-retrieving-prototype.html
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/bindings/core/v8/v8.gypi
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[add] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/CustomElementDefinitionBuilder.h
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/dom/custom/README.md
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/c4ccc6b681aba1870c8aed69b3a18201ee97ddd4/third_party/WebKit/Source/core/frame/LocalDOMWindow.h

Project Member Comment 18 by bugdroid1@chromium.org, May 31 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df3420344c2d85b0510edf895fa8e8cf7531adce

commit df3420344c2d85b0510edf895fa8e8cf7531adce
Author: Dominic Cooney <dominicc@chromium.org>
Date: Tue May 31 05:52:01 2016

Add a queue for custom element reactions.

https://html.spec.whatwg.org/multipage/scripting.html#custom-element-reaction-queue

BUG=594918
R=kojii@chromium.org

Review URL: https://codereview.chromium.org/2021763002 .

Cr-Commit-Position: refs/heads/master@{#396790}

[modify] https://crrev.com/df3420344c2d85b0510edf895fa8e8cf7531adce/third_party/WebKit/Source/core/core.gypi
[add] https://crrev.com/df3420344c2d85b0510edf895fa8e8cf7531adce/third_party/WebKit/Source/core/dom/custom/CustomElementReaction.h
[add] https://crrev.com/df3420344c2d85b0510edf895fa8e8cf7531adce/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp
[add] https://crrev.com/df3420344c2d85b0510edf895fa8e8cf7531adce/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.h
[add] https://crrev.com/df3420344c2d85b0510edf895fa8e8cf7531adce/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueueTest.cpp

Project Member Comment 19 by bugdroid1@chromium.org, May 31 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1a83859dd7df828f87fac61886f07f454dfffeb

commit e1a83859dd7df828f87fac61886f07f454dfffeb
Author: dominicc <dominicc@chromium.org>
Date: Tue May 31 09:14:15 2016

Add a stack of queues of elements with reaction queues.

The ordering of custom element 'reactions' (various kinds of
callbacks) is determined by a stack which is pushed and popped within
the scope of an operation. The stack entry is a queue of involved
elements; this is so callbacks occur in order. However each element
gets callbacks in an internally consistent chronological order. To
effect this, each element has an associated reaction queue.

BUG=594918

Review-Url: https://codereview.chromium.org/2027513002
Cr-Commit-Position: refs/heads/master@{#396806}

[modify] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.h
[modify] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueueTest.cpp
[add] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
[add] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
[add] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStackTest.cpp
[add] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementReactionTestHelpers.h
[add] https://crrev.com/e1a83859dd7df828f87fac61886f07f454dfffeb/third_party/WebKit/Source/core/dom/custom/CustomElementTestHelpers.h

Project Member Comment 20 by bugdroid1@chromium.org, Jun 1 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9beaf25c2880e2682c86811743f95e0518c596bf

commit 9beaf25c2880e2682c86811743f95e0518c596bf
Author: yosin <yosin@chromium.org>
Date: Wed Jun 01 05:46:15 2016

Make ScriptCustomeElementDefinition class to hold ScriptState

This patch introduces |m_scriptState| member variable to
|ScriptCustomeElementDefinition| class to hold |ScriptState| pointer, to
return |ScriptValue| for JavaScript's constructor, prototype, callbacks,
etc, on the context where JavaScript values created.

This patch is a preparation of crrev.com/1994093002, introduce
|CustomElementRegistry#get()| method.

BUG=594918
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2030443003
Cr-Commit-Position: refs/heads/master@{#397069}

[modify] https://crrev.com/9beaf25c2880e2682c86811743f95e0518c596bf/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/9beaf25c2880e2682c86811743f95e0518c596bf/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/9beaf25c2880e2682c86811743f95e0518c596bf/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp

Cc: ericbidelman@chromium.org
Project Member Comment 22 by bugdroid1@chromium.org, Jun 2 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4

commit 217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4
Author: yosin <yosin@chromium.org>
Date: Thu Jun 02 09:36:40 2016

Introduce CustomElementRegistry#get() method

This patch introduces |CustomElementRegistry#get()| as specified in [1].

To return associated constructor by |get()|, this patch introduces
|getConsturcotr(ScriptState*)| member function to |CustomElementDefinition| as
pure virtual function and implements it in |ScriptCustomElementDefinition|.

[1] https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-get

BUG=594918
TEST=LayoutTests/custom-elements/spec/custom-elements-registry/get.html
TEST=LayoutTests/webexposed/global-interface-listing.html

Review-Url: https://codereview.chromium.org/1994093002
Cr-Commit-Position: refs/heads/master@{#397351}

[add] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/LayoutTests/custom-elements/spec/custom-elements-registry/get.html
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[modify] https://crrev.com/217bd0280d1a9cfd18ade5f2f3c744e8cfb0a0f4/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.idl

Project Member Comment 23 by bugdroid1@chromium.org, Jun 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d

commit c561a337b93cf622ea0bd4f066e7e74f30ca7c3d
Author: dominicc <dominicc@chromium.org>
Date: Fri Jun 03 08:11:30 2016

Upgrade in-document custom elements when an element is defined.

BUG=594918

Review-Url: https://codereview.chromium.org/2023093003
Cr-Commit-Position: refs/heads/master@{#397660}

[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/Element.cpp
[add] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.cpp
[add] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptor.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementDescriptorTest.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementReactionTestHelpers.h
[add] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
[add] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorterTest.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[add] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/frame/FrameHost.cpp
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/frame/FrameHost.h
[modify] https://crrev.com/c561a337b93cf622ea0bd4f066e7e74f30ca7c3d/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Project Member Comment 24 by bugdroid1@chromium.org, Jun 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ee58801ba1e4a49cc2eea50d970444c7eeff9593

commit ee58801ba1e4a49cc2eea50d970444c7eeff9593
Author: dominicc <dominicc@chromium.org>
Date: Fri Jun 03 10:38:55 2016

Implement the script parts of custom element upgrade steps.

BUG=594918

Review-Url: https://codereview.chromium.org/2035623002
Cr-Commit-Position: refs/heads/master@{#397676}

[add] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/LayoutTests/custom-elements/constructor-may-poach-upgrading-element.html
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 25 by bugdroid1@chromium.org, Jun 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e6951b31a44e4701e982b997d6cf8a9db83f213e

commit e6951b31a44e4701e982b997d6cf8a9db83f213e
Author: vabr <vabr@chromium.org>
Date: Fri Jun 03 11:12:21 2016

Revert of Implement the script parts of custom element upgrade steps. (patchset #2 id:20001 of https://codereview.chromium.org/2035623002/ )

Reason for revert:
Speculative revert for breaking Win compile, will follow-up on the bug with more details soon.

Original issue's description:
> Implement the script parts of custom element upgrade steps.
>
> BUG=594918
>
> Committed: https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593
> Cr-Commit-Position: refs/heads/master@{#397676}

TBR=kojii@chromium.org,blink-reviews-bindings@chromium.org,haraken@chromium.org,dominicc@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=594918

Review-Url: https://codereview.chromium.org/2032373002
Cr-Commit-Position: refs/heads/master@{#397680}

[delete] https://crrev.com/d846c8087715c5c03c98cacdcf59575a81e9f52e/third_party/WebKit/LayoutTests/custom-elements/constructor-may-poach-upgrading-element.html
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/e6951b31a44e4701e982b997d6cf8a9db83f213e/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Comment 26 by vabr@chromium.org, Jun 3 2016
The revert in #25 was because the breakage of https://build.chromium.org/p/chromium/builders/Win/builds/43987. The error (full log attached) was:

FAILED: obj/third_party/WebKit/Source/bindings/core/v8/custom/webcore_generated.V8HTMLElementCustom.obj 
ninja -t msvc -e environment.x86 -- C:\b\build\slave\cache\cipd\goma/gomacc "C:\b\depot_tools\win_toolchain\vs_files\95ddda401ec5678f15eeed01d2bee08fcbc5ee97\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\WebKit\Source\bindings\core\v8\custom\webcore_generated.V8HTMLElementCustom.obj.rsp /c ..\..\third_party\WebKit\Source\bindings\core\v8\custom\V8HTMLElementCustom.cpp /Foobj\third_party\WebKit\Source\bindings\core\v8\custom\webcore_generated.V8HTMLElementCustom.obj /Fdobj\third_party\WebKit\Source\core\webcore_generated.cc.pdb 
c:\b\build\slave\win\build\src\third_party\webkit\source\bindings\core\v8\custom\v8htmlelementcustom.cpp(64) : error C2220: warning treated as error - no 'object' file generated
c:\b\build\slave\win\build\src\third_party\webkit\source\bindings\core\v8\custom\v8htmlelementcustom.cpp(64) : warning C4706: assignment within conditional expression
Log File contents.html
1.5 MB View Download
Project Member Comment 27 by bugdroid1@chromium.org, Jun 4 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7811435c7a6f93b2f016788e5a963324a8f0a854

commit 7811435c7a6f93b2f016788e5a963324a8f0a854
Author: dominicc <dominicc@chromium.org>
Date: Sat Jun 04 18:24:50 2016

Implement the script parts of custom element upgrade steps.

BUG=594918

Committed: https://crrev.com/ee58801ba1e4a49cc2eea50d970444c7eeff9593
Review-Url: https://codereview.chromium.org/2035623002
Cr-Original-Commit-Position: refs/heads/master@{#397676}
Cr-Commit-Position: refs/heads/master@{#397934}

[add] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/LayoutTests/custom-elements/constructor-may-poach-upgrading-element.html
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.h
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/7811435c7a6f93b2f016788e5a963324a8f0a854/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 28 by bugdroid1@chromium.org, Jun 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c023cb478d2e9197b87b4cff28f73e2899cf0ffe

commit c023cb478d2e9197b87b4cff28f73e2899cf0ffe
Author: dominicc <dominicc@chromium.org>
Date: Mon Jun 06 01:32:39 2016

Recursively defining custom elements should not lead to redefinition

See https://github.com/whatwg/html/issues/1329

BUG=594918

Review-Url: https://codereview.chromium.org/2029923003
Cr-Commit-Position: refs/heads/master@{#397958}

[modify] https://crrev.com/c023cb478d2e9197b87b4cff28f73e2899cf0ffe/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/c023cb478d2e9197b87b4cff28f73e2899cf0ffe/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
[modify] https://crrev.com/c023cb478d2e9197b87b4cff28f73e2899cf0ffe/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
[modify] https://crrev.com/c023cb478d2e9197b87b4cff28f73e2899cf0ffe/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/c023cb478d2e9197b87b4cff28f73e2899cf0ffe/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h

Project Member Comment 29 by bugdroid1@chromium.org, Jun 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d17a89371a6d36914685940a28756f275728d9a5

commit d17a89371a6d36914685940a28756f275728d9a5
Author: kojii <kojii@chromium.org>
Date: Tue Jun 07 08:06:25 2016

Add callbacks to ScriptCustomElementDefinition

This patch adds callbacks and observedAttributes to
ScriptCustomElementDefinition, as defined in the Element Definition
spec[1].

[1] https://html.spec.whatwg.org/multipage/scripting.html#element-definition

BUG=594918
TEST=imported/wpt/custom-elements/custom-elements-registry/define.html

Review-Url: https://codereview.chromium.org/2024073002
Cr-Commit-Position: refs/heads/master@{#398243}

[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/custom-elements-registry/define-expected.txt
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/core/dom/custom/CustomElementDefinitionBuilder.h
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/d17a89371a6d36914685940a28756f275728d9a5/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 30 by bugdroid1@chromium.org, Jun 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef

commit a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef
Author: kojii <kojii@chromium.org>
Date: Tue Jun 07 18:41:04 2016

Add [CEReactions] IDL attributes for Custom Elements V1

This patch adds:
* [CEReactions] support in IDL parser.
https://html.spec.whatwg.org/multipage/scripting.html#cereactions
* [CEReactions] attributes to IDL from the following specs:
https://dom.spec.whatwg.org/
https://html.spec.whatwg.org/
https://w3c.github.io/DOM-Parsing/
https://w3c.github.io/selection-api/

BUG=594918

Review-Url: https://codereview.chromium.org/2043503002
Cr-Commit-Position: refs/heads/master@{#398352}

[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/scripts/v8_methods.py
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/templates/attributes.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/templates/interface.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/bindings/templates/methods.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/Attr.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/ChildNode.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/DOMStringMap.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/DOMTokenList.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/Element.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/NamedNodeMap.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/Node.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/ParentNode.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/Range.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/editing/Selection.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLAnchorElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLAreaElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLBRElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLBaseElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLBodyElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLButtonElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLCanvasElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDListElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDetailsElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDialogElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDirectoryElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDivElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLDocument.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLEmbedElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLFieldSetElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLFontElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLFormElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLFrameElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLFrameSetElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLHRElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLHeadingElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLHtmlElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLHyperlinkElementUtils.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLIFrameElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLImageElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLInputElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLKeygenElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLLIElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLLabelElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLLegendElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLLinkElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMapElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMediaElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMenuElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMenuItemElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMetaElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLMeterElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLModElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLOListElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLObjectElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLOptGroupElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLOptionElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLOptionsCollection.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLOutputElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLParagraphElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLParamElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLPreElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLProgressElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLQuoteElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLScriptElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLSelectElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLSlotElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLSourceElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLStyleElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableCaptionElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableCellElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableColElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableRowElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTableSectionElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTextAreaElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTitleElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLTrackElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLUListElement.idl
[modify] https://crrev.com/a509fa4b0fa1a34fe113a10ad9502fa58f6c7fef/third_party/WebKit/Source/core/html/HTMLVideoElement.idl

Project Member Comment 31 by bugdroid1@chromium.org, Jun 8 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/60be1ee7d7a12f8fc88cdb2da9d12dc677f9e489

commit 60be1ee7d7a12f8fc88cdb2da9d12dc677f9e489
Author: kojii <kojii@chromium.org>
Date: Wed Jun 08 01:02:54 2016

Add tests of state changes for :defined() selector

BUG=594918

Review-Url: https://codereview.chromium.org/2039103004
Cr-Commit-Position: refs/heads/master@{#398444}

[modify] https://crrev.com/60be1ee7d7a12f8fc88cdb2da9d12dc677f9e489/third_party/WebKit/LayoutTests/custom-elements/spec/selectors/pseudo-class-defined.html

Blockedon: 618606
Project Member Comment 33 by bugdroid1@chromium.org, Jun 9 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c270081c630097becbb6934cfb85b6f73bdd409c

commit c270081c630097becbb6934cfb85b6f73bdd409c
Author: kojii <kojii@chromium.org>
Date: Thu Jun 09 10:35:41 2016

Implement "create an element" when async for Custom Element V1

This patch implements "create an element" concept[1] step 6.2, when
synchronous custom elements flag is unset.

[1] https://dom.spec.whatwg.org/#concept-create-element

BUG=594918

Review-Url: https://codereview.chromium.org/2043153003
Cr-Commit-Position: refs/heads/master@{#398834}

[add] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-asynchronous.html
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/Node.idl
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/custom/CustomElement.h

Project Member Comment 34 by bugdroid1@chromium.org, Jun 10 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52523d4e58d99cdb768791bf9ac532c917522460

commit 52523d4e58d99cdb768791bf9ac532c917522460
Author: yosin <yosin@chromium.org>
Date: Fri Jun 10 13:25:15 2016

Introduce CustomElementRegistry#whenDefined() method

This patch introduces |CustomElementRegistry#whenDefined()| as specified in [1],
and makes |CustomElementRegistry::define()| to resolve a promise associated to
newly defined name.

[1] // https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-whendefined

BUG=594918
TEST=LayoutTests/custom-elements/spec/custom-elements-registry/when_defined.html

Review-Url: https://codereview.chromium.org/2048343002
Cr-Commit-Position: refs/heads/master@{#399171}

[add] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/LayoutTests/custom-elements/spec/custom-elements-registry/when_defined.html
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.idl

Comment 35 by kojii@chromium.org, Jun 10 2016
Blockedon: 619062
Project Member Comment 36 by bugdroid1@chromium.org, Jun 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f26af41b1664d9903b3357efed3de49db8914f75

commit f26af41b1664d9903b3357efed3de49db8914f75
Author: kojii <kojii@chromium.org>
Date: Mon Jun 13 17:57:21 2016

Allow reactions to enqueue other reactions for the same element

When upgrade reactions[1] upgrade elements[2], it may enqueue callback
reactions.

This patch allows CustomElementReactionStack to enqueue() for the same
element from within popInvokingReactions().

[1] https://html.spec.whatwg.org/multipage/scripting.html#upgrade-reaction
[2] https://html.spec.whatwg.org/multipage/scripting.html#upgrades

BUG=594918

Review-Url: https://codereview.chromium.org/2052283002
Cr-Commit-Position: refs/heads/master@{#399480}

[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.h
[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStackTest.cpp

Project Member Comment 37 by bugdroid1@chromium.org, Jun 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35a2d25bafa5299fdb57cb857605c3d3655cf7be

commit 35a2d25bafa5299fdb57cb857605c3d3655cf7be
Author: kojii <kojii@chromium.org>
Date: Mon Jun 13 18:56:14 2016

Implement callback reactions for Custom Elements V1

This patch implements callbacks for Custom Elements V1:
1. Add Hooks to call methods in CustomElement class.
   a. Element calls connected, disconnected, and attributeChanged.
   b. CustomElementDefinition calls on upgrade.
2. CustomElement looks up CustomElementDefinition. Enqueueing reactions
   were moved from CustomElement to CustomElementDefinition.

Implementing ScriptCustomElementDefinition to call JavaScript will be
in the following patch.

BUG=594918

Review-Url: https://codereview.chromium.org/2058823002
Cr-Commit-Position: refs/heads/master@{#399496}

[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementAttributeChangedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementAttributeChangedCallbackReaction.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementConnectedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementConnectedCallbackReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDisconnectedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDisconnectedCallbackReaction.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReaction.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReactionTestHelpers.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 38 by bugdroid1@chromium.org, Jun 14 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e21fcf2e901efb0655bc6beb1355173ea401de83

commit e21fcf2e901efb0655bc6beb1355173ea401de83
Author: kojii <kojii@chromium.org>
Date: Tue Jun 14 21:46:29 2016

Implement "create an element" when sync for Custom Element V1

This patch implements "create an element" concept[1] step 6.2, when
synchronous custom elements flag is set.

[1] https://dom.spec.whatwg.org/#concept-create-element

BUG=594918

Review-Url: https://codereview.chromium.org/2054433002
Cr-Commit-Position: refs/heads/master@{#399789}

[add] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-synchronous.html
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 39 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c270081c630097becbb6934cfb85b6f73bdd409c

commit c270081c630097becbb6934cfb85b6f73bdd409c
Author: kojii <kojii@chromium.org>
Date: Thu Jun 09 10:35:41 2016

Implement "create an element" when async for Custom Element V1

This patch implements "create an element" concept[1] step 6.2, when
synchronous custom elements flag is unset.

[1] https://dom.spec.whatwg.org/#concept-create-element

BUG=594918

Review-Url: https://codereview.chromium.org/2043153003
Cr-Commit-Position: refs/heads/master@{#398834}

[add] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-asynchronous.html
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/Node.idl
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/c270081c630097becbb6934cfb85b6f73bdd409c/third_party/WebKit/Source/core/dom/custom/CustomElement.h

Project Member Comment 40 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/52523d4e58d99cdb768791bf9ac532c917522460

commit 52523d4e58d99cdb768791bf9ac532c917522460
Author: yosin <yosin@chromium.org>
Date: Fri Jun 10 13:25:15 2016

Introduce CustomElementRegistry#whenDefined() method

This patch introduces |CustomElementRegistry#whenDefined()| as specified in [1],
and makes |CustomElementRegistry::define()| to resolve a promise associated to
newly defined name.

[1] // https://html.spec.whatwg.org/multipage/scripting.html#dom-customelementsregistry-whendefined

BUG=594918
TEST=LayoutTests/custom-elements/spec/custom-elements-registry/when_defined.html

Review-Url: https://codereview.chromium.org/2048343002
Cr-Commit-Position: refs/heads/master@{#399171}

[add] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/LayoutTests/custom-elements/spec/custom-elements-registry/when_defined.html
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[modify] https://crrev.com/52523d4e58d99cdb768791bf9ac532c917522460/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.idl

Project Member Comment 41 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f26af41b1664d9903b3357efed3de49db8914f75

commit f26af41b1664d9903b3357efed3de49db8914f75
Author: kojii <kojii@chromium.org>
Date: Mon Jun 13 17:57:21 2016

Allow reactions to enqueue other reactions for the same element

When upgrade reactions[1] upgrade elements[2], it may enqueue callback
reactions.

This patch allows CustomElementReactionStack to enqueue() for the same
element from within popInvokingReactions().

[1] https://html.spec.whatwg.org/multipage/scripting.html#upgrade-reaction
[2] https://html.spec.whatwg.org/multipage/scripting.html#upgrades

BUG=594918

Review-Url: https://codereview.chromium.org/2052283002
Cr-Commit-Position: refs/heads/master@{#399480}

[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.h
[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
[modify] https://crrev.com/f26af41b1664d9903b3357efed3de49db8914f75/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStackTest.cpp

Project Member Comment 42 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/35a2d25bafa5299fdb57cb857605c3d3655cf7be

commit 35a2d25bafa5299fdb57cb857605c3d3655cf7be
Author: kojii <kojii@chromium.org>
Date: Mon Jun 13 18:56:14 2016

Implement callback reactions for Custom Elements V1

This patch implements callbacks for Custom Elements V1:
1. Add Hooks to call methods in CustomElement class.
   a. Element calls connected, disconnected, and attributeChanged.
   b. CustomElementDefinition calls on upgrade.
2. CustomElement looks up CustomElementDefinition. Enqueueing reactions
   were moved from CustomElement to CustomElementDefinition.

Implementing ScriptCustomElementDefinition to call JavaScript will be
in the following patch.

BUG=594918

Review-Url: https://codereview.chromium.org/2058823002
Cr-Commit-Position: refs/heads/master@{#399496}

[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementAttributeChangedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementAttributeChangedCallbackReaction.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementConnectedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementConnectedCallbackReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDisconnectedCallbackReaction.cpp
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementDisconnectedCallbackReaction.h
[add] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReaction.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementReactionTestHelpers.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.h
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/35a2d25bafa5299fdb57cb857605c3d3655cf7be/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 43 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e21fcf2e901efb0655bc6beb1355173ea401de83

commit e21fcf2e901efb0655bc6beb1355173ea401de83
Author: kojii <kojii@chromium.org>
Date: Tue Jun 14 21:46:29 2016

Implement "create an element" when sync for Custom Element V1

This patch implements "create an element" concept[1] step 6.2, when
synchronous custom elements flag is set.

[1] https://dom.spec.whatwg.org/#concept-create-element

BUG=594918

Review-Url: https://codereview.chromium.org/2054433002
Cr-Commit-Position: refs/heads/master@{#399789}

[add] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-synchronous.html
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/Document.idl
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/e21fcf2e901efb0655bc6beb1355173ea401de83/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 44 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0dee3ec4784b2fb73d3aefaab1e00e92767ac767

commit 0dee3ec4784b2fb73d3aefaab1e00e92767ac767
Author: kojii <kojii@chromium.org>
Date: Wed Jun 15 08:31:02 2016

Implement script-side of callback reactions for Custom Elements V1

This patch implements script-side of callback reactions. Abstract
classes were implemented in a separate CL[1].

Also contains following refactoring:
1. Callbacks are stored as v8::Function to make calling them easier.
2. m_observedAttribute is moved to the super class
   (CustomElementDefinition) to allow iteratiion.
3. The order to Get("observedAttributes") was changed as per the spec
   change[2].

The wpt test failure is a test issue, PR[3] is sent.

[1] https://codereview.chromium.org/2058823002
[2] https://github.com/whatwg/html/issues/1373
[3] https://github.com/w3c/web-platform-tests/pull/3175

BUG=594918

Review-Url: https://codereview.chromium.org/2060753002
Cr-Commit-Position: refs/heads/master@{#399858}

[add] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/LayoutTests/custom-elements/spec/callback.html
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/custom-elements-registry/define-expected.txt
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/bindings/core/v8/V8Binding.h
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/0dee3ec4784b2fb73d3aefaab1e00e92767ac767/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 45 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f581ae17af347201ede92b01dc47068ee0cf2d5

commit 4f581ae17af347201ede92b01dc47068ee0cf2d5
Author: kojii <kojii@chromium.org>
Date: Wed Jun 15 08:32:02 2016

Implement script-side of callback reactions for Custom Elements V1

This patch implements script-side of callback reactions. Abstract
classes were implemented in a separate CL[1].

Also contains following refactoring:
1. Callbacks are stored as v8::Function to make calling them easier.
2. m_observedAttribute is moved to the super class
   (CustomElementDefinition) to allow iteratiion.
3. The order to Get("observedAttributes") was changed as per the spec
   change[2].

The wpt test failure is a test issue, PR[3] is sent.

[1] https://codereview.chromium.org/2058823002
[2] https://github.com/whatwg/html/issues/1373
[3] https://github.com/w3c/web-platform-tests/pull/3175

BUG=594918

Review-Url: https://codereview.chromium.org/2060753002
Cr-Commit-Position: refs/heads/master@{#399859}

[modify] https://crrev.com/4f581ae17af347201ede92b01dc47068ee0cf2d5/third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Project Member Comment 46 by bugdroid1@chromium.org, Jun 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3b7d5c11891d4de41363cd94b4981bd4a305193

commit d3b7d5c11891d4de41363cd94b4981bd4a305193
Author: jbroman <jbroman@chromium.org>
Date: Wed Jun 15 09:05:22 2016

Revert "Implement script-side of callback reactions for Custom Elements V1"

This reverts commit 4f581ae17af347201ede92b01dc47068ee0cf2d5.

This commit landed twice, and the second landing caused a function to be defined
twice in V8Binding.h.

BUG=594918
TBR=kojii@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2066793003
Cr-Commit-Position: refs/heads/master@{#399866}

[modify] https://crrev.com/d3b7d5c11891d4de41363cd94b4981bd4a305193/third_party/WebKit/Source/bindings/core/v8/V8Binding.h

Project Member Comment 47 by bugdroid1@chromium.org, Jun 17 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/efb4249e4e385284b1f320e9642a50fb47f2217e

commit efb4249e4e385284b1f320e9642a50fb47f2217e
Author: kojii <kojii@chromium.org>
Date: Fri Jun 17 08:50:04 2016

Upgrade custom elements when inserting a node

This patch tries to upgrade[1] custom elements when inserting a node[2].

With this change, setting to innerHTML/outerHTML enqueues upgrade
reactions if the definition is not null, but then
Element::insertedInto() enqueues upgrade reactions again. Added the
guard in CustomElementDefinition::upgrade() for such cases.

[1] https://html.spec.whatwg.org/multipage/scripting.html#concept-try-upgrade
[2] https://dom.spec.whatwg.org/#concept-node-insert

BUG=594918

Review-Url: https://codereview.chromium.org/2067853002
Cr-Commit-Position: refs/heads/master@{#400401}

[add] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/LayoutTests/custom-elements/spec/insert-a-node-try-to-upgrade.html
[modify] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/efb4249e4e385284b1f320e9642a50fb47f2217e/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeReaction.cpp

Project Member Comment 48 by bugdroid1@chromium.org, Jun 29 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/159d66f36734dab8cfd79c6ae788b94fca8a213a

commit 159d66f36734dab8cfd79c6ae788b94fca8a213a
Author: kojii <kojii@chromium.org>
Date: Wed Jun 29 11:19:29 2016

Add backup element queue to CustomElementReactionStack

This patch adds a backup element queue[1], which is to be added to the
spec in PR[2].

The attached test not only fail but also crashes without this change.

[1] https://html.spec.whatwg.org/multipage/scripting.html#backup-element-queue
[2] https://github.com/whatwg/html/pull/1412

BUG=594918

Review-Url: https://codereview.chromium.org/2097463002
Cr-Commit-Position: refs/heads/master@{#402776}

[add] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/LayoutTests/custom-elements/clone-contenteditable.html
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.cpp
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.h
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
[modify] https://crrev.com/159d66f36734dab8cfd79c6ae788b94fca8a213a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStackTest.cpp

Project Member Comment 49 by bugdroid1@chromium.org, Jul 6 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d82f81d395329a5426d4ee459c2006b25da76b5

commit 9d82f81d395329a5426d4ee459c2006b25da76b5
Author: davaajav <davaajav@google.com>
Date: Wed Jul 06 07:29:29 2016

Added test for step 2, 14 in define element.

Test for step 2.
- Tests cases when HTMLElement, HTMLButtonElement
  is passed as constructor. Step 2 should throw
  TypeError, but it passes without errors.
- Passing author-defined custom element constructors
  created via class extends HTMLElement {} passes
  this step without TypeError.
- Passing JavaScript class Set fails during upgrade.

Test for step 14.
- If Type(prototype) is an Object, and connectedCallback
  is not defined and not Callable, it throws TypeError.
- If Type(prototype) is an Object, and disconnectedCallback
  is not defined and not Callable, it throws TypeError.
- If attributeChangedCallback is not Callable is not
  undefined and not Callable, it throws TypeError.
- If any step in the first set of steps in 14 throws,
  it rethrows that exception and terminates the
  algorithm.

BUG=594918

Review-Url: https://codereview.chromium.org/2089383003
Cr-Commit-Position: refs/heads/master@{#403862}

[modify] https://crrev.com/9d82f81d395329a5426d4ee459c2006b25da76b5/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html

Project Member Comment 50 by bugdroid1@chromium.org, Jul 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f84387506d8ac7d7993bca26d83385460f38d2e7

commit f84387506d8ac7d7993bca26d83385460f38d2e7
Author: davaajav <davaajav@google.com>
Date: Thu Jul 07 10:25:44 2016

calling whenDefined with invalid name should throw SyntaxError

Added test for customElements.whenDefined
Returns a promise rejected with a "SyntaxError" DOMException
if not given a valid custom element name.

BUG=594918

Review-Url: https://codereview.chromium.org/2100403002
Cr-Commit-Position: refs/heads/master@{#404117}

[modify] https://crrev.com/f84387506d8ac7d7993bca26d83385460f38d2e7/third_party/WebKit/LayoutTests/custom-elements/spec/custom-elements-registry/when_defined.html
[modify] https://crrev.com/f84387506d8ac7d7993bca26d83385460f38d2e7/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
[modify] https://crrev.com/f84387506d8ac7d7993bca26d83385460f38d2e7/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js

Project Member Comment 51 by bugdroid1@chromium.org, Jul 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da3577f8e2965c4b7e041a2b0c0446ab8e6f2e94

commit da3577f8e2965c4b7e041a2b0c0446ab8e6f2e94
Author: davaajav <davaajav@google.com>
Date: Fri Jul 15 04:27:59 2016

CustomElements: upgrade an element

Step 6. Testing execution order of reactions, when the constructor
non-conformantly uses API decorated with the [CEReactions]
Step 8. The constructor throws
Step 9. Value returned by the constructor is different from element

BUG=594918

Review-Url: https://codereview.chromium.org/2129843002
Cr-Commit-Position: refs/heads/master@{#405697}

[add] https://crrev.com/da3577f8e2965c4b7e041a2b0c0446ab8e6f2e94/third_party/WebKit/LayoutTests/custom-elements/spec/upgrade-element-expected.txt
[add] https://crrev.com/da3577f8e2965c4b7e041a2b0c0446ab8e6f2e94/third_party/WebKit/LayoutTests/custom-elements/spec/upgrade-element.html

Project Member Comment 52 by bugdroid1@chromium.org, Jul 20 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4d0c35ab4205fd1cb8399398af441acffb77ddb8

commit 4d0c35ab4205fd1cb8399398af441acffb77ddb8
Author: davaajav <davaajav@google.com>
Date: Wed Jul 20 08:49:32 2016

CustomElements: insert a node

Added test for Step 6.5.2.1
If inclusiveDescendant is custom, then enqueue a custom element
callback reaction with inclusiveDescendant, callback name
"connectedCallback", and an empty argument list.

BUG=594918

Review-Url: https://codereview.chromium.org/2144993002
Cr-Commit-Position: refs/heads/master@{#406520}

[modify] https://crrev.com/4d0c35ab4205fd1cb8399398af441acffb77ddb8/third_party/WebKit/LayoutTests/custom-elements/spec/insert-a-node-try-to-upgrade.html

Project Member Comment 53 by bugdroid1@chromium.org, Jul 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/48bf4aae854f6b6eb1340b05dedf14d9c52e9701

commit 48bf4aae854f6b6eb1340b05dedf14d9c52e9701
Author: kojii <kojii@chromium.org>
Date: Fri Jul 22 09:37:03 2016

Fire attributeChangedCallback on style changes for Custom Elements V1

W3C discussion[1] resolved to allow observing the style attribute.

CEReactions are added to CSSStyleDeclaration interface[2].

Ported from a canceled patch for Custom Elements V0[3].

[1] https://github.com/w3c/webcomponents/issues/521
[2] https://drafts.csswg.org/cssom/#cssstyledeclaration
[3] https://codereview.chromium.org/1446933002

BUG=594918

Review-Url: https://codereview.chromium.org/2166213002
Cr-Commit-Position: refs/heads/master@{#407112}

[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/LayoutTests/custom-elements/spec/callback.html
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/bindings/core/v8/custom/V8CSSStyleDeclarationCustom.cpp
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/css/CSSStyleDeclaration.idl
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/css/PropertySetCSSStyleDeclaration.cpp
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/48bf4aae854f6b6eb1340b05dedf14d9c52e9701/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 54 by bugdroid1@chromium.org, Jul 26 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ac03d7943472ea900610fdb5cb27263fe8605c4

commit 5ac03d7943472ea900610fdb5cb27263fe8605c4
Author: kojii <kojii@chromium.org>
Date: Tue Jul 26 09:53:42 2016

Add "Failed" custom element state

To avoid constructor running multiple times on the same element[1],
a new "failed" custom element state[2] was added to the spec.

This patch:
1. Adds the CustomElementState::Failed.
2. Simplifies getCustomElementState().
3. Removes Element::isCustomElement() to match code conventions to the
   spec terminologies.

[1] https://github.com/w3c/webcomponents/issues/533
[2] https://dom.spec.whatwg.org/#concept-element-custom-element-state

BUG=594918

Review-Url: https://codereview.chromium.org/2173623003
Cr-Commit-Position: refs/heads/master@{#407754}

[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
[add] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html
[add] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/Node.cpp
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/Node.h
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[modify] https://crrev.com/5ac03d7943472ea900610fdb5cb27263fe8605c4/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp

Comment 55 by acte...@gmail.com, Jul 26 2016
When will available? 
Comment 56 Deleted
I can't comment on shipping dates, but you can experiment now by using a flag. 

chrome --enable-blink-features=CustomElementsV1
Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
We would really like feedback. Please try it! Not everything works yet. Please turn on crash reporting and paste crash IDs (which you can get from chrome://crashes) into comments on this bug if you experience crashes. Feel free to send me email if you have questions. (If there's a ton of questions we'll work out something more scalable.)
Hi,
When i try to get all children of my custom element in a connectedCallback (children can be custom elements), i can get all children when the definitions of custom elements are under HTML, BUT when the defintions are above, i just get normal element Without custom elements.

 - Case 1 :  KO

#-- custom elements defintions --#
<elmt-container>
    <div>1</div>
    <elmt-test>2</elmt-test>
</elmt-container>

Result : i just get the first div in the connectedCallback of elmt-container.

JsFiddle: https://jsfiddle.net/mcd7bd82/


 - Case 2 : OK

<elmt-container>
    <div>1</div>
    <elmt-test>2</elmt-test>
</elmt-container>
#-- custom elements defintions --#

result : i get all children in the connectedCallback of elmt-container.

JsFiddle: https://jsfiddle.net/4uw0a7yk/



On Chrome 54, the element is created (logged in the console) but the HTML is not updated. Did I miss something?

<!doctype html>
<html>
<head>
	<script>
		class Cev1 extends HTMLElement {
		
			constructor () 
			{
				super()
				this.innerHTML = "Hello V1"
				console.log( "created this=", this )				
			}
			
		} 
		customElements.define( "test-v1", Cev1 )
	</script>
</head>
	
<body>
	<test-v1>Avant</test-v1>
</body>
</html>
Comment 61 by kojii@chromium.org, Jul 30 2016
Cc: davaajav@google.com
#60: The spec requires constructors not to add children nor attributes, so your code is failing there. Move "innerHTML" to "connectedCallback".

We should be reporting errors to console in that case though, that part looks like a bug.

Next time, for individual issues, please file a separate bug.
Comment 62 by kojii@chromium.org, Jul 30 2016
Blockedon: 632940
Bruno, we also have a great article up at https://developers.google.com/web/fundamentals/primers/customelements with a bunch of examples you can follow.
Project Member Comment 64 by bugdroid1@chromium.org, Aug 3 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d41cf519e902ba24e51317004dc36e14af64fc50

commit d41cf519e902ba24e51317004dc36e14af64fc50
Author: davaajav <davaajav@google.com>
Date: Wed Aug 03 03:39:09 2016

CustomElements: upgrade element patch, setting custom element
state at the right time

HTMLConstructor should change status to "custom" only when the
definitions construction stack is empty, for example, when the
constructor is invoked with new.

If return value from the constructor is different from the
custom element, upgrade should throw "InvalidStateError"
DOMException.

BUG=594918

Review-Url: https://codereview.chromium.org/2161003002
Cr-Commit-Position: refs/heads/master@{#409445}

[delete] https://crrev.com/501b14ff550be4f5c8fbc5080ec0ddfa2df8271b/third_party/WebKit/LayoutTests/custom-elements/spec/upgrade-element-expected.txt
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/LayoutTests/custom-elements/spec/upgrade-element.html
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/d41cf519e902ba24e51317004dc36e14af64fc50/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 65 by bugdroid1@chromium.org, Aug 4 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6b25a0aa041c31e2ebd85bb308672809fc7d940a

commit 6b25a0aa041c31e2ebd85bb308672809fc7d940a
Author: davaajav <davaajav@google.com>
Date: Thu Aug 04 10:41:35 2016

CustomElements: adopt node

https://dom.spec.whatwg.org/#concept-node-adopt

3.2 For each inclusiveDescendant in node’s shadow-including inclusive
descendants that is a custom element, enqueue a custom element callback
reaction with inclusiveDescendant, callback name "adoptedCallback",
and an empty argument list.

BUG=594918

Review-Url: https://codereview.chromium.org/2170383002
Cr-Commit-Position: refs/heads/master@{#409759}

[add] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/LayoutTests/custom-elements/spec/adopt-node.html
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinitionBuilder.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLElementCustom.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/ElementRareData.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/ElementRareData.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/TreeScopeAdopter.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElement.h
[add] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElementAdoptedCallbackReaction.cpp
[add] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElementAdoptedCallbackReaction.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.h
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp
[modify] https://crrev.com/6b25a0aa041c31e2ebd85bb308672809fc7d940a/third_party/WebKit/Source/core/dom/custom/V0CustomElement.cpp

Project Member Comment 66 by bugdroid1@chromium.org, Aug 8 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dda455b659198c46ded45847d250876a81af5d07

commit dda455b659198c46ded45847d250876a81af5d07
Author: davaajav <davaajav@google.com>
Date: Mon Aug 08 06:47:26 2016

CustomElements: taking CustomElementReactionStack out of frameHost
and creating static object CustomElementReactionStack

Taking CustomElementReactionStack out of the frameHost, because having
it associated with the frameHost complicates ReactionStack retrieval
when an element is moved to a new document.
This patch does not change existing behaviours, no need for additional
tests.

BUG=594918

Review-Url: https://codereview.chromium.org/2214263003
Cr-Commit-Position: refs/heads/master@{#410310}

[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.cpp
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/dom/custom/CEReactionsScope.h
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.cpp
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/dom/custom/CustomElementReactionStack.h
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/frame/FrameHost.cpp
[modify] https://crrev.com/dda455b659198c46ded45847d250876a81af5d07/third_party/WebKit/Source/core/frame/FrameHost.h

Blockedon: 635402
Comment 68 by kochi@chromium.org, Aug 10 2016
Cc: kochi@chromium.org
Project Member Comment 69 by bugdroid1@chromium.org, Aug 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ec3e5c806702bd96aad3920f02b9dddc997e41e

commit 5ec3e5c806702bd96aad3920f02b9dddc997e41e
Author: dominicc <dominicc@chromium.org>
Date: Mon Aug 15 06:06:51 2016

The HTML parser synchronously creates custom elements

This starts to make element creation match the HTML spec's "create an element for a token" steps <https://html.spec.whatwg.org/#create-an-element-for-the-token> In particular, it starts running custom element constructors synchronously.

This changes the relationship between CustomElementsRegistry and V0CustomElementRegistrationContext. These objects have references to one another to prevent competing definitions in V0 and V1. CustomElementsRegistry have affinity to a window; V0CustomElementRegistrationContexts have affinity to documents. Previously the relationship between CustomElementsRegistry and V0CustomElementsRegistrationContext was 1:1, but that is inaccurate, because a window may replace its document. Now it is 1:M.

For the same reason this adds a pointer from the CustomElementsRegistry back to its owner LocalDOMWindow, instead of holding onto the window's document directly. Consequently CustomElementsRegistryTests have all become DummyPageHolder browser tests because they need windows.

BUG=594918

Review-Url: https://codereview.chromium.org/2200613002
Cr-Commit-Position: refs/heads/master@{#411941}

[add] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/core.gypi
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistry.h
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/frame/LocalDOMWindow.h
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
[add] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLParserReentryPermit.cpp
[add] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLParserReentryPermit.h
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.h
[modify] https://crrev.com/5ec3e5c806702bd96aad3920f02b9dddc997e41e/third_party/WebKit/Source/core/html/parser/HTMLTreeBuilder.cpp

Project Member Comment 70 by bugdroid1@chromium.org, Aug 15 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bd6470a3994c772c9d34be522e024013ca6b8649

commit bd6470a3994c772c9d34be522e024013ca6b8649
Author: dominicc <dominicc@chromium.org>
Date: Mon Aug 15 16:01:54 2016

Expose CustomElementsRegistry as an experimental web platform feature.

BUG=594918

Review-Url: https://codereview.chromium.org/2247633003
Cr-Commit-Position: refs/heads/master@{#411971}

[modify] https://crrev.com/bd6470a3994c772c9d34be522e024013ca6b8649/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member Comment 71 by bugdroid1@chromium.org, Aug 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/08bb8955e271a279233bfd43e14d3b7010ac066a

commit 08bb8955e271a279233bfd43e14d3b7010ac066a
Author: davaajav <davaajav@google.com>
Date: Tue Aug 16 03:04:17 2016

CustomElements: test create an element inside a template

The result of the test should be flipped when the spec changes
https://github.com/whatwg/dom/pull/291/files

BUG=594918

Review-Url: https://codereview.chromium.org/2241173002
Cr-Commit-Position: refs/heads/master@{#412150}

[add] https://crrev.com/08bb8955e271a279233bfd43e14d3b7010ac066a/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-inside-template.html

Project Member Comment 72 by bugdroid1@chromium.org, Aug 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3b1c03f0593639ebd6c88638c482e8fa178eb39

commit d3b1c03f0593639ebd6c88638c482e8fa178eb39
Author: davaajav <davaajav@google.com>
Date: Tue Aug 16 03:22:31 2016

CustomElements: each custom descendant should invoke
disconnectedCallback in shadow-including tree order

https://dom.spec.whatwg.org/#concept-node-remove

BUG=594918

Review-Url: https://codereview.chromium.org/2241183002
Cr-Commit-Position: refs/heads/master@{#412157}

[add] https://crrev.com/d3b1c03f0593639ebd6c88638c482e8fa178eb39/third_party/WebKit/LayoutTests/custom-elements/spec/remove-element.html

Project Member Comment 73 by bugdroid1@chromium.org, Aug 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c69dbf561d5321d7efa693967a7c3d34d06a8b25

commit c69dbf561d5321d7efa693967a7c3d34d06a8b25
Author: davaajav <davaajav@google.com>
Date: Tue Aug 16 04:35:42 2016

CustomElements: adoptedCallback should be invoked in tree order

3.3 For each inclusiveDescendant in node’s shadow-including inclusive
    descendants, in shadow-including tree order, run the adopting steps
    with inclusiveDescendant and oldDocument.

BUG=594918

Review-Url: https://codereview.chromium.org/2247663002
Cr-Commit-Position: refs/heads/master@{#412167}

[modify] https://crrev.com/c69dbf561d5321d7efa693967a7c3d34d06a8b25/third_party/WebKit/LayoutTests/custom-elements/spec/adopt-node.html

Project Member Comment 74 by bugdroid1@chromium.org, Aug 16 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71327934c72fb374ed60804a04c0627a9bdce588

commit 71327934c72fb374ed60804a04c0627a9bdce588
Author: davaajav <davaajav@google.com>
Date: Tue Aug 16 06:25:47 2016

CsutomElements: adoptedCallback unit test

adoptedCallback test
https://dom.spec.whatwg.org/#concept-node-adopt

BUG=594918

Review-Url: https://codereview.chromium.org/2249563002
Cr-Commit-Position: refs/heads/master@{#412179}

[modify] https://crrev.com/71327934c72fb374ed60804a04c0627a9bdce588/third_party/WebKit/Source/core/dom/custom/CustomElementsRegistryTest.cpp

Project Member Comment 75 by bugdroid1@chromium.org, Aug 19 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ec66e48c250406c6fff63e7d8d8cdeadd7c0995

commit 1ec66e48c250406c6fff63e7d8d8cdeadd7c0995
Author: kochi <kochi@chromium.org>
Date: Fri Aug 19 10:00:10 2016

Remove first argument for shoudCreateCustomElement()

After https://codereview.chromium.org/2252003002
(Change custom element state in documents without browsing context),
the first argument (document) is not necessary for
CustomElement::shouldCreateCustomElement().

This is clean-up only and no functional change.

BUG=594918

Review-Url: https://codereview.chromium.org/2258023003
Cr-Commit-Position: refs/heads/master@{#413096}

[modify] https://crrev.com/1ec66e48c250406c6fff63e7d8d8cdeadd7c0995/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl
[modify] https://crrev.com/1ec66e48c250406c6fff63e7d8d8cdeadd7c0995/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/1ec66e48c250406c6fff63e7d8d8cdeadd7c0995/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/1ec66e48c250406c6fff63e7d8d8cdeadd7c0995/third_party/WebKit/Source/core/dom/custom/CustomElement.h

Project Member Comment 76 by bugdroid1@chromium.org, Aug 22 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/29016e7c9d34b097f40a53c8e5e709ef1aced2cb

commit 29016e7c9d34b097f40a53c8e5e709ef1aced2cb
Author: kochi <kochi@chromium.org>
Date: Mon Aug 22 08:19:36 2016

Add custom elements in imports ordering tests.

This makes sure order of script execution in HTML imports,
which define custom elements.

BUG=594918

Review-Url: https://codereview.chromium.org/2269493002
Cr-Commit-Position: refs/heads/master@{#413419}

[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/circular-imports.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/nested-imports.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/resources/circular-level1.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/resources/circular-level2.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level1.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level2.html
[add] https://crrev.com/29016e7c9d34b097f40a53c8e5e709ef1aced2cb/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level3.html

The behavior described in comment #59 is always the same, and i don't think it matches the spec; any comments on it ?
Thanks
Comment 78 by kojii@chromium.org, Aug 22 2016
#77: sorry I looked at #60 but missed #59. Could you please open a new issue for it? That'll help us to make sure it won't got lost.
#78: ok, i added the issue 639847.
Comment 80 by kojii@chromium.org, Aug 23 2016
Blockedon: 640236
Comment 81 by kochi@chromium.org, Aug 24 2016
Blockedon: 640465
Comment 82 by kojii@chromium.org, Aug 25 2016
Blockedon: 640848
Comment 83 by kojii@chromium.org, Aug 25 2016
Blockedon: 640850
Project Member Comment 84 by bugdroid1@chromium.org, Aug 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2443446ab5e812272779bb80a82d680fb4d92126

commit 2443446ab5e812272779bb80a82d680fb4d92126
Author: kochi <kochi@chromium.org>
Date: Thu Aug 25 02:22:41 2016

Make custom elements work in HTML imports

Continuation from https://codereview.chromium.org/2132343002/

In HTML imports, custom elements should be created or
upgraded.

BUG=594918

Review-Url: https://codereview.chromium.org/2242743002
Cr-Commit-Position: refs/heads/master@{#414263}

[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/async-imports.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/async-nested-imports.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/circular-imports.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/create-element-in-import.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/detached-import.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/inner-html-in-import.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/nested-imports.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/async-component.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/async-nested-component.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/circular-level1.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/circular-level2.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/create-element.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/import-custom.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/inner-html.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level1.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level2.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/nested-level3.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/resources/upgrade.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/sync-create-element-order.html
[add] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/ExecutionContext.h
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.h
[modify] https://crrev.com/2443446ab5e812272779bb80a82d680fb4d92126/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorterTest.cpp

Project Member Comment 85 by bugdroid1@chromium.org, Aug 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0b6d8bd55f2530eef49f697330cd908769ef54d

commit b0b6d8bd55f2530eef49f697330cd908769ef54d
Author: kochi <kochi@chromium.org>
Date: Thu Aug 25 08:22:20 2016

Fix typos in custom element + imports layout tests

These tests are currently disabled by TestExpectation
for failing, but will be enabled again in the following CLs.

BUG=594918

Review-Url: https://codereview.chromium.org/2279693002
Cr-Commit-Position: refs/heads/master@{#414360}

[modify] https://crrev.com/b0b6d8bd55f2530eef49f697330cd908769ef54d/third_party/WebKit/LayoutTests/custom-elements/imports/resources/create-element.html
[modify] https://crrev.com/b0b6d8bd55f2530eef49f697330cd908769ef54d/third_party/WebKit/LayoutTests/custom-elements/imports/sync-create-element-order.html

Project Member Comment 86 by bugdroid1@chromium.org, Aug 25 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed691cd596251a924dafddd9e7402f8259fe1167

commit ed691cd596251a924dafddd9e7402f8259fe1167
Author: kochi <kochi@chromium.org>
Date: Thu Aug 25 11:29:57 2016

Ship Custom Elements v1

Flip CustomElementsV1 flag in RuntimeEnabledFeatures to stable.

Got 3 LGTMs for Intent-to-Ship in blink-dev:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/P2UKXfsFWWE/discussion

BUG=594918

Review-Url: https://codereview.chromium.org/2274883004
Cr-Commit-Position: refs/heads/master@{#414395}

[modify] https://crrev.com/ed691cd596251a924dafddd9e7402f8259fe1167/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/ed691cd596251a924dafddd9e7402f8259fe1167/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Comment 87 by m...@mko.io, Aug 27 2016
🎉🎉🎉🎉
Project Member Comment 88 by bugdroid1@chromium.org, Aug 30 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/130931a943430f64f69dfb238571d74762f84160

commit 130931a943430f64f69dfb238571d74762f84160
Author: kochi <kochi@chromium.org>
Date: Tue Aug 30 09:09:18 2016

Avoid redundant hash calculations in CustomElementUpgradeSorter

Pointed out by tkent in https://codereview.chromium.org/2242743002/

The original code could do 2 hash calculations for
adding a new key-value pair to ParentChildMap
(for find() and add()), and rehashing the map
may involve copying the HeapHashSet<Member<Node>>
objects.

Change the value part of ParentChildMap from a HeapHashMap
object to its pointer, to avoid redundant hash calculation
and object copy.

This does not change any functionality of the class.

BUG=594918

Review-Url: https://codereview.chromium.org/2290543002
Cr-Commit-Position: refs/heads/master@{#415251}

[modify] https://crrev.com/130931a943430f64f69dfb238571d74762f84160/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.cpp
[modify] https://crrev.com/130931a943430f64f69dfb238571d74762f84160/third_party/WebKit/Source/core/dom/custom/CustomElementUpgradeSorter.h

Blockedon: 643030
Blockedon: -643030
Project Member Comment 91 by bugdroid1@chromium.org, Sep 7 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f1ba39a2ce5eb319a070461aa812fc3ff17684b

commit 8f1ba39a2ce5eb319a070461aa812fc3ff17684b
Author: kochi <kochi@chromium.org>
Date: Wed Sep 07 08:06:14 2016

Add a test for adoptedCallback for custom elements in imports

BUG=594918

Review-Url: https://codereview.chromium.org/2296663002
Cr-Commit-Position: refs/heads/master@{#416879}

[add] https://crrev.com/8f1ba39a2ce5eb319a070461aa812fc3ff17684b/third_party/WebKit/LayoutTests/custom-elements/imports/adopted-callback.html
[add] https://crrev.com/8f1ba39a2ce5eb319a070461aa812fc3ff17684b/third_party/WebKit/LayoutTests/custom-elements/imports/resources/adopted-nodes.html

Project Member Comment 92 by bugdroid1@chromium.org, Sep 13 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d9a1945abf1dde3b23e56afb59c24e773340672a

commit d9a1945abf1dde3b23e56afb59c24e773340672a
Author: kochi <kochi@chromium.org>
Date: Tue Sep 13 08:00:28 2016

Add a test for {connected,disconnected}Callback in HTML Imports

This adds a test case for connectedCallback and disconnectedCallback
for custom elements in HTML imports.

BUG=594918

Review-Url: https://codereview.chromium.org/2333673002
Cr-Commit-Position: refs/heads/master@{#418193}

[add] https://crrev.com/d9a1945abf1dde3b23e56afb59c24e773340672a/third_party/WebKit/LayoutTests/custom-elements/imports/connected-callback.html
[add] https://crrev.com/d9a1945abf1dde3b23e56afb59c24e773340672a/third_party/WebKit/LayoutTests/custom-elements/imports/resources/connected-parsercreate.html
[add] https://crrev.com/d9a1945abf1dde3b23e56afb59c24e773340672a/third_party/WebKit/LayoutTests/custom-elements/imports/resources/connected-upgrade.html

Components: -Blink>WebComponents Blink>HTML>CustomElements
Status: Fixed
Summary: Launch Autonomous Custom Elements ("v1") (was: Launch Custom Elements v1)
Customized built-in elements have not launched yet, see Issue 652579 for that.
Blockedon: -618606
Sign in to add a comment