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

Issue 2661743002: PlzNavigate: Invoke didStartProvisionalLoad() when the renderer initiates a navigation in startLoad( (Closed)

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

Description

PlzNavigate: Invoke didStartProvisionalLoad() when the renderer initiates a navigation early on in FrameLoader::startLoad() A number of layouttests fail because the didStartProvisionalLoad() notification comes in for PlzNavigate after didFinishDocumentLoad() notification is called. In the non PlzNavigate case the load is handled in blink and hence the notifications happen in the correct order. Approach being tried is to invoke didStartProvisionaLoad() in FrameLoader::startLoad() when we find that a navigation is being handled by the client. Ideally we would want to invoke this notification early regardless of whether PlzNavigate is on. However a number of tests and codepaths assume that the current document would be unloaded before we receive the provisional load notification for the non PlzNavigate case. We create a temporary loader just for the purpose of firing the didStartProvisionalLoad() notification. Most of the changes in this patch are boilerplate changes to the didStartProvisionalLoad() function. BUG=638900 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2661743002 Cr-Commit-Position: refs/heads/master@{#448695} Committed: https://chromium.googlesource.com/chromium/src/+/1a023a38bddf1b2d4e64a1f31175b72e1776713d

Patch Set 1 #

Patch Set 2 : Add comment #

Total comments: 2

Patch Set 3 : Add WebURLRequest as a parameter to the WebFrameClient::didStartProvisionalLoad function #

Patch Set 4 : Fix build error #

Total comments: 10

Patch Set 5 : Pass WebDataSource in didStartProvisionalLoad() #

Patch Set 6 : Fix build error #

Patch Set 7 : Fix compile failures #

Patch Set 8 : Rebased to tip #

Total comments: 6

Patch Set 9 : Create the DocumentLoader instance in FrameLoader just before sending out the provisional load noti… #

Patch Set 10 : Reverted unnecessary change #

Patch Set 11 : Fix compile failures. #

Patch Set 12 : Fix compile failures #

Total comments: 2

Patch Set 13 : Revert changes to the layout test #

Patch Set 14 : Fix test failures. #

Total comments: 4

Patch Set 15 : Address review comments and fix redness☻ #

Patch Set 16 : Add comments #

Patch Set 17 : Rebased to tip #

Patch Set 18 : Fix compile failures #

Patch Set 19 : Remove CHECK for redirect chain as the redirects may not be populated for provisional loads for ren… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -121 lines) Patch
M chrome/renderer/chrome_render_frame_observer.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/chrome_render_frame_observer.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/renderer/net/net_error_helper.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/net/net_error_helper.cc View 1 2 3 4 2 chunks +6 lines, -5 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M components/contextual_search/renderer/overlay_js_render_frame_observer.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/contextual_search/renderer/overlay_js_render_frame_observer.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/printing/renderer/print_web_view_helper.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/printing/renderer/print_web_view_helper.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -6 lines 0 comments Download
M components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -5 lines 0 comments Download
M components/test_runner/web_frame_test_client.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M components/test_runner/web_frame_test_client.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -4 lines 0 comments Download
M components/test_runner/web_frame_test_proxy.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +10 lines, -1 line 0 comments Download
M content/public/renderer/render_frame_observer.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +13 lines, -14 lines 0 comments Download
M extensions/renderer/extension_frame_helper.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/extension_frame_helper.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +1 line, -24 lines 0 comments Download
M third_party/WebKit/Source/core/loader/EmptyClients.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoader.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 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 3 chunks +57 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameLoaderClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +3 lines, -13 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameClient.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 89 (70 generated)
ananta
3 years, 10 months ago (2017-01-28 05:05:36 UTC) #6
jam
Camille would be a better reviewer
3 years, 10 months ago (2017-01-30 15:31:11 UTC) #8
clamy
Thanks! A few comments below. https://codereview.chromium.org/2661743002/diff/20001/components/test_runner/web_frame_test_client.cc File components/test_runner/web_frame_test_client.cc (right): https://codereview.chromium.org/2661743002/diff/20001/components/test_runner/web_frame_test_client.cc#newcode420 components/test_runner/web_frame_test_client.cc:420: // Please see the ...
3 years, 10 months ago (2017-01-31 00:20:01 UTC) #9
ananta
https://codereview.chromium.org/2661743002/diff/20001/components/test_runner/web_frame_test_client.cc File components/test_runner/web_frame_test_client.cc (right): https://codereview.chromium.org/2661743002/diff/20001/components/test_runner/web_frame_test_client.cc#newcode420 components/test_runner/web_frame_test_client.cc:420: // Please see the RenderFrameImpl::BeginNavigation() function. On 2017/01/31 00:20:01, ...
3 years, 10 months ago (2017-01-31 03:37:07 UTC) #12
ananta
+japhet for Webkit
3 years, 10 months ago (2017-01-31 20:28:42 UTC) #20
Nate Chapin
https://codereview.chromium.org/2661743002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2661743002/diff/60001/content/renderer/render_frame_impl.cc#newcode3459 content/renderer/render_frame_impl.cc:3459: if (!ds) I think this if() statement is dead ...
3 years, 10 months ago (2017-01-31 22:13:32 UTC) #21
ananta
https://codereview.chromium.org/2661743002/diff/60001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/2661743002/diff/60001/content/renderer/render_frame_impl.cc#newcode3459 content/renderer/render_frame_impl.cc:3459: if (!ds) On 2017/01/31 22:13:32, Nate Chapin wrote: > ...
3 years, 10 months ago (2017-02-02 01:29:23 UTC) #28
Nate Chapin
I'm liking where this is going :) Just a couple more nitpicks, sorry :/ https://codereview.chromium.org/2661743002/diff/140001/components/test_runner/web_frame_test_client.cc ...
3 years, 10 months ago (2017-02-02 19:16:48 UTC) #39
ananta
https://codereview.chromium.org/2661743002/diff/140001/components/test_runner/web_frame_test_client.cc File components/test_runner/web_frame_test_client.cc (right): https://codereview.chromium.org/2661743002/diff/140001/components/test_runner/web_frame_test_client.cc#newcode417 components/test_runner/web_frame_test_client.cc:417: blink::WebLocalFrame* frame, On 2017/02/02 19:16:48, Nate Chapin wrote: > ...
3 years, 10 months ago (2017-02-02 23:54:03 UTC) #41
Nate Chapin
lgtm https://codereview.chromium.org/2661743002/diff/220001/third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html File third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html (right): https://codereview.chromium.org/2661743002/diff/220001/third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html#newcode11 third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html:11: setTimeout(function () { The changes in this file ...
3 years, 10 months ago (2017-02-03 00:17:38 UTC) #44
ananta
https://codereview.chromium.org/2661743002/diff/220001/third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html File third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html (right): https://codereview.chromium.org/2661743002/diff/220001/third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html#newcode11 third_party/WebKit/LayoutTests/http/tests/navigation/back-to-dynamic-iframe.html:11: setTimeout(function () { On 2017/02/03 00:17:38, Nate Chapin wrote: ...
3 years, 10 months ago (2017-02-03 01:35:14 UTC) #47
Nate Chapin
lgtm https://codereview.chromium.org/2661743002/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2661743002/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1736 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1736: if (m_isNavigationHandledByClient && Nit: Can we make this ...
3 years, 10 months ago (2017-02-03 19:35:22 UTC) #56
ananta
https://codereview.chromium.org/2661743002/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp File third_party/WebKit/Source/core/loader/FrameLoader.cpp (right): https://codereview.chromium.org/2661743002/diff/260001/third_party/WebKit/Source/core/loader/FrameLoader.cpp#newcode1736 third_party/WebKit/Source/core/loader/FrameLoader.cpp:1736: if (m_isNavigationHandledByClient && On 2017/02/03 19:35:22, Nate Chapin wrote: ...
3 years, 10 months ago (2017-02-03 20:42:01 UTC) #57
ananta
+lazyboy for extensions owners
3 years, 10 months ago (2017-02-03 21:40:33 UTC) #62
lazyboy
extension_frame_helper.* lgtm
3 years, 10 months ago (2017-02-06 22:30:55 UTC) #65
clamy
Thanks! content/ lgtm.
3 years, 10 months ago (2017-02-07 12:40:50 UTC) #82
jam
files outside webkit/content lgtm
3 years, 10 months ago (2017-02-07 19:23:00 UTC) #83
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/2661743002/360001
3 years, 10 months ago (2017-02-07 19:27:28 UTC) #86
commit-bot: I haz the power
3 years, 10 months ago (2017-02-07 19:35:34 UTC) #89
Message was sent while issue was closed.
Committed patchset #19 (id:360001) as
https://chromium.googlesource.com/chromium/src/+/1a023a38bddf1b2d4e64a1f31175...

Powered by Google App Engine
This is Rietveld 408576698