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

Issue 201813002: Enable Media query evaluation in the preload scanner (Closed)

Created:
6 years, 9 months ago by Yoav Weiss
Modified:
6 years, 9 months ago
CC:
blink-reviews, kenneth.christiansen, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears, rune+blink, rwlbuis, Mads Ager (chromium)
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Enable Media query evaluation in the preload scanner This CL enables Media Query evaluation inside the preload scanner, without joining the main thread. That is to enable resource fetching based on the media attribute, without hampering future resource fetching improvements. Major changes: * Added a MediaValues class that "freezes" the various media values needed for MQE when it is initialized. * Initialize MediaValues and provide them to the PreloadScanner during its initialization. * Run MQE inside the PreloadScanner, according to provided MediaValues. * Removed mediaAttribute passing to the HTMLResourcePreloader, that runs on the main thread. BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170314

Patch Set 1 #

Total comments: 2

Patch Set 2 : Review fixes #

Patch Set 3 : Removed comment #

Patch Set 4 : Fix android build issue #

Total comments: 2

Patch Set 5 : Removed GC transition types and commented code #

Total comments: 26

Patch Set 6 : Fixed review issues #

Patch Set 7 : Rebase #

Patch Set 8 : Fix debug build #

Patch Set 9 : Debug and clang fixes #

Total comments: 12

Patch Set 10 : Fixed resolution MQs and review nits. #

Patch Set 11 : Fix debug compile error #

Patch Set 12 : Fix Debug crash. Values based MediaValues::create #

