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

Issue 2172613002: Renderer-side changes for NoState Prefetch (Closed)

Created:
4 years, 5 months ago by droger
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, kinuko+watch, kouhei (in TOK), Benoit L, mattcary, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Renderer-side changes for NoState Prefetch NoState Prefetch design doc: https://docs.google.com/document/d/16VCYGGWau483IMSxODpg5faZny1FJ6vNK2v-BuM5EhU This CL is the first step for NoState Prefetch implementation in the renderer. The code added in this CL is not called yet (it will be called only when the PREFETCH_ONLY enum is sent through IPC). The prefetching is implemented in the HTMLDocumentParser. When prefetching, the parser runs in single-thread mode. When feeded with HTML input, it runs the preload scanner on it, and stops without actually building or executing the page. BUG=632361 Committed: https://crrev.com/04f065d8f4417c062ec53cbc7d27ed571e6736b2 Cr-Commit-Position: refs/heads/master@{#414406}

Patch Set 1 : comments #

Patch Set 2 : cleanup #

Patch Set 3 : plumbing #

Patch Set 4 : Plumb to IPC #

Patch Set 5 : cleanup parser #

Patch Set 6 : Synchronous parsing #

Patch Set 7 : Tests #

Total comments: 25

Patch Set 8 : Review comments #

Patch Set 9 : Fix compile and rebase #

Patch Set 10 : Add TODO #

Patch Set 11 : Add more CORE_EXPORT #

Patch Set 12 : Sync with CL 2184963002 #

Patch Set 13 : Rebase #

Total comments: 4

Patch Set 14 : Added main frame DCHECK #

Total comments: 6

