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

Issue 166633002: Prefetch @import files from CSS files.

Created:
6 years, 10 months ago by jonnyr
Modified:
5 years, 9 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Prefetch @import files from CSS files. BUG=

Patch Set 1 #

Total comments: 5

Patch Set 2 : Simplified and with selftests. #

Total comments: 5

Patch Set 3 : Prefetching now handled just like for other resources. #

Total comments: 1

Patch Set 4 : Prefetch @import files from CSS files. Scans until state finished in preload scanner. #

Total comments: 4

Patch Set 5 : Renamed according to comments. #

Total comments: 3

Patch Set 6 : Fixed according to comments. #

Total comments: 1

Patch Set 7 : Use decoded text for scanning. #

Total comments: 2

Patch Set 8 : Use tagname for preloadscanner and preserve request origin like for prefetched css in html style se… #

Total comments: 4

Patch Set 9 : Fixed according to Yoav´s comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, --1 lines) Patch
M LayoutTests/http/tests/loading/preload-css-test.html View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/http/tests/loading/preload-css-test-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
A + LayoutTests/http/tests/loading/resources/notpreloaded.css View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/http/tests/loading/resources/preloaded.css View 1 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/http/tests/loading/resources/preloadedimports.css View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/fetch/CSSStyleSheetResource.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/fetch/CSSStyleSheetResource.cpp View 1 2 3 4 5 6 7 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/fetch/StyleSheetResourceClient.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -0 lines 0 comments Download
M Source/core/html/HTMLLinkElement.cpp View 1 2 3 4 5 6 7 8 3 chunks +45 lines, -0 lines 0 comments Download
M Source/core/html/parser/CSSPreloadScanner.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 50 (1 generated)
jonnyr
@reviewer: does this patch look OK to you?
6 years, 10 months ago (2014-02-14 12:12:55 UTC) #1
eseidel
Too tired atm, but happy to review tomorrow.
6 years, 10 months ago (2014-02-14 12:14:31 UTC) #2
eseidel
Don't we have the ability to test the preload scanner?
6 years, 10 months ago (2014-02-14 12:14:53 UTC) #3
eseidel
https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h File Source/core/fetch/CSSStyleSheetResource.h (right): https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h#newcode69 Source/core/fetch/CSSStyleSheetResource.h:69: OwnPtr<HTMLTokenizer> m_tokenizer; This seems wrong. Do other resources own ...
6 years, 10 months ago (2014-02-14 12:15:40 UTC) #4
eseidel
https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h File Source/core/fetch/CSSStyleSheetResource.h (right): https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h#newcode69 Source/core/fetch/CSSStyleSheetResource.h:69: OwnPtr<HTMLTokenizer> m_tokenizer; Why would each resource want its own ...
6 years, 10 months ago (2014-02-14 12:16:57 UTC) #5
jonnyr
On 2014/02/14 12:14:53, eseidel wrote: > Don't we have the ability to test the preload ...
6 years, 10 months ago (2014-02-14 13:20:44 UTC) #6
jonnyr
On 2014/02/14 12:15:40, eseidel wrote: > https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h > File Source/core/fetch/CSSStyleSheetResource.h (right): > > https://codereview.chromium.org/166633002/diff/1/Source/core/fetch/CSSStyleSheetResource.h#newcode69 > ...
6 years, 10 months ago (2014-02-14 13:31:43 UTC) #7
tonyg
Love the feature. I'm excited to see this happen. This will also be a stepping ...
6 years, 10 months ago (2014-02-14 14:48:13 UTC) #8
Yoav Weiss
On 2014/02/14 13:20:44, jonnyr wrote: > On 2014/02/14 12:14:53, eseidel wrote: > > Don't we ...
6 years, 10 months ago (2014-02-14 15:21:47 UTC) #9
Yoav Weiss
Other than that, I'm excited to see this implemented, and excited to hear that background ...
6 years, 10 months ago (2014-02-14 15:29:59 UTC) #10
tonyg
On 2014/02/14 15:29:59, Yoav Weiss wrote: > Other than that, I'm excited to see this ...
6 years, 10 months ago (2014-02-14 15:41:53 UTC) #11
jonnyr
On 2014/02/14 15:41:53, tonyg wrote: > On 2014/02/14 15:29:59, Yoav Weiss wrote: > > Other ...
6 years, 10 months ago (2014-02-14 15:52:38 UTC) #12
jonnyr
On 2014/02/14 15:21:47, Yoav Weiss wrote: > You can test the preload scanner by using ...
6 years, 10 months ago (2014-02-14 16:12:14 UTC) #13
shatch
Happy you're looking into this! Agree with Tony, we should definitely brainstorm some since we've ...
6 years, 10 months ago (2014-02-14 16:20:17 UTC) #14
jonnyr
On 2014/02/14 16:20:17, shatch wrote: > Happy you're looking into this! Agree with Tony, we ...
6 years, 10 months ago (2014-02-14 16:24:09 UTC) #15
abarth-chromium
not lgtm We do want to prefetch @imports from CSS style sheets, but this CL ...
6 years, 10 months ago (2014-02-15 18:48:48 UTC) #16
jonnyr
On 2014/02/15 18:48:48, abarth wrote: > not lgtm > > We do want to prefetch ...
6 years, 10 months ago (2014-02-26 14:55:05 UTC) #17
tonyg
lg2m, but leaving it up to abarth to provide the approval.
6 years, 10 months ago (2014-02-26 17:06:16 UTC) #18
abarth-chromium
not lgtm You've still got a dependency from a subclass of Resource to a Document. ...
6 years, 10 months ago (2014-02-26 19:13:35 UTC) #19
jonnyr
On 2014/02/26 19:13:35, abarth wrote: > not lgtm > > You've still got a dependency ...
6 years, 9 months ago (2014-03-05 00:07:54 UTC) #20
abarth-chromium
Thanks, this approach looks a lot better! https://codereview.chromium.org/166633002/diff/220001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/220001/Source/core/html/HTMLLinkElement.cpp#newcode437 Source/core/html/HTMLLinkElement.cpp:437: m_isPreloadScanning = ...
6 years, 9 months ago (2014-03-05 00:27:35 UTC) #21
jonnyr
On 2014/03/05 00:27:35, abarth wrote: > Thanks, this approach looks a lot better! > > ...
6 years, 7 months ago (2014-05-19 13:37:03 UTC) #22
eseidel
https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp#newcode509 Source/core/html/HTMLLinkElement.cpp:509: if (m_preloadScanner.get()) { Normally these are written as early ...
6 years, 7 months ago (2014-05-20 06:27:03 UTC) #23
jonnyr
On 2014/05/20 06:27:03, eseidel wrote: > https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp > File Source/core/html/HTMLLinkElement.cpp (right): > > https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp#newcode509 > ...
6 years, 7 months ago (2014-05-20 06:36:15 UTC) #24
eseidel
but appendData will be called for each packet off the network, right? I see, I ...
6 years, 7 months ago (2014-05-20 07:08:24 UTC) #25
eseidel
https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/240001/Source/core/html/HTMLLinkElement.cpp#newcode440 Source/core/html/HTMLLinkElement.cpp:440: , m_input(adoptPtr(new SegmentedString)) You might want to name this ...
6 years, 7 months ago (2014-05-20 07:10:36 UTC) #26
eseidel
lgtm with the renames, thanks.
6 years, 7 months ago (2014-05-20 07:10:49 UTC) #27
jonnyr
The CQ bit was checked by jonnyr@opera.com
6 years, 7 months ago (2014-05-20 13:41:03 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jonnyr@opera.com/166633002/260001
6 years, 7 months ago (2014-05-20 13:41:32 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-20 13:41:37 UTC) #30
commit-bot: I haz the power
A disapproval has been posted by following reviewers: abarth@chromium.org. Please make sure to get positive ...
6 years, 7 months ago (2014-05-20 13:41:38 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-20 13:41:58 UTC) #32
commit-bot: I haz the power
A disapproval has been posted by following reviewers: abarth@chromium.org. Please make sure to get positive ...
6 years, 7 months ago (2014-05-20 13:41:59 UTC) #33
jonnyr
Ptal?
6 years, 7 months ago (2014-05-22 07:41:42 UTC) #34
oystein (OOO til 10th of July)
On 2014/05/22 07:41:42, jonnyr wrote: > Ptal? abarth is OOO for a while. eseidel should ...
6 years, 7 months ago (2014-05-22 14:09:23 UTC) #35
eseidel
lgtm https://codereview.chromium.org/166633002/diff/260001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/260001/Source/core/html/HTMLLinkElement.cpp#newcode518 Source/core/html/HTMLLinkElement.cpp:518: if (m_preloadScanner->isDoneParsingImports()) { Could you explain the magic ...
6 years, 6 months ago (2014-05-28 23:52:52 UTC) #36
abarth-chromium
Thanks! This CL has a much better structure. A few minor comments below. https://codereview.chromium.org/166633002/diff/260001/Source/core/fetch/CSSStyleSheetResource.cpp File ...
6 years, 6 months ago (2014-06-26 16:37:59 UTC) #37
jonnyr
On 2014/06/26 16:37:59, abarth wrote: > Thanks! This CL has a much better structure. A ...
6 years, 4 months ago (2014-07-28 09:18:09 UTC) #38
abarth-chromium
https://codereview.chromium.org/166633002/diff/280001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/280001/Source/core/html/HTMLLinkElement.cpp#newcode553 Source/core/html/HTMLLinkElement.cpp:553: m_preloadInput->append(SegmentedString(String(data, length))); How can you take a const char* ...
6 years, 4 months ago (2014-07-29 16:43:52 UTC) #39
jonnyr
On 2014/07/29 16:43:52, abarth wrote: > https://codereview.chromium.org/166633002/diff/280001/Source/core/html/HTMLLinkElement.cpp > File Source/core/html/HTMLLinkElement.cpp (right): > > https://codereview.chromium.org/166633002/diff/280001/Source/core/html/HTMLLinkElement.cpp#newcode553 > ...
6 years, 4 months ago (2014-07-31 10:53:24 UTC) #40
abarth-chromium
Getting close. One more bug... https://codereview.chromium.org/166633002/diff/300001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/300001/Source/core/html/HTMLLinkElement.cpp#newcode560 Source/core/html/HTMLLinkElement.cpp:560: m_preloadLength = sheetText.length(); Why ...
6 years, 4 months ago (2014-07-31 14:54:23 UTC) #41
jonnyr
abarth, could you ptal? https://codereview.chromium.org/166633002/diff/300001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/300001/Source/core/html/HTMLLinkElement.cpp#newcode560 Source/core/html/HTMLLinkElement.cpp:560: m_preloadLength = sheetText.length(); On 2014/07/31 ...
5 years, 11 months ago (2015-01-05 10:34:52 UTC) #43
Yoav Weiss
A couple of drive-by nits. https://codereview.chromium.org/166633002/diff/320001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/320001/Source/core/html/HTMLLinkElement.cpp#newcode567 Source/core/html/HTMLLinkElement.cpp:567: if (!m_preloadScanner) Maybe a ...
5 years, 11 months ago (2015-01-05 13:18:44 UTC) #44
jonnyr
Thanks for the comments Yoav. https://codereview.chromium.org/166633002/diff/320001/Source/core/html/HTMLLinkElement.cpp File Source/core/html/HTMLLinkElement.cpp (right): https://codereview.chromium.org/166633002/diff/320001/Source/core/html/HTMLLinkElement.cpp#newcode567 Source/core/html/HTMLLinkElement.cpp:567: if (!m_preloadScanner) On 2015/01/05 ...
5 years, 11 months ago (2015-01-06 00:13:06 UTC) #45
jonnyr
ping?
5 years, 11 months ago (2015-01-19 10:51:04 UTC) #46
Yoav Weiss
On 2015/01/19 10:51:04, jonnyr wrote: > ping? I think you need abarth's OK here, since ...
5 years, 11 months ago (2015-01-19 11:49:15 UTC) #47
jonnyr
On 2015/01/19 11:49:15, Yoav Weiss wrote: > On 2015/01/19 10:51:04, jonnyr wrote: > > ping? ...
5 years, 11 months ago (2015-01-19 12:03:40 UTC) #48
Yoav Weiss
On 2015/01/19 12:03:40, jonnyr wrote: > On 2015/01/19 11:49:15, Yoav Weiss wrote: > > On ...
5 years, 11 months ago (2015-01-19 14:22:52 UTC) #49
abarth-chromium
5 years, 9 months ago (2015-02-27 08:28:13 UTC) #50
On 2015/01/19 at 14:22:52, yoav wrote:
> On 2015/01/19 12:03:40, jonnyr wrote:
> > On 2015/01/19 11:49:15, Yoav Weiss wrote:
> > > On 2015/01/19 10:51:04, jonnyr wrote:
> > > > ping?
> > > 
> > > I think you need abarth's OK here, since he previously did not approve.
> > 
> > Yes, but how do I get abarth to take a look again? Send him a mail
privately?
> 
> Yeah, try that.

Sorry for not noticing this CL.  Probably the best thing is to open up a new CL
that doesn't have the red flag attached to it.  Sorry for the extra hassle.  :(

Powered by Google App Engine
This is Rietveld 408576698