New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671319 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Style sharing should not be disabled for Shadow DOM v1

Project Member Reported by esprehn@chromium.org, Dec 5 2016

Issue description

It 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.
 
Cc: r...@opera.com
Owner: kochi@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by kochi@chromium.org, Jan 6 2017

Status: Started (was: Assigned)
WIP https://codereview.chromium.org/2613213002/

Comment 3 by kochi@chromium.org, 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).

Project Member

Comment 4 by bugdroid1@chromium.org, 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

Comment 5 by kochi@chromium.org, Jan 16 2017

Status: Fixed (was: Started)

Sign in to add a comment