Patch Set 15 : Fix style #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -11 lines) Patch
M chrome/renderer/chrome_render_frame_observer.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/prerender/prerender_helper.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -1 line 0 comments Download
M chrome/renderer/prerender/prerender_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +24 lines, -3 lines 0 comments Download
M chrome/renderer/prerender/prerenderer_client.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/prerender/prerenderer_client.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi 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/dom/DecodedDataDocumentParser.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/DocumentParser.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/ScriptableDocumentParser.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -1 line 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 13 2 chunks +15 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/html/parser/HTMLDocumentParserTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +92 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/parser/HTMLScriptRunnerHost.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/PrerendererClient.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/PrerendererClientImpl.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/PrerendererClientImpl.cpp View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/PrerenderingTest.cpp View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebPrerendererClient.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 100 (43 generated)
droger
lizeb, mattcary, pasko: FYI this is what I'm experimenting with for prefetching on the renderer ...
4 years, 5 months ago (2016-07-22 13:42:56 UTC) #4
droger
Using the PageVisibilityState is probably not the right way to know if we're doing a ...
4 years, 5 months ago (2016-07-25 14:33:18 UTC) #6
droger
On 2016/07/25 14:33:18, droger wrote: > prefetch and a renderer. Oops, should be: prefetch and ...
4 years, 5 months ago (2016-07-25 14:34:29 UTC) #7
blink-reviews
OK, I just started looking into this as well. Good to know that adding the ...
4 years, 5 months ago (2016-07-25 14:40:57 UTC) #8
chromium-reviews
OK, I just started looking into this as well. Good to know that adding the ...
4 years, 5 months ago (2016-07-25 14:41:04 UTC) #9
droger
Added some more plumbing to get the prefetching bit from the prerender helper
4 years, 4 months ago (2016-07-26 11:34:19 UTC) #10
droger
Finished plumbing to the IPC. As per offline discussion, it may be possible to avoid ...
4 years, 4 months ago (2016-07-27 14:23:41 UTC) #11
droger
+CC csharrison
4 years, 4 months ago (2016-07-27 15:01:35 UTC) #13
Charlie Harrison
+kouhei Hm I haven't taken a long look at this but it seems like we ...
4 years, 4 months ago (2016-07-27 15:27:39 UTC) #15
pasko
On 2016/07/27 15:27:39, csharrison wrote: > +kouhei > > Hm I haven't taken a long ...
4 years, 4 months ago (2016-07-27 16:17:46 UTC) #16
Charlie Harrison
On 2016/07/27 16:17:46, pasko wrote: > On 2016/07/27 15:27:39, csharrison wrote: > > +kouhei > ...
4 years, 4 months ago (2016-07-27 16:35:59 UTC) #17
droger
On 2016/07/27 15:27:39, csharrison wrote: > +kouhei > > Hm I haven't taken a long ...
4 years, 4 months ago (2016-07-27 16:38:59 UTC) #18
droger
On 2016/07/27 16:35:59, csharrison wrote: > > Sure, whatever works. Though I think the suggestion ...
4 years, 4 months ago (2016-07-28 13:26:08 UTC) #20
Charlie Harrison
On 2016/07/28 13:26:08, droger wrote: > On 2016/07/27 16:35:59, csharrison wrote: > > > > ...
4 years, 4 months ago (2016-07-28 14:11:01 UTC) #22
droger
On 2016/07/28 14:11:01, csharrison wrote: > On 2016/07/28 13:26:08, droger wrote: > > On 2016/07/27 ...
4 years, 4 months ago (2016-07-28 16:09:33 UTC) #23
Charlie Harrison
On 2016/07/28 16:09:33, droger wrote: > On 2016/07/28 14:11:01, csharrison wrote: > > On 2016/07/28 ...
4 years, 4 months ago (2016-07-28 16:25:39 UTC) #24
droger
Added unit tests. Please take a look.
4 years, 4 months ago (2016-08-03 13:57:21 UTC) #29
Charlie Harrison
Thanks! cc shivanisha@ for the "fire and forget" question. It would be nice to also ...
4 years, 4 months ago (2016-08-03 14:40:04 UTC) #31
droger
Thanks for the review! Re: adding a test to check that the document is not ...
4 years, 4 months ago (2016-08-03 16:45:50 UTC) #34
Charlie Harrison
Thanks for the clarification! https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp File third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp (right): https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp#newcode814 third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:814: m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr); On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 17:15:15 UTC) #35
pasko
https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp File third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp (right): https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp#newcode814 third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:814: m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBaseElementURL(), nullptr); On 2016/08/03 17:15:14, csharrison wrote: > ...
4 years, 4 months ago (2016-08-04 12:23:09 UTC) #37
Charlie Harrison
On 2016/08/04 12:23:09, pasko wrote: > https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp > File third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp (right): > > https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp#newcode814 > ...
4 years, 4 months ago (2016-08-04 12:26:01 UTC) #38
droger
On 2016/08/04 12:23:09, pasko wrote: > csharrison: thank you for investigation and the info. Let's ...
4 years, 4 months ago (2016-08-04 12:33:37 UTC) #39
Charlie Harrison
SGTM. The patch as-is looks good to me as long as we add TODOs to ...
4 years, 4 months ago (2016-08-04 12:35:46 UTC) #42
pasko
On 2016/08/04 12:26:01, csharrison wrote: > > csharrison: thank you for investigation and the info. ...
4 years, 4 months ago (2016-08-04 12:37:11 UTC) #43
droger
https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp File third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp (right): https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp#newcode1066 third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:1066: if (!length || isStopped()) On 2016/08/03 17:15:14, csharrison wrote: ...
4 years, 4 months ago (2016-08-04 12:42:29 UTC) #44
Charlie Harrison
https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp File third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp (right): https://codereview.chromium.org/2172613002/diff/200001/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp#newcode1066 third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp:1066: if (!length || isStopped()) On 2016/08/04 12:42:29, droger wrote: ...
4 years, 4 months ago (2016-08-04 12:44:41 UTC) #45
droger
csharrison: ping. Does this look good? What else is missing before landing this CL?
4 years, 4 months ago (2016-08-17 12:36:42 UTC) #58
Charlie Harrison
Sorry for the delay. This generally looks good, but I'd like to make sure we ...
4 years, 4 months ago (2016-08-17 14:23:03 UTC) #59
Charlie Harrison
Sorry for the delay. This generally looks good, but I'd like to make sure we ...
4 years, 4 months ago (2016-08-17 14:23:03 UTC) #60
Charlie Harrison
Sorry I sent that a little early. Can you give some background on the prerender ...
4 years, 4 months ago (2016-08-17 14:24:58 UTC) #61
pasko
On 2016/08/17 14:24:58, Charlie Harrison wrote: > Sorry I sent that a little early. > ...
4 years, 4 months ago (2016-08-17 14:54:26 UTC) #62
Charlie Harrison
Thanks, will do another full pass today.
4 years, 4 months ago (2016-08-17 14:55:29 UTC) #63
pasko
On 2016/08/17 14:23:03, Charlie Harrison wrote: > Sorry for the delay. > > This generally ...
4 years, 4 months ago (2016-08-17 14:59:37 UTC) #64
pasko
On 2016/08/17 14:55:29, Charlie Harrison wrote: > Thanks, will do another full pass today. Thank ...
4 years, 4 months ago (2016-08-17 15:00:32 UTC) #65
Charlie Harrison
On 2016/08/17 14:59:37, pasko wrote: > On 2016/08/17 14:23:03, Charlie Harrison wrote: > > Sorry ...
4 years, 4 months ago (2016-08-17 15:04:07 UTC) #66
droger
On 2016/08/17 15:04:07, Charlie Harrison wrote: > > > - adding the load prefetch flag ...
4 years, 4 months ago (2016-08-17 16:22:08 UTC) #67
droger
On 2016/08/17 14:23:03, Charlie Harrison wrote: > - evicting the resource from memory cache I've ...
4 years, 4 months ago (2016-08-18 14:31:16 UTC) #68
shivanisha
On 2016/08/18 at 14:31:16, droger wrote: > On 2016/08/17 14:23:03, Charlie Harrison wrote: > > ...
4 years, 4 months ago (2016-08-18 15:08:21 UTC) #69
Charlie Harrison
The core/html/parser changes lgtm. I wonder if we can do some layout tests or browser ...
4 years, 4 months ago (2016-08-18 21:14:43 UTC) #70
droger
yoav: can you do OWNERS review for blink changes? Note that Charlie is owner for ...
4 years, 4 months ago (2016-08-19 10:04:32 UTC) #72
mmenke
https://codereview.chromium.org/2172613002/diff/320001/chrome/renderer/prerender/prerender_helper.cc File chrome/renderer/prerender/prerender_helper.cc (right): https://codereview.chromium.org/2172613002/diff/320001/chrome/renderer/prerender/prerender_helper.cc#newcode49 chrome/renderer/prerender/prerender_helper.cc:49: sub_frame->GetRenderView()->GetMainRenderFrame())) { DCHECK that render_frame is not the main ...
4 years, 4 months ago (2016-08-19 16:42:50 UTC) #73
droger
Thanks. https://codereview.chromium.org/2172613002/diff/320001/chrome/renderer/prerender/prerender_helper.cc File chrome/renderer/prerender/prerender_helper.cc (right): https://codereview.chromium.org/2172613002/diff/320001/chrome/renderer/prerender/prerender_helper.cc#newcode49 chrome/renderer/prerender/prerender_helper.cc:49: sub_frame->GetRenderView()->GetMainRenderFrame())) { On 2016/08/19 16:42:50, mmenke wrote: > ...
4 years, 4 months ago (2016-08-22 09:30:06 UTC) #76
mmenke
On 2016/08/22 09:30:06, droger wrote: > Thanks. > > https://codereview.chromium.org/2172613002/diff/320001/chrome/renderer/prerender/prerender_helper.cc > File chrome/renderer/prerender/prerender_helper.cc (right): > ...
4 years, 4 months ago (2016-08-22 14:17:22 UTC) #79
mmenke
LGTM (Largely rubberstamp, not familiar with how things work in the renderer) https://codereview.chromium.org/2172613002/diff/340001/chrome/renderer/prerender/prerender_helper.cc File chrome/renderer/prerender/prerender_helper.cc ...
4 years, 4 months ago (2016-08-22 14:22:08 UTC) #80
droger
https://codereview.chromium.org/2172613002/diff/340001/chrome/renderer/prerender/prerender_helper.cc File chrome/renderer/prerender/prerender_helper.cc (right): https://codereview.chromium.org/2172613002/diff/340001/chrome/renderer/prerender/prerender_helper.cc#newcode50 chrome/renderer/prerender/prerender_helper.cc:50: DCHECK(!render_frame()->IsMainFrame()); On 2016/08/22 14:22:08, mmenke wrote: > Is it ...
4 years, 4 months ago (2016-08-22 14:31:01 UTC) #81
droger
yoav: ping
4 years, 4 months ago (2016-08-23 10:00:42 UTC) #82
Yoav Weiss
Apologies for the delayed response (on vacation...) LGTM with a couple nits/questions. https://codereview.chromium.org/2172613002/diff/340001/third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.h File third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.h ...
4 years, 4 months ago (2016-08-23 20:03:58 UTC) #83
droger
Thanks. +jochen as OWNER for (simple) changes in: - chrome/renderer/chrome_render_frame_observer.cc - third_party/WebKit/Source/web/ https://codereview.chromium.org/2172613002/diff/340001/third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.h File third_party/WebKit/Source/core/dom/DecodedDataDocumentParser.h ...
4 years, 4 months ago (2016-08-24 11:33:45 UTC) #85
jochen (gone - plz use gerrit)
lgtm
4 years, 4 months ago (2016-08-24 20:57:04 UTC) #86
jochen (gone - plz use gerrit)
please ping the design doc to chrome-design-docs@ or as part of an intent-to-implement to blink-dev ...
4 years, 4 months ago (2016-08-24 20:58:48 UTC) #87
droger
On 2016/08/24 20:58:48, jochen wrote: > please ping the design doc to chrome-design-docs@ or as ...
4 years, 3 months ago (2016-08-25 08:52:28 UTC) #88
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/2172613002/360001
4 years, 3 months ago (2016-08-25 08:53:54 UTC) #91
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/267427) win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, ...
4 years, 3 months ago (2016-08-25 09:50:02 UTC) #94
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/2172613002/360001
4 years, 3 months ago (2016-08-25 10:02:47 UTC) #96
commit-bot: I haz the power
Committed patchset #15 (id:360001)
4 years, 3 months ago (2016-08-25 12:29:14 UTC) #98
commit-bot: I haz the power
4 years, 3 months ago (2016-08-25 12:32:56 UTC) #100
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/04f065d8f4417c062ec53cbc7d27ed571e6736b2
Cr-Commit-Position: refs/heads/master@{#414406}

Powered by Google App Engine
This is Rietveld 408576698