Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Issue 2718243005: Polymer: use polymer-css-build --no-inline-includes (Closed)

Created:
3 years, 9 months ago by Dan Beam
Modified:
3 years, 9 months ago
Reviewers:
dpapad
CC:
arv+watch_chromium.org, chromium-reviews, oshima+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Polymer: use polymer-css-build --no-inline-includes Chromium updated polymer-css-build to 1.0.9 to use this feature: https://codereview.chromium.org/2714833003 This also required rolling to Polymer 1.8.1 which happened here: https://codereview.chromium.org/2717403003 And finally requires a change to Polymer's internal config via: Polymer.preserveStyleIncludes = true; Given the example DOM: <dom-module id="css-module"> <template> <style> /* module styles */ </style> </template> </dom-module> <dom-module id="my-element"> <template> <style include="css-module"> /* template styles */ </style> </template> </dom-module> before this patch is combined both at compile time and at runtime into: <my-element> #shadow <style> /* module styles */ /* template styles */ </style> </my-element> This defeats blink's CSS SheetContents caching and inlines many duplicate styles into the output (settings ends up at like 1MB of HTML/CSS combined before gzip). With --no-inline-includes, the generated output is significantly smaller (65% before compression, ~15% after compression) and include="" modules are cloned dynamically at runtime via Node#cloneNode(). The end results (in the DOM) are basically: <my-element> #shadow <style> /* module styles */ </style> <style> /* template style */ </style> </my-element> I also verified locally that many more <style> tags are bypassing parsing and being used from the cache. R=dpapad@chromium.org BUG=597347 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2718243005 Cr-Original-Commit-Position: refs/heads/master@{#453652} Committed: https://chromium.googlesource.com/chromium/src/+/b64500afce5b9342dba43f53f445c12a0ffc57e2 Review-Url: https://codereview.chromium.org/2718243005 Cr-Commit-Position: refs/heads/master@{#454170} Committed: https://chromium.googlesource.com/chromium/src/+/600c6a41851b482f7ae4deb3502b5260e708163e

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -2 lines) Patch
M chrome/browser/resources/polymer_css_build_gn.py View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/webui/resources/js/polymer_config.js View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 27 (19 generated)
Dan Beam
3 years, 9 months ago (2017-02-28 04:03:51 UTC) #6
dpapad
lgtm
3 years, 9 months ago (2017-02-28 18:30:26 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2718243005/1
3 years, 9 months ago (2017-02-28 18:48:32 UTC) #13
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/b64500afce5b9342dba43f53f445c12a0ffc57e2
3 years, 9 months ago (2017-02-28 18:53:30 UTC) #16
Dan Beam
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2729483002/ by dbeam@chromium.org. ...
3 years, 9 months ago (2017-03-01 04:18:03 UTC) #17
Dan Beam
so the issue ended up being that <dom-module id="..."> <dom-module name="..."> <dom-module is="..."> are all ...
3 years, 9 months ago (2017-03-02 01:40:02 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2718243005/1
3 years, 9 months ago (2017-03-02 01:41:20 UTC) #24
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 03:47:21 UTC) #27
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/600c6a41851b482f7ae4deb3502b...

Powered by Google App Engine
This is Rietveld 408576698