New issue
Advanced search Search tips

Issue 692665 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 674593



Sign in to add a comment

ShadowRoot#cloneNode no need to override

Project Member Reported by lunalu@chromium.org, Feb 15 2017

Issue description

The spec does not override it. foolip@, are you planing to fix this issue soon?


 

Comment 1 by foolip@chromium.org, Feb 16 2017

Components: Blink>DOM>ShadowDOM
This is observable to scripts and we should fix it, but I'm not planning to tackle it myself. The problem is that cloneNode() should throw on ShadowRoot, but the cloneNode() on Node doesn't have [ThrowsException]. The simplest fix is to just add it on Node.

This is now part of https://dom.spec.whatwg.org/#dom-node-clonenode so it doesn't need to be kept separate from DOM.

Comment 2 by hayato@chromium.org, Feb 16 2017

Owner: hayato@chromium.org
Status: Assigned (was: Untriaged)
Nice catch. Let me work on that. ShadowRoot.cloneNode had a history, and I guess we had introduced a mismatch between that and Node's one.
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 17 2017

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

commit 050bd3b819cc8502db03e3b70f97e951c66e4857
Author: hayato <hayato@chromium.org>
Date: Fri Feb 17 07:13:50 2017

Remove unnecessary override of Node#cloneNode in ShadowRoot's WebIDL

ShadowRoot's WebIDL does not have to override Node's cloneNode().
That exists for a historical reason, which is no longer valid.

Align Node's WebIDL to have [RaisesException].

BUG= 692665 

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

[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/LayoutTests/fast/dom/shadow/shadowroot-clonenode-expected.txt
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/LayoutTests/fast/dom/shadow/shadowroot-clonenode.html
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Attr.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Attr.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Comment.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Comment.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Document.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Document.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/DocumentFragment.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/DocumentFragment.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/DocumentType.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/DocumentType.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Element.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Element.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Node.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Node.idl
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/ProcessingInstruction.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Text.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/Text.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.idl
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/html/HTMLTemplateElement.cpp
[modify] https://crrev.com/050bd3b819cc8502db03e3b70f97e951c66e4857/third_party/WebKit/Source/core/html/HTMLTemplateElement.h

Comment 4 by hayato@chromium.org, Feb 17 2017

Status: Fixed (was: Assigned)

Sign in to add a comment