New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 648828 link

Starred by 30 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature


Sign in to add a comment

Implement Customized Builtin Elements

Project Member Reported by yurak@google.com, Sep 21 2016

Issue description

Implement customized built-in elements

1. Implement HTMLConstructor
    https://html.spec.whatwg.org/#html-element-constructors
2. CustomElementRegistry algorithm for customized built-in elements
    https://html.spec.whatwg.org/multipage/scripting.html#element-definition
3. Implement create element algorithm
    https://dom.spec.whatwg.org/#concept-create-element
4. Implement document.createElement
    https://dom.spec.whatwg.org/#dom-document-createelement
5. Parser treats elements with 'is' attribute differently
 
Components: -Blink Blink>DOM Blink>WebComponents
Labels: -Type-Bug OS-Android OS-Chrome OS-Mac OS-Windows Type-Feature
Owner: dominicc@chromium.org
Status: Started (was: Unconfirmed)
yurak at Google is working on this. Assigning to me until she has EditBugs access.

We will go through the launch process for this, but for now I won't decorate this as a launch issue until we have more specific plans to ship it.
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 21 2016

Labels: Hotlist-Google
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ad512924f794cd4cbee80246106716993919bde

commit 6ad512924f794cd4cbee80246106716993919bde
Author: yurak <yurak@google.com>
Date: Wed Oct 05 03:46:58 2016

Implemented HTMLConstructor extended attribute.

Specs: https://html.spec.whatwg.org/#html-element-constructors

Replaced V8HTMLElementCustom with V8HTMLConstructor

Add new extended attribute [HTMLConstructor] to bindings and IDLExtendedAttributes.txt
  Added description to IDLExtendedAttributes.md and re-organized descriptions
  Added checks for conflicting extended attributes with [HTMLConstructor] in v8_interface.py
  Edited jinja templates for [HTMLConstructor] interface

Replaced [CustomConstructor] with [HTMLConstructor] in HTMLElement.idl

BUG= 648828 

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

