Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Change ShadowBoundary to ignore duplicate styles #1423

Merged

Conversation

vsavkin
Copy link
Contributor

@vsavkin vsavkin commented Sep 3, 2014

Style elements are inserted at a shadow boundary. This means the style elements of a transcluding component will be inserted at the top of the closest shadow dom component.

This PR changes ShadowBoundary to remember what style elements have already been inserted. This means that a shadow-dom component that has hundreds of transcluding components (e.g., a table) will have only one style element instead of hundreds.

Depends on #1315

@mhevery mhevery added cla: yes and removed cla: no labels Sep 3, 2014
final WebPlatformShim platformShim;
final ComponentCssRewriter componentCssRewriter;
final dom.NodeTreeSanitizer treeSanitizer;
final Map<_ComponentAssetKey, async.Future<dom.StyleElement>> styleElementCache;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does all of those fields need to be public ?

@chirayuk chirayuk force-pushed the master branch 2 times, most recently from 8fd235c to 50e2645 Compare September 5, 2014 23:10
@vsavkin vsavkin force-pushed the shadow_boundary_ignore_duplicate_styles branch from cf2c496 to 01b9c22 Compare September 10, 2014 16:37
…ents

* Extract ComponentCssLoader so it can be shared by ShadowDomComponentFactory and TranscludingComponentFactory
* Provide a built-in implementation of WebPlatformShim using css_shim
* Implement a CSS transformer similar to the one provided by Platform.JS
* Rename EventHandler into ShadowBoundary
@vsavkin vsavkin force-pushed the shadow_boundary_ignore_duplicate_styles branch from 01b9c22 to 5b04b17 Compare September 11, 2014 16:28
@vsavkin vsavkin merged commit 5b04b17 into dart-archive:master Sep 11, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants