Style sharing should not be disabled for Shadow DOM v1 |
||
Issue descriptionIt was disabled here: https://codereview.chromium.org/1575363006 but there should be no reason to do so. This is making all content in Shadow DOM v1 (ex. if polymer used it in iron-list) slower. The correct fix is to implement something like sharingCandidateDistributedToSameInsertionPoint for Shadow DOM v1, which should be really easy since there's not multiple shadow roots anymore.
,
Jan 6 2017
,
Jan 11 2017
I tested a simple HTML (10000 elements slotted to a single slot, and can share same style) https://gist.github.com/TakayoshiKochi/119ce0a174c6d0fef7fc0f1705349bc1 and confirmed this CL improves style recalc time from 96ms to 56ms on my machine (with release build).
,
Jan 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/92740ea13dcbe5af5afcbb84949d142e82ff6c6d commit 92740ea13dcbe5af5afcbb84949d142e82ff6c6d Author: kochi <kochi@chromium.org> Date: Sat Jan 14 04:17:12 2017 Support Style Sharing for Shadow DOM V1 Style sharing has been disabled for Shadow DOM v1 slotted elements, but should be enabled. There used to be a bug that ::slotted([attr]) rules did not properly prevent styles from being shared and falsely shared. This was because the ::slotted() rule did not match those elements which should and they were not rejected for style sharing. This CL fixes the bug to enable style sharing in Shadow DOM v1 slotted elements and implement a function to check if style can be shared between those elements. BUG= 671319 TEST=LayoutTests/shadow-dom/slotted-pseudo-element-shared-style.html Review-Url: https://codereview.chromium.org/2613213002 Cr-Commit-Position: refs/heads/master@{#443785} [modify] https://crrev.com/92740ea13dcbe5af5afcbb84949d142e82ff6c6d/third_party/WebKit/Source/core/css/SelectorChecker.cpp [modify] https://crrev.com/92740ea13dcbe5af5afcbb84949d142e82ff6c6d/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.cpp [modify] https://crrev.com/92740ea13dcbe5af5afcbb84949d142e82ff6c6d/third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h [modify] https://crrev.com/92740ea13dcbe5af5afcbb84949d142e82ff6c6d/third_party/WebKit/Source/core/css/resolver/SharedStyleFinderTest.cpp [modify] https://crrev.com/92740ea13dcbe5af5afcbb84949d142e82ff6c6d/third_party/WebKit/Source/core/dom/Element.cpp
,
Jan 16 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by hayato@chromium.org
, Dec 6 2016Owner: kochi@chromium.org
Status: Assigned (was: Untriaged)