New issue
Advanced search Search tips

Issue 670572 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 667324



Sign in to add a comment

SVG <use> elements should use a closed shadow tree, instead of a user agent shadow tree

Project Member Reported by hayato@chromium.org, Dec 2 2016

Issue description

According to the latest SVG spec (https://svgwg.org/svg2-draft/struct.html#UseShadowTree),
SVGUseElement should use open shadow trees, instead of UA shadow trees.

> The shadow tree is open (inspectable by script), but read-only. Any attempt to directly modify the elements, attributes, and other nodes in the shadow tree must throw a NoModificationAllowedError.

The spec also says that it should be read-only, though I am not sure whether it is feasible or not in a reasonable way.

 
This might be a blocking issue for  bug 667324  because it is not good to expose UA shadow trees to JavaScript.

Comment 2 by hayato@chromium.org, Mar 15 2017

Labels: -Pri-3 Pri-1
Owner: hayato@chromium.org
Status: Assigned (was: Available)
Summary: SVG <use> elements should use a closed shadow tree, instead of a user agent shadow tree (was: SVG <use> elements should use open shadow trees)

Comment 3 by hayato@chromium.org, Mar 15 2017

Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 16 2017

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

commit 17fa68c396c45e6650df5dd2777a0112800ae61d
Author: hayato <hayato@chromium.org>
Date: Thu Mar 16 10:11:21 2017

Change the type of a SVG <use> element's shadow tree from "user agent" to "closed"

The SVG 2's spec is: https://svgwg.org/svg2-draft/struct.html#UseElement

Because SVG spec has been updated to clarify that SVG's <use> element should
use a shadow tree as its implementation, we must use the *standard* shadow tree
which DOM Standard defines its behavior. That is either an open shadow root or
a closed shadow root. It should not be a user-agent shadow root because it is UA's
internal concept.

Though the SVG spec says nothing about which type of Shadow Root should be
used, this CL chose "closed" because it is more compatible to the behavior of
user-agent shadow root.  Eventually, the spec should clarify the type.

BUG= 670572 

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

[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/input/GestureManager.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/layout/HitTestResult.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/layout/HitTestResult.h
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/svg/SVGElement.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/svg/SVGUseElement.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/core/svg/SVGUseElement.h
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/web/ContextMenuClientImpl.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/web/PageWidgetDelegate.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
[modify] https://crrev.com/17fa68c396c45e6650df5dd2777a0112800ae61d/third_party/WebKit/Source/web/WebViewImpl.cpp

Comment 5 by hayato@chromium.org, Mar 16 2017

Status: Fixed (was: Started)

Sign in to add a comment