PSA: Incremental Shadow DOM is launching

162 views
Skip to first unread message

Hayato Ito

unread,
May 15, 2018, 2:40:09 AM5/15/18
to blink-dev
Hi all,

The Incremental Shadow DOM is launching in M68.

Earlier today, the flag was flipped to experimental mode. In a few days, it will be flipped to stable. There should be no web-facing visible changes.

- Design doc (See this section for the performance improvements)

Incremental Shadow DOM is a big milestone, which makes Blink's rendering engine compute shadow dom's distribution incrementally, on a per-shadow-tree basis. The engine no longer computes shadow dom's distribution across multiple node trees in a top-down manner globally. This saves an unnecessary tree traversal at the beginning of the rendering phase, and can remove unnecessary node detach and reattach which would cause an expensive re-layout.

Please file a bug if you see any bug related to shadow dom distribution, style re-calc, re-layout, or any performance regression with Component Blink>DOM>Shadow DOM.

In terms of impacts on Blink developers:

TL;DR; Nothing, as of now.

Regarding Blink developer's ergonomics, I would like to announce that "Blink developers no longer have to call UpdateDistribution before using FlatTreeTraversal! Yay!" here, however, I can't say that because Shadow DOM v0 is still there. Once we can remove Shadow DOM v0 from Blink, Blink developers don't have to update distribution explicitly before accessing flat tree structure. That will be done transparently done behind schenes. I'll announce that once we can achieve that.

One minor visible change to end users:

Regarding devtools inspector,  <slot> element's *expanded nodes* will show slot's assigned nodes, instead of slot's distributed nodes, with this launch.
<slot>'s distributed nodes are old concepts and that should be no longer exposed to inspector's end users.

--
Hayato

Chris Harrelson

unread,
May 15, 2018, 2:37:19 PM5/15/18
to Hayato Ito, blink-dev
Congratulations! This is a great set of improvements!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFpjS_1sU24wWZoQP8bCk%3D1UeJ7ghq7vZFeKi54Sn5bjAFt21w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages