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

Issue 1819593002: Preload scan external css for @import (Closed)

Created:
4 years, 9 months ago by Charlie Harrison
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, gavinp+loader_chromium.org, Nate Chapin, jkarlin, kinuko+watch, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Preload scan external css for @import This change adds a StyleSheetResourceClient on all CSS preloads. The client holds a CSSPreloadScanner which receives the stream of CSS as it comes in. BUG=596676 Committed: https://crrev.com/c3698d693def17f7f4c2d17f462de63ee06fe10d Cr-Commit-Position: refs/heads/master@{#390678}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : add layout test, rearchitect #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : rebase #

Total comments: 6

Patch Set 10 : yoav review #

Total comments: 2

Patch Set 11 : hiroshige@ review + added preload count histogram #

Patch Set 12 : Add histogram to histograms.xml (trybots previous) #

Total comments: 7

Patch Set 13 : kouhei@ review #

Total comments: 4

Patch Set 14 : histogram name change #

Total comments: 4

Patch Set 15 : kinuko@ review: updated comment and clear m_resource when finished #

Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/preload/external_css_import_preload.html View 1 2 3 4 5 6 7 8 9 1 chunk +20 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/resources/css_with_import.css View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +18 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +38 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLResourcePreloader.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +14 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (11 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/1819593002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1819593002/80001
4 years, 9 months ago (2016-03-22 03:51:48 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_oilpan_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_blink_oilpan_rel/builds/19960)
4 years, 9 months ago (2016-03-22 04:15:46 UTC) #5
Charlie Harrison
Does the architecture of this look sound? I'm worried that adding a ResourceClient to all ...
4 years, 8 months ago (2016-03-29 14:43:20 UTC) #7
Yoav Weiss
All in all, this looks fine, but I'm not sure about the "was preload used?" ...
4 years, 8 months ago (2016-03-30 21:38:31 UTC) #8
Charlie Harrison
+kouhei@ I think this solution may replace some of the the need for a streaming ...
4 years, 8 months ago (2016-03-31 03:59:59 UTC) #10
kouhei (in TOK)
If not in a hurry, can we discuss this design at the CAM meet up? ...
4 years, 8 months ago (2016-04-01 05:15:37 UTC) #11
kinuko
If kouhei@ will be discussing this when he's in town that'd be great. I have ...
4 years, 8 months ago (2016-04-01 05:19:19 UTC) #13
Charlie Harrison
kouhei@, yeah happy to chat about this in CAM! A full streaming css parser is ...
4 years, 8 months ago (2016-04-01 13:07:18 UTC) #14
Charlie Harrison
bmcquade@ and I discussed this design especially wrt cpu/memory cost and we decided it would ...
4 years, 8 months ago (2016-04-01 16:57:39 UTC) #15
Charlie Harrison
FYI I just met with jkarlin@ and kouhei@. The consensus was to move forward with ...
4 years, 8 months ago (2016-04-11 13:58:08 UTC) #17
hiroshige
On 2016/04/11 13:58:08, csharrison wrote: > +hiroshige@, this patch is a bit stale wrt your ...
4 years, 8 months ago (2016-04-14 08:18:22 UTC) #18
Charlie Harrison
On 2016/04/14 at 08:18:22, hiroshige wrote: > On 2016/04/11 13:58:08, csharrison wrote: > > +hiroshige@, ...
4 years, 8 months ago (2016-04-14 13:55:06 UTC) #19
Charlie Harrison
On 2016/04/14 at 13:55:06, csharrison wrote: > On 2016/04/14 at 08:18:22, hiroshige wrote: > > ...
4 years, 8 months ago (2016-04-14 14:16:02 UTC) #20
hiroshige
On 2016/04/14 14:16:02, csharrison wrote: > On 2016/04/14 at 13:55:06, csharrison wrote: > > On ...
4 years, 8 months ago (2016-04-14 14:56:13 UTC) #21
Charlie Harrison
Thanks for the review. I've updated the patch set to include a histogram tracking the ...
4 years, 8 months ago (2016-04-14 16:04:04 UTC) #22
Charlie Harrison
ping kinuko@ and kouhei@ now that the implementation for this involves only one read per ...
4 years, 8 months ago (2016-04-19 13:21:06 UTC) #23
kouhei (in TOK)
https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp#newcode106 third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp:106: c->didAppendData(this); I'd prefer if the hook is only called ...
4 years, 8 months ago (2016-04-21 06:35:03 UTC) #24
kouhei (in TOK)
https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h File third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h (right): https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h#newcode43 third_party/WebKit/Source/core/fetch/StyleSheetResourceClient.h:43: virtual void didAppendData(const CSSStyleSheetResource*) {} On 2016/04/21 06:35:03, kouhei ...
4 years, 7 months ago (2016-04-24 22:26:22 UTC) #25
Charlie Harrison
+isherman for histograms. I updated the CL to use didAppendFirstData. https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp File third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp (right): https://codereview.chromium.org/1819593002/diff/200002/third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp#newcode106 ...
4 years, 7 months ago (2016-04-25 15:14:35 UTC) #27
Ilya Sherman
https://codereview.chromium.org/1819593002/diff/230001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/1819593002/diff/230001/tools/metrics/histograms/histograms.xml#newcode6747 tools/metrics/histograms/histograms.xml:6747: +<histogram name="CSSPreloaderResourceClient.PreloadCount" units="preloads"> It looks like you're adding a ...
4 years, 7 months ago (2016-04-25 15:48:35 UTC) #28
kouhei (in TOK)
lgtm from my side https://codereview.chromium.org/1819593002/diff/230001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (right): https://codereview.chromium.org/1819593002/diff/230001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#newcode258 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:258: // TODO(csharrison): Should SegmentedString be ...
4 years, 7 months ago (2016-04-25 22:10:05 UTC) #29
Charlie Harrison
Thanks! https://codereview.chromium.org/1819593002/diff/230001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (right): https://codereview.chromium.org/1819593002/diff/230001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#newcode258 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:258: // TODO(csharrison): Should SegmentedString be populated? On 2016/04/25 ...
4 years, 7 months ago (2016-04-25 22:29:12 UTC) #30
Charlie Harrison
kinuko@ do you support moving forward with the plan to experiment in #23?
4 years, 7 months ago (2016-04-28 20:41:57 UTC) #31
kinuko
lgtm https://codereview.chromium.org/1819593002/diff/250001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp (right): https://codereview.chromium.org/1819593002/diff/250001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp#newcode258 third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp:258: // TODO(csharrison): Should SegmentedString be populated? nit: make ...
4 years, 7 months ago (2016-04-29 03:30:09 UTC) #32
Charlie Harrison
Thanks! isherman@ can you take a look at the update histogram name? https://codereview.chromium.org/1819593002/diff/250001/third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp File third_party/WebKit/Source/core/html/parser/CSSPreloadScanner.cpp ...
4 years, 7 months ago (2016-04-29 13:21:39 UTC) #33
Ilya Sherman
Histogram LGTM, thanks.
4 years, 7 months ago (2016-04-29 15:46:49 UTC) #34
Charlie Harrison
Thanks!
4 years, 7 months ago (2016-04-29 17:01:03 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1819593002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1819593002/270001
4 years, 7 months ago (2016-04-29 17:01:45 UTC) #38
commit-bot: I haz the power
Committed patchset #15 (id:270001)
4 years, 7 months ago (2016-04-29 17:07:30 UTC) #39
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/c3698d693def17f7f4c2d17f462de63ee06fe10d Cr-Commit-Position: refs/heads/master@{#390678}
4 years, 7 months ago (2016-04-30 17:26:38 UTC) #40
Ɓukasz Anforowicz
4 years, 7 months ago (2016-05-03 20:35:56 UTC) #42
Message was sent while issue was closed.
On 2016/04/30 17:26:38, commit-bot: I haz the power wrote:
> Patchset 15 (id:??) landed as
> https://crrev.com/c3698d693def17f7f4c2d17f462de63ee06fe10d
> Cr-Commit-Position: refs/heads/master@{#390678}

This CL made http/tests/security/link-crossorigin-stylesheet-no-cors.html layout
test flaky - see https://crbug.com/608577

Powered by Google App Engine
This is Rietveld 408576698