Unified diffs Side-by-side diffs Delta from patch set Stats (+785 lines, -254 lines) Patch
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M Source/core/css/MediaQueryEvaluator.h View 1 2 3 4 5 6 1 chunk +28 lines, -26 lines 0 comments Download
M Source/core/css/MediaQueryEvaluator.cpp View 1 2 3 4 5 6 7 8 9 19 chunks +158 lines, -175 lines 0 comments Download
A Source/core/css/MediaQueryEvaluatorTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +100 lines, -0 lines 0 comments Download
A Source/core/css/MediaValues.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +111 lines, -0 lines 0 comments Download
A Source/core/css/MediaValues.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +341 lines, -0 lines 0 comments Download
M Source/core/html/parser/HTMLDocumentParser.cpp View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.h View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M Source/core/html/parser/HTMLPreloadScanner.cpp View 1 2 3 4 5 8 chunks +26 lines, -15 lines 0 comments Download
M Source/core/html/parser/HTMLResourcePreloader.h View 4 chunks +2 lines, -10 lines 0 comments Download
M Source/core/html/parser/HTMLResourcePreloader.cpp View 1 2 3 4 3 chunks +1 line, -21 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
Yoav Weiss
6 years, 9 months ago (2014-03-17 12:18:06 UTC) #1
abarth-chromium
https://codereview.chromium.org/201813002/diff/1/Source/core/css/MediaQueryEvaluator.h File Source/core/css/MediaQueryEvaluator.h (right): https://codereview.chromium.org/201813002/diff/1/Source/core/css/MediaQueryEvaluator.h#newcode85 Source/core/css/MediaQueryEvaluator.h:85: , m_mediaType(mediaType.isolatedCopy()) These should be indented four more spaces ...
6 years, 9 months ago (2014-03-17 19:00:01 UTC) #2
Yoav Weiss
On 2014/03/17 19:00:01, abarth wrote: > https://codereview.chromium.org/201813002/diff/1/Source/core/css/MediaQueryEvaluator.h > File Source/core/css/MediaQueryEvaluator.h (right): > > https://codereview.chromium.org/201813002/diff/1/Source/core/css/MediaQueryEvaluator.h#newcode85 > ...
6 years, 9 months ago (2014-03-17 22:18:44 UTC) #3
Yoav Weiss
ping
6 years, 9 months ago (2014-03-21 17:30:11 UTC) #4
Mads Ager (chromium)
https://codereview.chromium.org/201813002/diff/60001/Source/core/css/MediaQueryEvaluator.h File Source/core/css/MediaQueryEvaluator.h (right): https://codereview.chromium.org/201813002/diff/60001/Source/core/css/MediaQueryEvaluator.h#newcode45 Source/core/css/MediaQueryEvaluator.h:45: class MediaValues : public RefCountedWillBeGarbageCollected<MediaValues> { As far as ...
6 years, 9 months ago (2014-03-22 09:33:54 UTC) #5
abarth-chromium
Neat! We'll probably need to iterate a few times on this CL, but it's off ...
6 years, 9 months ago (2014-03-24 19:43:30 UTC) #6
Yoav Weiss
Thanks for reviewing. I'll work on fixing the issues raised. A few answers & questions ...
6 years, 9 months ago (2014-03-25 12:54:00 UTC) #7
eseidel
https://codereview.chromium.org/201813002/diff/80001/Source/core/css/MediaQueryEvaluator.h File Source/core/css/MediaQueryEvaluator.h (right): https://codereview.chromium.org/201813002/diff/80001/Source/core/css/MediaQueryEvaluator.h#newcode64 Source/core/css/MediaQueryEvaluator.h:64: MediaValues(int viewportWidth, I don't quite understand what's special about ...
6 years, 9 months ago (2014-03-25 13:15:18 UTC) #8
Yoav Weiss
On 2014/03/25 13:15:18, eseidel wrote: > https://codereview.chromium.org/201813002/diff/80001/Source/core/css/MediaQueryEvaluator.h > File Source/core/css/MediaQueryEvaluator.h (right): > > https://codereview.chromium.org/201813002/diff/80001/Source/core/css/MediaQueryEvaluator.h#newcode64 > ...
6 years, 9 months ago (2014-03-25 13:23:07 UTC) #9
eseidel
In general classes are nicer than structs, so you've probably made the right pick. I ...
6 years, 9 months ago (2014-03-25 13:24:21 UTC) #10
eseidel
(structs and classes are the same thing in c++, just class defaults to private and ...
6 years, 9 months ago (2014-03-25 13:33:49 UTC) #11
abarth-chromium
On 2014/03/25 12:54:00, Yoav Weiss wrote: > Does that mean that I can also skip ...
6 years, 9 months ago (2014-03-25 15:31:43 UTC) #12
Yoav Weiss
On 2014/03/25 12:54:00, Yoav Weiss wrote: > > https://codereview.chromium.org/201813002/diff/80001/Source/core/css/MediaQueryEvaluator.cpp#newcode331 > Source/core/css/MediaQueryEvaluator.cpp:331: } > On 2014/03/24 ...
6 years, 9 months ago (2014-03-25 22:26:03 UTC) #13
abarth-chromium
On 2014/03/25 22:26:03, Yoav Weiss wrote: > That proves to be trickier than it looks. ...
6 years, 9 months ago (2014-03-25 22:39:15 UTC) #14
Yoav Weiss
On 2014/03/25 22:39:15, abarth wrote: > On 2014/03/25 22:26:03, Yoav Weiss wrote: > > That ...
6 years, 9 months ago (2014-03-26 15:41:52 UTC) #15
abarth-chromium
On 2014/03/26 15:41:52, Yoav Weiss wrote: > Would it be possible to use both (LocalFrame, ...
6 years, 9 months ago (2014-03-26 16:48:45 UTC) #16
Yoav Weiss
On 2014/03/26 16:48:45, abarth wrote: > On 2014/03/26 15:41:52, Yoav Weiss wrote: > > Would ...
6 years, 9 months ago (2014-03-26 20:29:35 UTC) #17
abarth-chromium
Maybe the solution is some sort of invalidation system whereby the media query evaluator is ...
6 years, 9 months ago (2014-03-27 03:33:39 UTC) #18
Yoav Weiss
On 2014/03/27 03:33:39, abarth wrote: > Maybe the solution is some sort of invalidation system ...
6 years, 9 months ago (2014-03-27 06:50:24 UTC) #19
Yoav Weiss
On 2014/03/24 19:43:30, abarth wrote: > Neat! We'll probably need to iterate a few times ...
6 years, 9 months ago (2014-03-27 15:11:14 UTC) #20
abarth-chromium
LGTM This looks great. Thanks for the patch! https://codereview.chromium.org/201813002/diff/250001/Source/core/core.gypi File Source/core/core.gypi (right): https://codereview.chromium.org/201813002/diff/250001/Source/core/core.gypi#newcode798 Source/core/core.gypi:798: 'css/MediaValues.cpp', ...
6 years, 9 months ago (2014-03-27 21:01:54 UTC) #21
Yoav Weiss
On 2014/03/27 21:01:54, abarth wrote: > LGTM > > This looks great. Thanks for the ...
6 years, 9 months ago (2014-03-28 00:32:39 UTC) #22
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 9 months ago (2014-03-28 01:08:41 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/201813002/290001
6 years, 9 months ago (2014-03-28 01:09:08 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-28 02:57:00 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-28 02:57:00 UTC) #26
abarth-chromium
Looks related to your CL: #0 0x7fe806829ea1 base::debug::StackTrace::StackTrace() #1 0x7fe8068297cd base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7fe7fc1e9cb0 <unknown> ...
6 years, 9 months ago (2014-03-28 04:00:23 UTC) #27
Yoav Weiss
On 2014/03/28 04:00:23, abarth wrote: > Looks related to your CL: > > #0 0x7fe806829ea1 ...
6 years, 9 months ago (2014-03-28 09:21:40 UTC) #28
Yoav Weiss
The CQ bit was checked by yoav@yoav.ws
6 years, 9 months ago (2014-03-28 09:56:28 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yoav@yoav.ws/201813002/310001
6 years, 9 months ago (2014-03-28 09:56:35 UTC) #30
commit-bot: I haz the power
6 years, 9 months ago (2014-03-28 11:47:00 UTC) #31
Message was sent while issue was closed.
Change committed as 170314

Powered by Google App Engine
This is Rietveld 408576698