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

Issue 2088123002: Minimize bundled user-agent CSS: html.css (Closed)

Created:
4 years, 6 months ago by kouhei (in TOK)
Modified:
4 years, 1 month ago
Reviewers:
haraken, Timothy Loh, tzik
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, dglazkov+blink, kinuko, tzik, Dirk Pranke
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Minimize bundled user-agent CSS User agent CSS such as html.css is processed per renderer start, and blocks time-to-first-meaningful-paint. This CL introduces a simple CSS minimizer which processes html.css before bundling it into resource pak file. html.css: original 23451 bytes minimized 18168 bytes 22% reduction BUG=472927 Committed: https://crrev.com/4e2d21167e5563cd7306c8d82bb125544c1aba3c Cr-Commit-Position: refs/heads/master@{#430235}

Patch Set 1 #

Patch Set 2 : format #

Patch Set 3 : gyp support #

Patch Set 4 : avoid touching colon #

Patch Set 5 : perf try #

Total comments: 11

Patch Set 6 : remove comment #

Patch Set 7 : add unittest #

Total comments: 14

Patch Set 8 : review #

Total comments: 2

Patch Set 9 : review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+233 lines, -15 lines) Patch
M third_party/WebKit/Source/build/scripts/in_generator.py View 1 2 3 4 5 6 7 2 chunks +19 lines, -13 lines 0 comments Download
A third_party/WebKit/Source/build/scripts/minimize_css.py View 1 2 3 4 5 6 7 8 1 chunk +121 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/build/scripts/minimize_css_unittest.py View 1 2 3 4 5 6 1 chunk +58 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +24 lines, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink_resources.grd View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 48 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2088123002/40001
4 years, 6 months ago (2016-06-22 06:19:49 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/250346)
4 years, 6 months ago (2016-06-22 07:26:29 UTC) #4
kouhei (in TOK)
Would you take a look?
4 years, 5 months ago (2016-06-27 05:05:20 UTC) #7
esprehn
dpranke@ can you review this Python? I'm not sure if there's a better way to ...
4 years, 5 months ago (2016-06-27 05:17:32 UTC) #9
esprehn
Btw please include numbers in the change description, how much smaller does this make the ...
4 years, 5 months ago (2016-06-27 05:18:00 UTC) #10
kouhei (in TOK)
https://codereview.chromium.org/2088123002/diff/80001/third_party/WebKit/Source/build/scripts/minimize_css.py File third_party/WebKit/Source/build/scripts/minimize_css.py (right): https://codereview.chromium.org/2088123002/diff/80001/third_party/WebKit/Source/build/scripts/minimize_css.py#newcode23 third_party/WebKit/Source/build/scripts/minimize_css.py:23: WHITESPACE_PATTERN = re.compile(r"\s+", re.MULTILINE) On 2016/06/27 05:17:31, esprehn wrote: ...
4 years, 5 months ago (2016-06-27 05:39:22 UTC) #12
Timothy Loh
Can we just use more regexes instead of writing a state machine? e.g. content = ...
4 years, 5 months ago (2016-06-27 05:46:58 UTC) #13
Dirk Pranke
I don't know this code, so it's hard to say too much about it without ...
4 years, 5 months ago (2016-06-27 23:32:46 UTC) #14
kouhei (in TOK)
esprehn@: Do you have a strong preference here? imo the trade-off of regex-only approach is: ...
4 years, 5 months ago (2016-06-28 01:22:42 UTC) #15
Dirk Pranke
On 2016/06/27 05:46:58, Timothy Loh wrote: > Can we just use more regexes instead of ...
4 years, 5 months ago (2016-06-28 01:36:10 UTC) #16
esprehn
The state machine is fine as long as we get some unit tests and it's ...
4 years, 5 months ago (2016-06-28 03:50:51 UTC) #17
esprehn
The state machine is fine as long as we get some unit tests and it's ...
4 years, 5 months ago (2016-06-28 03:50:52 UTC) #18
kouhei (in TOK)
Added unittests + support for quote escapes. PTAL https://codereview.chromium.org/2088123002/diff/80001/third_party/WebKit/Source/build/scripts/minimize_css.py File third_party/WebKit/Source/build/scripts/minimize_css.py (right): https://codereview.chromium.org/2088123002/diff/80001/third_party/WebKit/Source/build/scripts/minimize_css.py#newcode73 third_party/WebKit/Source/build/scripts/minimize_css.py:73: else: ...
4 years, 5 months ago (2016-07-05 05:11:10 UTC) #19
kouhei (in TOK)
gentle ping.
4 years, 5 months ago (2016-07-06 01:06:13 UTC) #20
esprehn
On 2016/07/06 at 01:06:13, kouhei wrote: > gentle ping. I'm on vacation this week, maybe ...
4 years, 5 months ago (2016-07-06 02:14:51 UTC) #21
dstockwell
I cleaned up the reviewer list. Patch seems fine to me, but I'll leave it ...
4 years, 4 months ago (2016-08-04 01:18:14 UTC) #23
esprehn
Hopefully we can land this soon, 22% reduction is pretty sweet. :)
4 years, 4 months ago (2016-08-09 05:51:24 UTC) #24
Timothy Loh
I'd still rather do everything using regexes but I guess this is OK for now. ...
4 years, 4 months ago (2016-08-10 05:37:39 UTC) #25
kouhei (in TOK)
https://codereview.chromium.org/2088123002/diff/120001/third_party/WebKit/Source/build/scripts/minimize_css.py File third_party/WebKit/Source/build/scripts/minimize_css.py (right): https://codereview.chromium.org/2088123002/diff/120001/third_party/WebKit/Source/build/scripts/minimize_css.py#newcode24 third_party/WebKit/Source/build/scripts/minimize_css.py:24: WHITESPACE_PATTERN = re.compile(r"\s+", re.MULTILINE) On 2016/08/10 05:37:39, Timothy Loh ...
4 years, 1 month ago (2016-11-01 10:49:16 UTC) #30
Timothy Loh
lgtm but I don't understand any of the gn stuff https://codereview.chromium.org/2088123002/diff/140001/third_party/WebKit/Source/build/scripts/minimize_css.py File third_party/WebKit/Source/build/scripts/minimize_css.py (right): https://codereview.chromium.org/2088123002/diff/140001/third_party/WebKit/Source/build/scripts/minimize_css.py#newcode98 ...
4 years, 1 month ago (2016-11-03 06:08:00 UTC) #31
kouhei (in TOK)
+tzik for GN review https://codereview.chromium.org/2088123002/diff/140001/third_party/WebKit/Source/build/scripts/minimize_css.py File third_party/WebKit/Source/build/scripts/minimize_css.py (right): https://codereview.chromium.org/2088123002/diff/140001/third_party/WebKit/Source/build/scripts/minimize_css.py#newcode98 third_party/WebKit/Source/build/scripts/minimize_css.py:98: def output(self): On 2016/11/03 06:07:59, ...
4 years, 1 month ago (2016-11-06 23:06:29 UTC) #33
tzik
lgtm
4 years, 1 month ago (2016-11-07 04:11:58 UTC) #34
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/2088123002/160001
4 years, 1 month ago (2016-11-07 04:53:53 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/298261)
4 years, 1 month ago (2016-11-07 05:01:00 UTC) #39
kouhei (in TOK)
+haraken: Would you rs public?
4 years, 1 month ago (2016-11-07 05:51:50 UTC) #41
haraken
On 2016/11/07 05:51:50, kouhei wrote: > +haraken: Would you rs public? LGTM
4 years, 1 month ago (2016-11-07 06:37:15 UTC) #42
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/2088123002/160001
4 years, 1 month ago (2016-11-07 07:56:28 UTC) #44
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 1 month ago (2016-11-07 08:00:11 UTC) #46
commit-bot: I haz the power
4 years, 1 month ago (2016-11-07 08:01:48 UTC) #48
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/4e2d21167e5563cd7306c8d82bb125544c1aba3c
Cr-Commit-Position: refs/heads/master@{#430235}

Powered by Google App Engine
This is Rietveld 408576698