|
|
Created:
4 years, 10 months ago by hayato Modified:
4 years, 10 months ago CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionAllow attachShadow only for elements in the safelist
The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1
The spec discussion is: https://github.com/w3c/webcomponents/issues/110
BUG=531990
Committed: https://crrev.com/ab5dc4686858b7d8e90d78247365325be61a9e90
Cr-Commit-Position: refs/heads/master@{#375539}
Patch Set 1 #Patch Set 2 : wip #Patch Set 3 : fix #Patch Set 4 : fix #Patch Set 5 : rebased #
Total comments: 6
Patch Set 6 : Remove expected.txt #
Messages
Total messages: 34 (13 generated)
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/1
Description was changed from ========== Allow attachShadow only for element in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 ========== to ========== Allow attachShadow only for elements in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 ==========
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
wip
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
fix
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/20001
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
fix
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/60001
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
rebased
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/80001
hayato@chromium.org changed reviewers: + kochi@chromium.org, tkent@chromium.org
PTAL
https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() Can you add a reference URL as a comment? https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() Is isCustomElement() guaranteed to work when attachShadow() is used in createdCallback?
Thank you for the review. https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() On 2016/02/16 06:56:13, kochi wrote: > Is isCustomElement() guaranteed to work when attachShadow() is used in > createdCallback? Could you elaborate the case? I do not understand the point. https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() On 2016/02/16 06:56:13, kochi wrote: > Can you add a reference URL as a comment? I do not think we need to refer it. It is obvious that this safelist is defined in the spec of Element.attachShadow from the name of Element::attachShadow.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/dom/Element.cpp (right): https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() On 2016/02/16 07:11:13, hayato wrote: > On 2016/02/16 06:56:13, kochi wrote: > > Can you add a reference URL as a comment? > > I do not think we need to refer it. > It is obvious that this safelist is defined in the spec of Element.attachShadow > from the name of Element::attachShadow. Acknowledged. https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = isCustomElement() On 2016/02/16 07:11:13, hayato wrote: > On 2016/02/16 06:56:13, kochi wrote: > > Is isCustomElement() guaranteed to work when attachShadow() is used in > > createdCallback? > > Could you elaborate the case? I do not understand the point. I thought a real custom element is an element which is already upgraded. Do we allow attaching a shadow on arbitrary element with name consisting '-' but which is not really a custom element yet? Mentioning createdCallback was confusing. I should have meant "a element without document.registerElement (or defineElement)". I guess it's safe to allow for such elements who are waiting for upgrade, but I may miss something if we allow attaching a shadow before upgrading, so I wanted to make sure we are safe to allow attaching shadow for those elements.
On 2016/02/16 07:28:15, kochi wrote: > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > File third_party/WebKit/Source/core/dom/Element.cpp (right): > > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = > isCustomElement() > On 2016/02/16 07:11:13, hayato wrote: > > On 2016/02/16 06:56:13, kochi wrote: > > > Can you add a reference URL as a comment? > > > > I do not think we need to refer it. > > It is obvious that this safelist is defined in the spec of > Element.attachShadow > > from the name of Element::attachShadow. > > Acknowledged. > > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = > isCustomElement() > On 2016/02/16 07:11:13, hayato wrote: > > On 2016/02/16 06:56:13, kochi wrote: > > > Is isCustomElement() guaranteed to work when attachShadow() is used in > > > createdCallback? > > > > Could you elaborate the case? I do not understand the point. > > I thought a real custom element is an element which is already upgraded. > Do we allow attaching a shadow on arbitrary element with name consisting '-' > but which is not really a custom element yet? > > Mentioning createdCallback was confusing. > I should have meant "a element without document.registerElement (or > defineElement)". > > I guess it's safe to allow for such elements who are waiting for upgrade, but I > may > miss something if we allow attaching a shadow before upgrading, so I wanted to > make > sure we are safe to allow attaching shadow for those elements. I got it. We should allow it. That's my intention. Maybe the spec should be clarified with that.
On 2016/02/16 07:46:34, hayato wrote: > On 2016/02/16 07:28:15, kochi wrote: > > > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > > File third_party/WebKit/Source/core/dom/Element.cpp (right): > > > > > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > > third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = > > isCustomElement() > > On 2016/02/16 07:11:13, hayato wrote: > > > On 2016/02/16 06:56:13, kochi wrote: > > > > Can you add a reference URL as a comment? > > > > > > I do not think we need to refer it. > > > It is obvious that this safelist is defined in the spec of > > Element.attachShadow > > > from the name of Element::attachShadow. > > > > Acknowledged. > > > > > https://codereview.chromium.org/1698183003/diff/80001/third_party/WebKit/Sour... > > third_party/WebKit/Source/core/dom/Element.cpp:1917: bool tagNameIsSupported = > > isCustomElement() > > On 2016/02/16 07:11:13, hayato wrote: > > > On 2016/02/16 06:56:13, kochi wrote: > > > > Is isCustomElement() guaranteed to work when attachShadow() is used in > > > > createdCallback? > > > > > > Could you elaborate the case? I do not understand the point. > > > > I thought a real custom element is an element which is already upgraded. > > Do we allow attaching a shadow on arbitrary element with name consisting '-' > > but which is not really a custom element yet? > > > > Mentioning createdCallback was confusing. > > I should have meant "a element without document.registerElement (or > > defineElement)". > > > > I guess it's safe to allow for such elements who are waiting for upgrade, but > I > > may > > miss something if we allow attaching a shadow before upgrading, so I wanted to > > make > > sure we are safe to allow attaching shadow for those elements. > > I got it. We should allow it. That's my intention. Maybe the spec should be > clarified with that. Thanks, lgtm then! It looks imported/web-platform-tests/shadow-dom/Element-interface-attachShadow.html is passing with this change (which is good!) Could you remove imported/web-platform-tests/shadow-dom/Element-interface-attachShadow-expected.txt in this CL? The only failing test is the test that passed with this change, so we no longer need the -expected.txt file.
The CQ bit was checked by hayato@chromium.org to run a CQ dry run
Remove expected.txt
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/100001
lgtm
The CQ bit was unchecked by hayato@chromium.org
The CQ bit was checked by hayato@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1698183003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1698183003/100001
Message was sent while issue was closed.
Description was changed from ========== Allow attachShadow only for elements in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 ========== to ========== Allow attachShadow only for elements in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Allow attachShadow only for elements in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 ========== to ========== Allow attachShadow only for elements in the safelist The spec is: http://w3c.github.io/webcomponents/spec/shadow/#methods-1 The spec discussion is: https://github.com/w3c/webcomponents/issues/110 BUG=531990 Committed: https://crrev.com/ab5dc4686858b7d8e90d78247365325be61a9e90 Cr-Commit-Position: refs/heads/master@{#375539} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/ab5dc4686858b7d8e90d78247365325be61a9e90 Cr-Commit-Position: refs/heads/master@{#375539} |