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

Issue 2694013005: Cleanup blink-side PlzNavigate logic (Closed)

Created:
3 years, 10 months ago by Nate Chapin
Modified:
3 years, 9 months ago
Reviewers:
clamy, ananta
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, dglazkov+blink, darin-cc_chromium.org, blink-reviews, kinuko+watch, blink-reviews-api_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleanup blink-side PlzNavigate logic Instead of tracking the existence of a PlzNavigate navivation via FrameLoader::m_isNavigationHandledByClient, track it by creating a provisional DocumentLoader and doing ~all of the initiatlization steps except actually calling startLoadingMainResource(). PlzNavigate is emulating most of these steps anyway. This way we can do the normal checks for a provisional navigation in the exact same way for both PlzNavigate and non-PlzNavigate loads. Where PlzNavigate needs special handling, checking DocumentLoader::didStart() will indicate whether the real navigation actually began. Reworked a couple layout tests to have more reliable timings to make this work. BUG= Review-Url: https://codereview.chromium.org/2694013005 Cr-Commit-Position: refs/heads/master@{#454973} Committed: https://chromium.googlesource.com/chromium/src/+/476af767372c72fd5e71f365e78481af9ce9a1d9

Patch Set 1 #

Patch Set 2 : Cleanup blink-side PlzNavigate logic #

Patch Set 3 : Test #

Patch Set 4 : Test #

Patch Set 5 : Fix a test #

Patch Set 6 : More fixes #

Patch Set 7 : Cleanup blink-side PlzNavigate logic #

Patch Set 8 : Cleanup blink-side PlzNavigate logic #

Patch Set 9 : Cleanup blink-side PlzNavigate logic #

Patch Set 10 : Cleanup blink-side PlzNavigate logic #

Patch Set 11 : Cleanup blink-side PlzNavigate logic #

Patch Set 12 : Move most of the placeholder handling to startLoad() #

Patch Set 13 : Move most of the placeholder handling to startLoad() #

Total comments: 12

Patch Set 14 : merge #

Total comments: 10

Patch Set 15 : Address ananta's comments #

Total comments: 15

Patch Set 16 : Address clamy's comments #

Patch Set 17 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -186 lines) Patch
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +16 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/embeddedEnforcement/embedding_csp-header.html View 1 2 chunks +10 lines, -8 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-parent-explicit-domain-isolated-world.html View 1 1 chunk +7 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/cross-frame-access-parent-isolated-world.html View 1 1 chunk +6 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +20 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 chunks +70 lines, -128 lines 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationPolicy.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/NavigationScheduler.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/ProgressTracker.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/WebNavigationPolicy.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 75 (57 generated)
Nate Chapin
clamy, ananta: how does this look? I think it gets the blink-side navigation logic a ...
3 years, 10 months ago (2017-02-24 23:42:06 UTC) #42
ananta
Looks good. https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/DocumentLoader.h File third_party/WebKit/Source/core/loader/DocumentLoader.h (right): https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/DocumentLoader.h#newcode140 third_party/WebKit/Source/core/loader/DocumentLoader.h:140: // actually handled in the renderer. Please ...
3 years, 9 months ago (2017-03-01 23:13:18 UTC) #43
ananta
https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1731 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1731: m_provisionalDocumentLoader->setSentDidFinishLoad(); Where do we call client()->dispatchDidStartProvisionalLoad(loader) for PlzNavigate?. We ...
3 years, 9 months ago (2017-03-01 23:15:24 UTC) #44
Nate Chapin
https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/DocumentLoader.h File third_party/WebKit/Source/core/loader/DocumentLoader.h (right): https://codereview.chromium.org/2694013005/diff/260001/third_party/WebKit/Source/core/loader/DocumentLoader.h#newcode140 third_party/WebKit/Source/core/loader/DocumentLoader.h:140: // actually handled in the renderer. On 2017/03/01 23:13:17, ...
3 years, 9 months ago (2017-03-01 23:37:46 UTC) #45
clamy
Thanks for the cleanup, this makes the code easier to read. A few questions below. ...
3 years, 9 months ago (2017-03-02 14:37:18 UTC) #50
Nate Chapin
On 2017/03/02 14:37:18, clamy wrote: > Also one general question: how does this fit with ...
3 years, 9 months ago (2017-03-02 19:38:19 UTC) #53
Nate Chapin
https://codereview.chromium.org/2694013005/diff/280001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2694013005/diff/280001/content/renderer/render_frame_impl.cc#newcode5225 content/renderer/render_frame_impl.cc:5225: // If we didn't call didFailProvisionalLoad or there wasn't ...
3 years, 9 months ago (2017-03-02 19:39:18 UTC) #54
clamy
Thanks! Just one clarification needed and this should be good for me. https://codereview.chromium.org/2694013005/diff/280001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp ...
3 years, 9 months ago (2017-03-03 13:45:34 UTC) #57
Nate Chapin
https://codereview.chromium.org/2694013005/diff/280001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2694013005/diff/280001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1736 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1736: // which can detach this frame. On 2017/03/03 13:45:34, ...
3 years, 9 months ago (2017-03-03 20:19:14 UTC) #58
clamy
On 2017/03/03 20:19:14, Nate Chapin wrote: > https://codereview.chromium.org/2694013005/diff/280001/third_party/WebKit/Source/core/loader/FrameLoader.cpp > File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): > > https://codereview.chromium.org/2694013005/diff/280001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1736 ...
3 years, 9 months ago (2017-03-06 14:27:43 UTC) #59
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/2694013005/300001
3 years, 9 months ago (2017-03-06 18:38:46 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/165232) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 9 months ago (2017-03-06 18:42:01 UTC) #63
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/2694013005/320001
3 years, 9 months ago (2017-03-06 19:23:35 UTC) #66
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/377656)
3 years, 9 months ago (2017-03-06 21:16:31 UTC) #68
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/2694013005/320001
3 years, 9 months ago (2017-03-06 21:22:14 UTC) #70
commit-bot: I haz the power
Committed patchset #17 (id:320001) as https://chromium.googlesource.com/chromium/src/+/476af767372c72fd5e71f365e78481af9ce9a1d9
3 years, 9 months ago (2017-03-06 22:14:34 UTC) #73
clamy
Hi Nate, It seems this patch is causing two layout tests to fail again when ...
3 years, 9 months ago (2017-03-07 17:06:46 UTC) #74
Nate Chapin
3 years, 9 months ago (2017-03-07 18:27:46 UTC) #75
Message was sent while issue was closed.
On 2017/03/07 17:06:46, clamy wrote:
> Hi Nate,
> 
> It seems this patch is causing two layout tests to fail again when PlzNavigate
> is enabled: inspector-protocol/page/frameAttachedDetached.html and
> inspector-protocol/page/frameStartedLoading.html. The issue last time was that
> the Inspector code got notified twice about the start of a renderer-initiated
> navigation. Could you take a look?
> 
> Thanks!

Will do. I know those tests were passing earlier, I think I must've messed up my
last rebase. :/

Powered by Google App Engine
This is Rietveld 408576698