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

Issue 216463003: Allow <use> inside author shadow roots (Closed)

Created:
6 years, 9 months ago by pdr.
Modified:
6 years, 8 months ago
Reviewers:
esprehn
CC:
blink-reviews, krit, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, kouhei+svg_chromium.org, rwlbuis, Stephen Chennney
Visibility:
Public.

Description

Allow <use> inside author shadow roots This patch fixes a bug where <use> elements did not work in author shadow trees due to a restriction that <use> trees are not expanded inside shadow trees. This restriction was in place so that we don't nest <use> shadow trees but instead expand nested <use> elements manually using the top-level <use> element. For example: <defs> __<use id="a"> ____<rect> __<use id="b" xlink:href="#a"> </defs> <use id="c" xlink:href="#b"> When creating the "c" shadow tree, "b" is first added: <use id="c"> __#user-agent-shadow-root ____<use id="b"> And then "b" is "expanded" (see: expandUseElementsInShadowTree): <use id="c"> __#user-agent-shadow-root ____<g id="b"> ______<use id="a"> Finally "a" is "expanded": <use id="c"> __#user-agent-shadow-root ____<g id="b"> ______<g id="a"> ________<rect> The checks preventing <use> tree expansion in shadow trees were intended to prevent the nested <use> elements (or <symbol>) from creating nested shadow roots--notice there is only one shadow root in the above example. This patch switches the isInShadowTree checks with isInUserAgentShadowTree which will prevent <use> elements from cloning their targets when nested inside another <use> shadow tree, but allow <use> elements with author shadow roots. BUG=356891 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170614

Patch Set 1 #

Patch Set 2 : Remove loop in isInUserAgentShadowTree, add a title test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -12 lines) Patch
A LayoutTests/svg/dom/nested-use-in-shadow-tree.html View 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/svg/dom/nested-use-in-shadow-tree-expected.html View 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/svg/dom/title-in-shadow-tree.html View 1 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/svg/dom/title-in-shadow-tree-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/svg/dom/use-in-shadow-tree.html View 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/svg/dom/use-in-shadow-tree-expected.html View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/svg/SVGElement.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/svg/SVGUseElement.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/svg/SVGUseElement.cpp View 1 6 chunks +16 lines, -8 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
pdr.
6 years, 9 months ago (2014-03-29 06:24:26 UTC) #1
esprehn
I don't know what you're trying to check for, but you don't need the loop. ...
6 years, 9 months ago (2014-03-29 08:23:32 UTC) #2
pdr.
On 2014/03/29 08:23:32, esprehn wrote: > I don't know what you're trying to check for, ...
6 years, 8 months ago (2014-03-29 20:40:18 UTC) #3
pdr.
On 2014/03/29 20:40:18, pdr wrote: > On 2014/03/29 08:23:32, esprehn wrote: > > I don't ...
6 years, 8 months ago (2014-04-01 03:19:33 UTC) #4
esprehn
lgtm
6 years, 8 months ago (2014-04-01 23:38:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/216463003/20001
6 years, 8 months ago (2014-04-01 23:38:47 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-01 23:56:09 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_rel
6 years, 8 months ago (2014-04-01 23:56:09 UTC) #8
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 8 months ago (2014-04-02 00:04:29 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pdr@chromium.org/216463003/20001
6 years, 8 months ago (2014-04-02 00:04:38 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-02 00:39:14 UTC) #11
Message was sent while issue was closed.
Change committed as 170614

Powered by Google App Engine
This is Rietveld 408576698