[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/bindings.gni
[rename] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/core/v8/V8HTMLConstructor.cpp
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
[modify] https://crrev.com/6ad512924f794cd4cbee80246106716993919bde/third_party/WebKit/Source/core/html/HTMLElement.idl

Comment 4 by hayato@chromium.org, Oct 12 2016

Components: -Blink>WebComponents -Blink>DOM Blink>HTML>CustomElements
Blocking: 652579
Cc: dominicc@chromium.org
Owner: yurak@google.com
Blockedon: 618606
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 28 2016

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

commit e8d4a1b8a06a252894820686f1570f5943bb5947
Author: yurak <yurak@google.com>
Date: Fri Oct 28 05:00:07 2016

Complete HTMLConstructor algorithm, based off Issue#2386563002 by davaajav.

Depends on Issue#2419383002.

Completed HTMLConstructor algorithm, modified custom element definition algorithm
    /bindings/core/v8/V8HTMLConstructor.cpp
    /core/dom/custom/CustomElementRegistry.cpp

Added HTMLConstructor extended attribute to HTML element IDLS:
    HTMLDivElement.idl
    HTMLParagraphElement.idl

Created separate class for HTMLConstructor
    /bindings/bindings.gni
    /bindings/core/v8/V8HTMLConstructor.cpp
    /bindings/core/v8/V8HTMLConstructor.h
    /bindings/scripts/v8_interface.py
    /bindings/templates/interface.cpp.tmpl
    /bindings/templates/interface.h.tmpl

Updated custom-elements tests and expected results.

The changes should allow Layout test imported/wpt/custom-elements/htmlconstructor/newtarget.html to pass, but it's buggy.
Bug fix for test here: https://github.com/w3c/web-platform-tests/commit/ac12d9a15df23cf25cbfb904902dad2bd6dfdf6a

BUG= 648828 

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

[delete] https://crrev.com/13589faa74b1c1c8ab1b1849903b0585ef09f922/third_party/WebKit/LayoutTests/custom-elements/spec/define-builtin-element-expected.txt
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/LayoutTests/custom-elements/spec/define-builtin-element.html
[delete] https://crrev.com/13589faa74b1c1c8ab1b1849903b0585ef09f922/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/custom-element-registry/define-expected.txt
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/LayoutTests/imported/wpt/custom-elements/htmlconstructor/newtarget-expected.txt
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/bindings.gni
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/core/v8/V8HTMLConstructor.cpp
[add] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/core/v8/V8HTMLConstructor.h
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/scripts/v8_interface.py
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/core/html/HTMLDivElement.idl
[modify] https://crrev.com/e8d4a1b8a06a252894820686f1570f5943bb5947/third_party/WebKit/Source/core/html/HTMLParagraphElement.idl

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/24d712bfdf73e44b31fa9d058ba37e035cbe58ad

commit 24d712bfdf73e44b31fa9d058ba37e035cbe58ad
Author: yurak <yurak@google.com>
Date: Tue Nov 08 03:14:34 2016

https://html.spec.whatwg.org/multipage/scripting.html#look-up-a-custom-element-definition

Steps 1-3 already implemented in:
    /core/html/parser/HTMLConstructionSite.cpp

Steps 4-6 made a little faster in CustomElementRegistry.cpp

Unit tests added for custom element definition look up.

Replaced uses of definitionForName with definitionFor.
    CustomElementRegistry.cpp
    CustomElement.cpp
There are other calls to definitionForName, but those are fine according to spec.

I'll do another patch to use the 'is' attribute in definitionFor. Right now it's using the localName twice.

BUG= 648828 

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

[modify] https://crrev.com/24d712bfdf73e44b31fa9d058ba37e035cbe58ad/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/24d712bfdf73e44b31fa9d058ba37e035cbe58ad/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp
[modify] https://crrev.com/24d712bfdf73e44b31fa9d058ba37e035cbe58ad/third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.h
[modify] https://crrev.com/24d712bfdf73e44b31fa9d058ba37e035cbe58ad/third_party/WebKit/Source/core/dom/custom/CustomElementRegistryTest.cpp

Comment 9 by yurak@google.com, Nov 17 2016

Blockedon: 666166

Comment 10 by yurak@google.com, Nov 17 2016

Description: Show this description
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 18 2016

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

commit fe200cd217b99368dbded68a0350d33c552c6a5b
Author: yurak <yurak@google.com>
Date: Fri Nov 18 08:08:40 2016

https://dom.spec.whatwg.org/#dom-document-createelement
    Definition is checked for HTML namespace elements in document.createElement
    Customized built-in elements can now be created with the document.createElement
        NOTE: This is behind runtime enabled flag "CustomElementsBuiltin".

Syntax:
    https://html.spec.whatwg.org/multipage/scripting.html#custom-elements-customized-builtin-example

Implemented create element algorithm
    https://dom.spec.whatwg.org/#concept-create-element
Steps 5-7:
    /core/dom/custom/CustomElement.cpp

Added some tests.

(Sorry this patch is big)

BUG= 648828 , 657583 

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

[modify] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-synchronous.html
[add] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/LayoutTests/custom-elements/spec/create-element.html
[modify] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/LayoutTests/custom-elements/v0-v1-interop.html
[delete] https://crrev.com/bd0d9c52947c4db46e946743783660bd06354359/third_party/WebKit/LayoutTests/fast/dom/custom/create-element-second-arg.html
[modify] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp
[modify] https://crrev.com/fe200cd217b99368dbded68a0350d33c552c6a5b/third_party/WebKit/Source/core/dom/custom/CustomElement.h

Comment 13 by yurak@google.com, Dec 8 2016

Description: Show this description

Comment 14 by yurak@google.com, Dec 8 2016

Description: Show this description

Comment 15 by yurak@google.com, Dec 8 2016

Blockedon: 672359
Project Member

Comment 16 by sheriffbot@chromium.org, Jan 20 2017

Labels: Hotlist-Recharge-BouncingOwner
Status: Untriaged (was: Started)
The assigned owner "yurak@google.com" is not able to receive e-mails, please re-triage.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: ----
Cc: -dominicc@chromium.org
Owner: dominicc@chromium.org
Status: Assigned (was: Untriaged)
Status: Started (was: Assigned)
Early returns from v0CustomElement* use counters indicate that both autonomous and customized built-in elements are being used. We should implement v1 autonomous customized built-in elements to give users a path forward so we can move ahead with deprecating custom elements v0.
Project Member

Comment 20 by bugdroid1@chromium.org, Apr 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0152a0cddd258abfafefdcf14da540acb04a729b

commit 0152a0cddd258abfafefdcf14da540acb04a729b
Author: dominicc <dominicc@chromium.org>
Date: Wed Apr 26 08:55:43 2017

De-duplicate create element code paths in the HTML parser.

The HTMLElementFactory used to take the form element pointer for form
association. That operation happens as a discrete step now for
customized built-in elements. Now that HTMLElementFactory doesn't do
form association any more, HTML and non-HTML element construction can
be merged together the way they are in the specs.

BUG= 648828 

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

[modify] https://crrev.com/0152a0cddd258abfafefdcf14da540acb04a729b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
[modify] https://crrev.com/0152a0cddd258abfafefdcf14da540acb04a729b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.h

Blockedon: 736967

Comment 22 by kochi@chromium.org, Dec 27 2017

Owner: ----
Status: Available (was: Started)
Making this available.

Comment 23 by tkent@chromium.org, Jan 24 2018

Cc: a.obzhirov@samsung.com
 Issue 652579  has been merged into this issue.

Comment 24 by tkent@chromium.org, Jan 24 2018

Blocking: 658284

Comment 25 by tkent@chromium.org, Jan 24 2018

Blockedon: 805280

Comment 26 by tkent@chromium.org, Jan 24 2018

Blockedon: 805281

Comment 27 by tkent@chromium.org, Jan 24 2018

Blockedon: 805326

Comment 28 by tkent@chromium.org, Jan 26 2018

Labels: -Pri-2 M-66 Pri-1
Owner: tkent@chromium.org
Status: Assigned (was: Available)

Comment 29 by tkent@chromium.org, Jan 26 2018

Labels: -Pri-1 Pri-2

Comment 30 by tkent@chromium.org, Jan 29 2018

Blockedon: 806639

Comment 31 by tkent@chromium.org, Jan 29 2018

Blockedon: 806641

Comment 32 by tkent@chromium.org, Jan 29 2018

Blockedon: 806665

Comment 33 by tkent@chromium.org, Jan 30 2018

Blockedon: 807205

Comment 34 by tkent@chromium.org, Jan 31 2018

Blockedon: 807514
Project Member

Comment 35 by bugdroid1@chromium.org, Jan 31 2018

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

commit 9d8b61594eeb8d85873c3a6c2224a2f97ff9dd1f
Author: Kent Tamura <tkent@chromium.org>
Date: Wed Jan 31 11:24:14 2018

custom-elements: Promote CustomElementsBuiltin flag to "experimental"

Bug:  648828 
Change-Id: If19afe0ad2aa29eb5a042306f260d5eac77e0f0e
Reviewed-on: https://chromium-review.googlesource.com/895423
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533250}
[modify] https://crrev.com/9d8b61594eeb8d85873c3a6c2224a2f97ff9dd1f/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Blockedon: 807871
Project Member

