Intent to Deprecate and Remove: SVG instance tree

90 views
Skip to first unread message

Rob Buis

unread,
May 5, 2014, 6:07:12 PM5/5/14
to blin...@chromium.org
Primary eng (and PM) emails
rob....@samsung.com

Summary
The SVG 1.1 SVGElementInstance concept has been removed in SVG 2.

Motivation
Aligning with the spec, less overhead because the DOM instance tree does not have to be exposed anymore, less security issues and complexity.

Compatibility Risk
From our UseCounter data, this feature is only used on ~0% of web pages according to http://www.chromestatus.com/metrics/feature/popularity.

Tracking bug: http://crbug.com/313438
(old) SVG 1.1 spec: http://www.w3.org/TR/SVG11/single-page.html#struct-UseElement
(new) SVG 2 spec: https://svgwg.org/svg2-draft/single-page.html
www-svg discussion: http://lists.w3.org/Archives/Public/www-svg/2014Jan/0014.html

Row on feature dashboard?
http://www.chromestatus.com/features/5760616295825408

Requesting approval to remove too?
Yes

Cheers,

Rob.

Philip Rogers

unread,
May 5, 2014, 6:27:20 PM5/5/14
to Rob Buis, blink-dev
LGTM!

Elliott Sprehn

unread,
May 5, 2014, 6:41:18 PM5/5/14
to Philip Rogers, Rob Buis, blink-dev
Yes, please kill it! LGTM

Dimitri Glazkov

unread,
May 5, 2014, 6:50:39 PM5/5/14
to Elliott Sprehn, Philip Rogers, Rob Buis, blink-dev
LGTM.

Adam Barth

unread,
May 5, 2014, 6:53:27 PM5/5/14
to Dimitri Glazkov, Elliott Sprehn, Philip Rogers, Rob Buis, blink-dev
LGTM

Kentaro Hara

unread,
May 5, 2014, 9:13:23 PM5/5/14
to Dimitri Glazkov, Elliott Sprehn, Philip Rogers, Rob Buis, blink-dev
LGTM.

SVGElementInstance inherits from TreeShared, and that was adding a lot of complexity to the code base. After removing SVGElementInstance, Node will become the only customer of TreeShared. (TreeShared will be removed in Oilpan, but reducing the customer of the TreeShared algorithm is very helpful to clean up the code base even after Oilpan.)

--
Kentaro Hara, Tokyo, Japan

Eric Seidel

unread,
May 5, 2014, 11:01:49 PM5/5/14
to Kentaro Hara, Dimitri Glazkov, Elliott Sprehn, Philip Rogers, Rob Buis, blink-dev
But, but, but...  It was such a pain in the ass to implement.  :/

Lgtm

Stephen Chenney

unread,
May 6, 2014, 9:57:42 AM5/6/14
to Eric Seidel, Kentaro Hara, Dimitri Glazkov, Elliott Sprehn, Philip Rogers, Rob Buis, blink-dev
And now we do not have to deep copy <use> elements, right? Please be right.

LGTM

Philip Rogers

unread,
May 6, 2014, 2:27:47 PM5/6/14
to Stephen Chenney, Eric Seidel, Kentaro Hara, Dimitri Glazkov, Elliott Sprehn, Rob Buis, blink-dev
This will let us be smarter about deep cloning on every modification, but that's not the main goal. We will still have a full clone of the target subtree. Removing the instance tree will remove a lot of tricky code and replace it with standard shadowdom codepaths though.

Ojan Vafai

unread,
May 6, 2014, 11:40:31 PM5/6/14
to Philip Rogers, Stephen Chenney, Eric Seidel, Kentaro Hara, Dimitri Glazkov, Elliott Sprehn, Rob Buis, blink-dev
LGTM3
Reply all
Reply to author
Forward
0 new messages