Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Issue 2002903002: Hook createElement for Custom Elements V1 (Closed)

Created:
4 years, 7 months ago by kojii
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, dominicc+watchlist_chromium.org, eae+blinkwatch, rwlbuis, sof, webcomponents-bugzilla_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853 Cr-Commit-Position: refs/heads/master@{#396078}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add test #

Patch Set 3 : Add createElementNS tests #

Patch Set 4 : RuntimeEnabledFeatures #

Total comments: 16

Patch Set 5 : dominicc review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -2 lines) Patch
M third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl View 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 3 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElement.h View 1 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElement.cpp View 1 2 3 4 2 chunks +45 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/custom/CustomElementTest.cpp View 1 2 3 4 2 chunks +62 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 20 (5 generated)
kojii
Not ready for review yet, but I think these are all the places we need ...
4 years, 7 months ago (2016-05-23 09:40:20 UTC) #2
kojii
PTAL, tests added.
4 years, 7 months ago (2016-05-24 01:37:30 UTC) #4
yosin_UTC9
https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp File third_party/WebKit/Source/core/dom/custom/CustomElement.cpp (right): https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp#newcode80 third_party/WebKit/Source/core/dom/custom/CustomElement.cpp:80: Element* e = document.registrationContext()->createCustomTagElement(document, tagName); nit: Could you avoid ...
4 years, 7 months ago (2016-05-25 01:16:20 UTC) #6
kojii
Thank you for review. https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp File third_party/WebKit/Source/core/dom/custom/CustomElement.cpp (right): https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp#newcode80 third_party/WebKit/Source/core/dom/custom/CustomElement.cpp:80: Element* e = document.registrationContext()->createCustomTagElement(document, tagName); ...
4 years, 7 months ago (2016-05-25 02:44:54 UTC) #7
yosin_UTC9
https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp File third_party/WebKit/Source/core/dom/custom/CustomElement.cpp (right): https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp#newcode87 third_party/WebKit/Source/core/dom/custom/CustomElement.cpp:87: element->setCustomElementState(CustomElementState::Undefined); On 2016/05/25 at 02:44:53, kojii wrote: > On ...
4 years, 7 months ago (2016-05-25 04:18:15 UTC) #8
kojii
On 2016/05/25 at 04:18:15, yosin wrote: > https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp > File third_party/WebKit/Source/core/dom/custom/CustomElement.cpp (right): > > https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/core/dom/custom/CustomElement.cpp#newcode87 ...
4 years, 7 months ago (2016-05-25 04:25:25 UTC) #9
kojii
On 2016/05/25 at 04:18:15, yosin wrote: > I summarize initial state of "customer element state": ...
4 years, 7 months ago (2016-05-25 04:27:52 UTC) #10
dominicc (has gone to gerrit)
Some comments inline. https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl (right): https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl#newcode93 third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl:93: if (CustomElement::shouldCreateCustomElement(document, localName)) :/ this might ...
4 years, 7 months ago (2016-05-25 05:25:52 UTC) #11
dominicc (has gone to gerrit)
> I guess "is" happens in parserSetAttributes? Answer my own question: It's in Element::attributeChangedByParserOrByCloning. We ...
4 years, 7 months ago (2016-05-25 05:27:48 UTC) #12
kojii
Thank you for the review, CL updated and comments inline: https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl File third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl (right): https://codereview.chromium.org/2002903002/diff/60001/third_party/WebKit/Source/build/scripts/templates/ElementFactory.cpp.tmpl#newcode93 ...
4 years, 7 months ago (2016-05-25 05:58:24 UTC) #13
dominicc (has gone to gerrit)
lgtm I was fearful about leaving ElementFactory.cpp.tmpl lines 97-102, given there's another version of them ...
4 years, 7 months ago (2016-05-25 22:01:39 UTC) #14
kojii
On 2016/05/25 at 22:01:39, dominicc wrote: > lgtm > > I was fearful about leaving ...
4 years, 7 months ago (2016-05-26 01:16:11 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2002903002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2002903002/80001
4 years, 7 months ago (2016-05-26 01:17:12 UTC) #17
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-26 01:24:09 UTC) #18
commit-bot: I haz the power
4 years, 7 months ago (2016-05-26 01:25:18 UTC) #20
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/1d85c7a9c9f2c5d668adef2ae8c35f17679a5853
Cr-Commit-Position: refs/heads/master@{#396078}

Powered by Google App Engine
This is Rietveld 408576698