Comment 37 by bugdroid1@chromium.org, Feb 1 2018

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

commit c851ddb7773246a17d8b3351727cb785d50a451c
Author: Kent Tamura <tkent@chromium.org>
Date: Thu Feb 01 11:26:40 2018

custom-elements: Update some tests depending on uncommon features.

* The following features are not implemented widely. Enable their tests
  conditionally:
 - CSSStyleDeclaration.setPropertyValue
 - CSSStyleDeclaration.setPropertyPriority
 - HTMLInputElement.capture

* The following features were removed from the specification. Remove tests.
 - HTMLElement.dropzone
 - HTMLElement.contextMenu

Bug:  648828 
Change-Id: Id76596fb50bc62166c1ae4b051ef46181b35b518
Reviewed-on: https://chromium-review.googlesource.com/896667
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533638}
[delete] https://crrev.com/9b6f02826cf326f74f46eef9d145b907198c2ff3/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/CSSStyleDeclaration-expected.txt
[modify] https://crrev.com/c851ddb7773246a17d8b3351727cb785d50a451c/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/CSSStyleDeclaration.html
[delete] https://crrev.com/9b6f02826cf326f74f46eef9d145b907198c2ff3/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/HTMLElement-expected.txt
[modify] https://crrev.com/c851ddb7773246a17d8b3351727cb785d50a451c/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/HTMLElement.html
[delete] https://crrev.com/9b6f02826cf326f74f46eef9d145b907198c2ff3/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/HTMLInputElement-expected.txt
[modify] https://crrev.com/c851ddb7773246a17d8b3351727cb785d50a451c/third_party/WebKit/LayoutTests/external/wpt/custom-elements/reactions/HTMLInputElement.html

Blockedon: 808302
Blockedon: 808311
Blockedon: 808365

Comment 41 by tkent@chromium.org, Feb 20 2018

Blockedon: 813675

Comment 42 Deleted

Comment 43 by tkent@chromium.org, Feb 22 2018

Blockedon: 814644
Project Member

Comment 44 by bugdroid1@chromium.org, Mar 16 2018

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

commit 4a2b6e0a71e6d8f664697210b5fb407281ba0941
Author: Kent Tamura <tkent@chromium.org>
Date: Fri Mar 16 03:02:59 2018

Enabled Customized Built-in elements by default.

Approved intent-to-ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/S3naD9vIcM4/7tKyfvi0AgAJ

Bug:  648828 
Change-Id: Ia4e1d43170f2f298f1e55bad6bc4173556cd2ca9
Reviewed-on: https://chromium-review.googlesource.com/965641
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543606}
[modify] https://crrev.com/4a2b6e0a71e6d8f664697210b5fb407281ba0941/third_party/WebKit/Source/platform/runtime_enabled_features.json5

Comment 45 by tkent@chromium.org, Mar 16 2018

Labels: M-67
Status: Fixed (was: Assigned)
Thank you everyone who worked on this feature! It's been a long wait but I'm so happy it's finally here!

Haven't been this enamored with a new Chrome release since position:sticky was finally added to stable.

Sign in to add a comment