Status Update
Comments
nh...@chromium.org <nh...@chromium.org>
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #2
commit 083d22430716a082e2ccb2302b97fa7b3183096d
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Aug 08 05:30:17 2022
Prerender: Move PrerenderHost::PageHolder into its own file
PrerenderHost::PageHolder is big enough to have its own file. This CL
renames the class to PrerenderPageHolder and moves it into
prerender_page_hoder.{cc,h}.
This change is just refactoring to improve code readability and doesn't
change functional behavior.
Bug: 1350676
Change-Id: I3aa2b4ee3ccb8aebb8dbf13bcda55478dda950be
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032430}
[modify]
[add]
[modify]
[modify]
[add]
nh...@google.com <nh...@google.com> #3
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #4
commit e911de184072fb5ba6dd58287264f71bf6d65c21
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Aug 10 07:24:04 2022
Prerender: Test that activation never happens for navigation on new tab
This is a preparation for supporting "prerender-in-new-tab" mode (see
the issue for details). This CL adds tests to make sure the current
behavior that doesn't activate prerendered pages for navigations on new
tabs.
Change-Id: I89b56ab3ec21aba53b1e563780909604c6b45a4a
Bug: 1350676
Reviewed-on:
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1033388}
[modify]
[modify]
nh...@chromium.org <nh...@chromium.org> #5
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #6
commit 3e25270476bf0b0c7e69684d4b53fb9f9b30e25c
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 24 06:46:42 2022
Prerender: Add first implementation of prerender-in-new-tab mode
This CL adds first end-to-end implementation of the prerender-in-new-tab
mode behind a new feature flag (kPrerender2InNewTab). The mode is
available via "target_hint" parameter specified on speculation rules
(this part was implemented by the previous CL).
Also, this CL adds browser tests to make sure the behavior in basic
cases. Follow-up CLs will add more tests (including WPTs) to cover edge
cases.
> Implementation Design
See the design document for details:
This CL can roughly be divided into 2 parts: triggering part and
activation part.
1) Triggering
When "target_hint: _blank" is specified on speculation rules,
PrerenderHostRegistry creates PrerenderNewTabHandle. The handle is
responsible for creating/owning a new WebContents (a.k.a. pre-created
WebContents) to prerender a page for a new tab. The handles asks another
PrerenderHostRegistry associated with the pre-created WebContents to
start prerendering. The pre-created WebContents will have a blank
primary main frame (i.e., sitting at an initial empty document), and the
prerendered page will be in a separate RenderFrameHost in kPrerendering
state. The handle is retained by PrerenderHostRegistry on the triggering
WebContents (not the pre-created WebContents) so that the registry can
handle cancellation requests, for example, initiated by removal of the
speculation rules in the trigger page.
A notable point in this part is that the pre-created WebContents has a
tentative WebContentsDelegate during prerendering. This will be swapped
with a proper one during activation. This CL implements only the basic
functions of the delegate as a first step.
2) Activation
When a request to open a new tab/window comes from the trigger page,
the browser checks if there is a pre-created WebContents for navigation.
If it exists, the browser reuses the pre-created WebContents to handle
the request instead of creating a new WebContents. Then, the browser
starts the navigation sequence in the pre-created WebContents and run
prerender activation as usual.
> TODOs for follow-up CLs
Following things will be addressed by follow-up CLs:
- Support Precog for the prerender-in-new-tab mode.
- Support Extensions for the prerender-in-new-tab mode.
- Flesh out PrerenderNewTabHandle::WebContentsDelegateImpl and add test
cases.
Change-Id: I3f3c7111b1da7a08ef4493ef4eeb23479c257d87
Bug: 1350676
Reviewed-on:
Reviewed-by: Asami Doi <asamidoi@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1075500}
[modify]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #7
commit 651c32931b09e68af9629270848226c1c4314c69
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Nov 28 13:25:04 2022
Prerender: Add test for prerendering in a new tab multiple times
This CL adds a browesr test to make sure that prerendering in a new tab
multiple times and activating one of them succeed.
Bug: 1350676
Change-Id: I938096266849b010ab8ee6fa91db1bc5d1a1149f
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076170}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #8
commit a000bb86473939748f3f4fcdf858a9e509af6453
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Nov 29 06:01:02 2022
Prerender: Remove WebContents& param from CreateAndStartHost(ForNewTab)
This CL removes an unnecessary WebContents& from function params of
PrerenderHostRegistry::CreateAndStartHost(ForNewTab)() as
PrerenderHostRegistry can access WebContents via
WebContentsObserver::web_contents() without the param.
Bug: 1350676
Change-Id: Id62a95af368eabc6f14d0785993cac42eee842ee
Reviewed-on:
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1076675}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #9
commit b930733eac76b096bcbe6e12d941dc5b16057952
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Jan 04 16:40:52 2023
PrerenderInNewTab: Set visibility of prerendering WebContents to HIDDEN
Before this CL, the initial visibility of WebContents that is created
for prerender-in-new-tab was VISIBLE. This was necessary as prerendering
can start only on the visible WebContents. This CL modifies the
visibility check so that WebContents for prerender-in-new-tab can start
prerendering and sets its initial visibility to HIDDEN.
> How does this CL modify the visibility check?
This CL introduces the concept of "initiator" WebContents and
"prerendering" WebContents. The "initiator" WebContents hosts a page
that triggered prerendering (i.e., a page has speculation rules), while
the "prerendering" WebContents will host a prerendered page. In general,
these two WebContents are the same. However, when prerendering is
requested for a new tab, these are different: the "prerendering"
WebContents is a new instance created by PrerenderNewTabHandle.
When prerendering for a new tab starts, it checks the visibility of the
"initiator" WebContents, not the "prerendering" WebContents. When the
"initiator" WebContents is VISIBLE, prerendering actually runs.
> Another possible approach
Instead of the approach above, we could allow prerendering on the HIDDEN
"prerendering" WebContents only for prerender-in-new-tab. However, this
would complicate the state management: WebContents or other components
in the prerendering system need to track which WebContents is for
prerender-in-new-tab. Also, the former approach should be more
consistent with non-prerender-in-new-tab cases.
> Implementation notes
- The "initiator" WebContents is kept in PrerenderAttributes. This is
WeakPtr (not rawptr) as the attributes can outlive the WebContents.
Bug: 1350676
Change-Id: I28aaa692bc0bcb1012f1392ab9c696f22f93bbda
Reviewed-on:
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1088768}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #10
commit 03723fdbb160e5eb7571499911fb264b81014997
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Jul 21 08:39:39 2023
Prerender: Move PrerenderWebContentsDelegate from content/ to chrome/
This CL moves PrerenderWebContentsDelegate from content/ to chrome/ so
that subsequent CLs can implement chrome/ specific things there like
TabHelpers support.
Bug: 1350676
Change-Id: I762fe775c5a0b628aff05607e76f26c477f2b106
Reviewed-on:
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1173376}
[add]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #11
commit 1bf9498d0a91144cce33cd55382cfa78a6dd94a8
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Jul 25 07:04:59 2023
Prerender: Add NOTREACHED in PrerenderWebContentsDelegate
AddNewContents() and ActivateContents() should not be called during
prerendering according to the audit in:
Bug: 1350676
Change-Id: I633a482254d565de279d7bc7a0d4cb69f4836d4a
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1174663}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #12
commit 40027346400d0282964e53e6bed051d51b417b08
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Jul 26 04:17:16 2023
Prerender: Add NOTREACHED in PrerenderWebContentsDelegateImpl::ShouldSuppressDialogs()
Dialogs (JS dialogs and BeforeUnload confirmation) are not allowed to
show on prerendered pages, and also ShouldSuppressDialogs() should not
be called thanks to following checks.
For JS dialogs:
For BeforeUnload confirmation:
Bug: 1350676
Change-Id: I866934152ef590c999dbc5de26f56434e6862165
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1175233}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #13
commit 36384c32031543d8409ba420571401883abea72a
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Jul 27 02:53:47 2023
Prerender: Add NOTREACHED in portal related functions
Portal is not available on a prerendered pages, so related functions in
PrerenderWebContentsDelegateImpl should never be called. This CL makes
sure it with NOTREACHED.
Bug: 1350676
Change-Id: Id118d47f5757f652958da2843705248426d9be99
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1175828}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #14
commit eda099a2b878832a73591f83370de2d2c55b46cb
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Jul 28 06:13:15 2023
Prerender: Add NOTREACHED in WebContentsCreated()
A prerendered page should not create a new WebContents (e.g., the page
cannot open a popup). Therefore, WebContentsCreated() on
PrerenderWebContentsDelegateImpl should never be called. This CL ensures
it by NOTREACHED.
Bug: 1350676
Change-Id: I0af0ac8581174c9d4b3ed5320cd5ab7a0eb2124a
Reviewed-on:
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1176452}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #15
commit 63409c45ab8bf21b8d9377e44b10c5ff9ace5233
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Aug 01 09:33:06 2023
Prerender: Add NOTREACHED in OnDidBlockNavigation()
PrerenderWebContentsDelegateImpl::OnDidBlockNavigation() should never be
called during prerendering. Adding NOTREACHED ensures it.
> Details
OnDidBlockNavigation() is called only on the following sequence:
RenderFrameHostImpl::DidBlockNavigation()
--> WebContentsImpl::OnDidBlockNavigation()
--> WebContentsDelegate::OnDidBlockNavigation()
RenderFrameHostImpl::DidBlockNavigation() makes sure it's never called
during prerendering lifecycle state like this:
DCHECK_NE(lifecycle_state(), LifecycleStateImpl::kPrerendering);
delegate_->OnDidBlockNavigation(blocked_url, initiator_url, reason);
Bug: 1350676
Change-Id: Id73bb7b8b2646508f3e38137ca53d9c962e6e66a
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1177696}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #16
commit 4c4e62b8ad44bbaf9455ab912e977a221d80f1d4
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Sep 12 08:54:29 2023
Prerender: Support PreloadingAttempt for prerender-into-new-tab
- PreloadingAttempt is associated with WebContents.
Prerender-into-new-tab creates its own WebContents (known as prerender
WebContents) and their PreloadingAttempt is associated with that.
- When a prerendered page is not activated (e.g., a primary page that
triggered prerendering navigates to a different page), Chrome records
PreloadingAttempt UKM with the primary page (to be more precise,
Preloading_Attempt_PreviousPrimaryPage), not the prerendered page, as
UKM cannot be recorded with pages that are never visible to users.
This is a bit tricky for prerender-into-new-tab because in their case
the primary trigger page and the prerendered page are in separate
WebContents. To support this, when prerender-into-new-tab starts, it
passes a UKM source ID of the primary page
(triggering_primary_page_source_id) to PreloadingAttempt and then let
it record the UKM with the ID in the case where activation doesn't
happen.
- This CL extends test helpers to handle the case explained above.
This CL supports only PreloadingAttempt. Other precog UKMs like
PreloadingPrediction will be supported by follow-up CLs.
Change-Id: Ic1577a5856571dcb239c07468b9ec39b2e903afe
Bug: 1350676
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1195273}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #17
commit f93776b03012d6f45749efcc15fdb866d4ccbac8
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Sep 12 22:04:27 2023
Prerender: Remove default parameter from PreloadingData::AddPreloadingAttempt()
This is a follow-up CL for
the default parameter, this CL makes callers explicitly specify it for
code readability.
This CL is a mechanical change that doesn't affect functional behavior.
Change-Id: Id67e3cbe2220f9c2b2baae4e02f7602693f481b3
Bug: 1350676
Reviewed-on:
Reviewed-by: Simon Pelchat <spelchat@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1195658}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #18
commit 9f32317c18f0131c1d7d20b1f7650c233d93ed23
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Sep 15 06:51:13 2023
Prerender: Unify underlying implementation of AddPrerender test helpers
This CL unifies underlying implementation of AddPrerender test helpers
so that we can write tests with combinations of multiple URLs,
eagerness, and target_hint on speculation rules in follow-up CLs.
Bug: 1350676
Change-Id: Ie5d853edff96a2b0e677c33fa2f48974e3b3cd2c
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1196998}
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #19
commit a62829be5e5f93de42eb6cf4bcd2c190910951bb
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Sep 15 08:01:36 2023
Prerender: Add test for kSpeculationRuleRemoved with prerender-into-new-tab
Bug: 1350676
Change-Id: If6d5f124133c427b5e9b19bb4296b4bf88ab19f8
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1197016}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #20
commit 42b12be0e75f20966479e781132eb972b52d67ca
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Sep 20 07:50:11 2023
Prerender: Clean up helpers for Preloading_Attempt_PreviousPrimaryPage UKM on tests
For code simplification, this CL pushes boilerplate code for verifying
Preloading_Attempt_PreviousPrimaryPage UKM into helper functions. This
makes it easy to write tests for prerender-into-new-tab.
This is pure refactoring that doesn't change functional behavior.
Bug: 1350676
Change-Id: I13ffcdf4bd529c53f145ff7db4c7a7be9c5757fb
Reviewed-on:
Reviewed-by: Ken Okada <kenoss@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1198849}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #21
commit 5783202425971af8f6e1337d78f97ee8fc743ed8
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Thu Sep 28 07:43:36 2023
Prerender: Skip CancelOnSpeculationCandidateRemoved_WithTargetHintBlank
if kPrerender2NewLimitAndScheduler is enabled
The prerender-into-new-tab case of prerender reset under kPrerender2NewLimitAndScheduler (
not implemented.
To enable kPrerender2NewLimitAndScheduler, this CL tentatively skips the
affected prerender-into-new-tab tests when the flag is enabled.
Bug: 1464021, 1350676
Change-Id: I9480004f7ccbfdc1dc1c6ff43077c292ae90b02d
Reviewed-on:
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1202399}
[modify]
nh...@chromium.org <nh...@chromium.org> #22
nh...@chromium.org <nh...@chromium.org> #23
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #24
commit de49bd6f22b60c14f9e0721ec226a182ecced467
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Oct 05 07:58:58 2023
Prerender: Attach TabHelpers for prerender-into-new-tab
This CL attaches TabHelpers to WebContents created for the
prerender-into-new-tab mode (also known as "prerendering WebContents",
see the design document below for details) by calling
TabHelpers::AttachTabHelpers().
This feature is behind the feature flag (kPrerender2InNewTab), so this
change shouldn't affect behavior in production.
> Details
The prerendering WebContents is not visible to users during prerendering
but becomes a proper browser tab on prerender activation. Therefore,
eventually it should have a full set of TabHelpers as a regular tab.
Instead of selectively attaching them to the WebContents during
prerendering, this CL attaches them all on the WebContents construction.
Some of the TabHelpers may not work during prerendering, but those cases
should be avoided by checking the lifecycle state. The CL author is now
auditing if the check is accordingly implemented in the TabHelpers:
> Design documents (Google internal):
- Overall design of the prerender-into-new-tab:
- WebContentsObserver, WebContentsDelegate, and TabHelpers on
prerendering WebContents:
Bug: 1350676
Change-Id: Ib54fabdc78f3553eed4f9718743ff4c43a3e660e
Reviewed-on:
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Ken Okada <kenoss@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1205695}
[modify]
[modify]
[modify]
[modify]
[add]
[modify]
[modify]
[modify]
[add]
nh...@chromium.org <nh...@chromium.org> #25
wo...@gmail.com <wo...@gmail.com> #26
nh...@chromium.org <nh...@chromium.org> #27
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #28
commit 85b5e6d73ee069c4ef967f3ce0949eba9b57cf09
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Oct 11 12:37:09 2023
Prerender: Add enable-speculation-rules-prerendering-target-hint on chrome://flags
This CL adds enable-speculation-rules-prerendering-target-hint that
enables blink::features::kPrerender2InNewTab (prerender-into-new-tab).
Bug: 1350676
Change-Id: I700ee8703f6cdf157850a725d4b5ea58aca00067
Reviewed-on:
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1208193}
[modify]
[modify]
[modify]
[modify]
[modify]
nh...@chromium.org <nh...@chromium.org> #29
li...@google.com <li...@google.com> #30
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #31
commit 30c43dc5c1ff66510b5d90f84fd5dde35c8e2aa1
Author: Robert Lin <robertlin@chromium.org>
Date: Thu Oct 26 03:51:17 2023
prerender: Verify that WebNavigation is aware of prerender in new tab
With the introduction of prerendering in the new tab, per-frame
APIs should contain the prerendering pages as previous work.
Bug: 1350676
Change-Id: I53be5d5e5c0014dee93ef3b7ec4207acac9827a7
Reviewed-on:
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1215307}
[add]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #32
commit 73d107067dd110d09f6ee78b9ca389d416cde7b9
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Oct 30 06:44:56 2023
Prerender: Remove ScopedPrerenderContentBrowserClient
ScopedPrerenderContentBrowserClient was introduced by
prerender-into-new-tab. The client injected
FakePrerenderWebContentsDelegate so that the ctor of
PrerenderNewTabHandle was able to access a valid
PrerenderWebContentsDelegate instance without a nullptr crash.
However, after
if a valid PrerenderWebContentsDelegate instance exists before accessing
it so the tests no longer need to fake them using
ScopedPrerenderContentBrowserClient.
Bug: 1350676
Change-Id: I7cd75d162b95a660f2ee2e567ffd5b9f162d23e0
Reviewed-on:
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216794}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #33
commit 5d723021c58a81c8b471ea8c223bbe746842f8dc
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Oct 30 08:42:51 2023
Prerender: Disallow focusing on prerender WebContents
Prerender WebContents created for prerender-into-new-tab should not be
focused on.
Bug: 1350676
Change-Id: I8855b1ae767db46618a32f24449740a39a39b288
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216826}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #34
commit 1ac8ac41c8107687ff2b8d9bbaac77ba300e74ed
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Oct 30 09:41:02 2023
Prerender: Add NOTREACHED on PrerenderWebContentsDelegateImpl::LoadingStateChanged
Loading events should not be called during prerendering. See the
following document for details:
To ensure it for prerender-into-new-tab, this CL adds NOTREACHED in
PrerenderWebContentsDelegateImpl::LoadingStateChanged(). The basic
behavior should be tested by prerender_browsertest.cc in chrome/.
Bug: 1350676
Change-Id: Idca1199560381a9054d890d373092f0e9395b83c
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1216844}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #35
commit 936c5da666d890729da28972f0c9e5537bcc48ee
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Oct 31 06:18:32 2023
Prerender: Add NOTREACHED to functions for fullscreen on PrerenderWebContentsDelegate
CanEnterFullscreenModeForTab() should not be called for prerendered
pages for this check:
Other functions should also not be called for the pages.
Bug: 1350676
Change-Id: Icc0f405296cd59d143dd2ffc0319b4b1782780bd
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217420}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #36
commit 1ef962b19de26a5c5674c0bbe72a7fa3467b6723
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Tue Oct 31 08:10:10 2023
Prerender: [1/n] Support new tab trigger reset for kSpeculationRuleRemoved under kPrerender2NewLimitAndScheduler
This CL introduces a notification pass for new tab triggers from
PrerenderHostRegistry::CancelHosts to PrerendererImpl so that
PrerendererImpl can reset them on kSpeculationRuleRemoved under
kPrerender2NewLimitAndScheduler.
Note that this notification pass is also essential for resetting non
eager triggers that are canceled by limit, This case needs further
implementation and, will be handled in subsequent CL.
Bug: 1350676, 1464021
Change-Id: I61ca213e1af296bf31c2db1f3f06f221b37640b8
Reviewed-on:
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217444}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #37
commit 8b15c7c9c86f1ba8bc001ff93703f3038d9f1a3e
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Nov 01 02:15:44 2023
Prerender: Remove unnecessary kPrerender2InNewTab from browser tests
After
kPrerender2InNewTab with ScopedPrerenderFeatureList, so browser tests
don't need to specify the flag by themselves. This CL removes them.
Bug: 1350676
Change-Id: Id72dbde89278e2fea3512a50e5e48efee3d821f8
Reviewed-on:
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Auto-Submit: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1218047}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #38
commit 40fccbb7bcf56bf4cff694af063f2bbbda4977c4
Author: HuanPo Lin <robertlin@chromium.org>
Date: Thu Nov 02 09:05:46 2023
prerender: Verify that WebRequest is aware of prerender in new tab
With the introduction of prerendering in the new tab, per-frame APIs
should contain the prerendering pages as previous work.
Bug: 1350676
Change-Id: Ie69d8d5ac5d38bc0f41ef30ce44403ba422db5d4
Reviewed-on:
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1218694}
[modify]
[add]
[add]
[add]
[add]
nh...@chromium.org <nh...@chromium.org> #39
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #40
commit 5fa8a402a4f1b66fc2b0d84a90e7c5c7f25f21a3
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Nov 07 04:37:29 2023
Prerender: Cancel prerendering on PrerenderWebContentsDelegate::CloseContents()
Based on the audit on [1], this CL makes PrerenderWebContentsDelegate
that is used for prerender-into-new-tab cancel prerendering on
CloseContents().
[1]
Bug: 1350676, 1499759
Change-Id: Idc758d92b0d7a11ef4b7aef072a0177ca8af74c8
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1220726}
[modify]
[modify]
[add]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #41
commit e2286ad769153b0024597bcae78f9cb9c8cf3457
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Nov 08 04:27:42 2023
Prerender: Implement AddPrerender() with target hint
This CL adds new AddPrerender() variant in PrerenderTestHelper to
synchronously trigger prerendering with target hint.
Bug: 1350676
Change-Id: Ifd2bd2f6c8727644f47e57693fb0f51f47ef8d51
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1221389}
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #42
commit b2ec35770a91b45ca3308e83d525cec14f78096e
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Wed Nov 08 07:19:49 2023
Prerender: Use PrerenderWebContentsDelegate as default impl in content/
This CL moves functions on PrerenderWebContentsDelegateImpl in chrome/
to PrerenderWebContentsDelegate in content/, and uses
PrerenderWebContentsDelegate as the default implementation of
WebContentsDelegate for prerender-into-new-tab in content/. This
enables to write tests for the delegate in content/ and share them with
non-prerender-into-new-tab cases in follow-up CLs.
Bug: 1350676
Change-Id: I52ba8ea639ef21023ad58fd405797512996f17ab
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1221425}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #43
commit 28503652e591ca9a8547ebe818a82b52cf0ac9fa
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 09 03:18:41 2023
Prerender: Run mixed content test for prerender-into-new-tab
This CL generalizes an existing mixed content test so that the test can
also run for prerender-into-new-tab. PrerenderTargetAgnosticBrowserTest
is the test fixture to run tests that should commonly pass for both
prerender-into-current-tab and prerender-into-new-tab.
This CL also adds NOTREACHED_NORETURN() to
PrerenderWebContentsDelegate::ShouldAllowRunningInsecureContent()
because mixed content on prerenderd pages should cancel prerendering
before the delegate is called. The test above makes sure this behavior.
Bug: 1350676
Change-Id: I11ce7b2d3ff77330ebaf537d979c8346c3056d6c
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222048}
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #44
commit 3a4c3d454b0e9ff316085535d1781785b5505ea6
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Thu Nov 09 10:27:14 2023
Prerender: [3/n]: New tab triggers follow the initiator registry's limit
Prior to this CL, triggers with prerender-into-new-tab were not applied
to the prerender's limit. The motivation of this CL is to take them into
account under the current mechanism of prerender limit.
Under kPrerender2InNewTab, CreateAndStartHost will be called in the
newly created WebContents’s PrerenderHostRegistry for new tab triggers
rather than in initiator WebContents’s registry, while it is called in
initiator ones for normal triggers. In either case, we want to control
the limit based on the initiator WebContents. This CL adopts this
behavior.
Bug: 1350676, 1464021
Change-Id: Ia12e60d6b38bc1766883685de5c5b19dcfeebabb
Reviewed-on:
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222172}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #45
commit fdadcbfd8d8e8e498b19673bde38cc2ed1d79214
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Thu Nov 09 10:38:23 2023
Prerender: Run bad response tests for prerender-into-new-tab
This CL runs tests for cancellation of prerendering on bad http
responses for prerender-into-new-tab.
A challenging point is how to retrieve WebContents and PrerenderHost
created for prerender-into-new-tab before they start prerendering
navigation that results in cancellation. To achieve it, this CL
introduces PrerenderHostCreationWaiter that runs a given callback on the
ctor of PrerenderHost.
Bug: 1350676
Change-Id: I59b425d3be0a2ecccd776dd357fdf2490a99ac6c
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222175}
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #46
commit 4d5e6aba24e518be64422f7d125854a5f3750418
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Nov 10 03:28:46 2023
Prerender: Stop returning PrerenderHost for prerender-into-new-tab
This CL stops returning PrerenderHost for prerender-into-new-tab on
PrerenderHostRegistry::FindHostByUrlForTesting() as this behavior is not
consistent with other Find() functions on the registry and may be
confusing.
Some tests and test helpers (e.g., HasHostForUrl()) depend on this
behavior. This CL also fixes them.
Bug: 1350676
Change-Id: I70b78f77b6387f70d74b71ac171004ec277ff155
Reviewed-on:
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222724}
[modify]
[modify]
[modify]
[modify]
nh...@chromium.org <nh...@chromium.org> #47
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #48
commit ebbb250d0a19c4a2c45862df96e3bbc315c24dcf
Author: HuanPo Lin <robertlin@chromium.org>
Date: Fri Nov 10 06:23:48 2023
prerender: Verify that tab APIs don't include invisible tabs.
This CL verifies that tab APIs don't include invisible tabs
(prerendering into a new tab).
Bug: 1350676
Change-Id: Ia04fe5ff63fb34d98081ca1e5e61df5f10570ad9
Reviewed-on:
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: David Bertoni <dbertoni@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1222770}
[add]
[add]
[add]
[add]
[add]
[modify]
nh...@chromium.org <nh...@chromium.org> #49
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #50
commit 067b1505be1c35ca557f0f3d5fb4b2ccd5a567fa
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Nov 13 02:58:32 2023
Prerender: Run SuppressOpenURL() test with target hint
This CL runs PrerenderBrowserTest.SuppressOpenURL with target hint
"_blank" (i.e., prerender-into-new-tab). Thanks to the check in
WebContentsImpl::OpenURL(), OpenURL() should not run during
prerendering.
This CL also adds NOTREACHED in
PrerenderWebContentsDelegate::OpenURLFromTab(). This should also not be
called during prerendering.
Bug: 1350676
Change-Id: I5faa199a03ad3dfead8aa189e9fada20c06e9acf
Reviewed-on:
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223446}
[modify]
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #51
commit fd22fb9eaef4ed6ad3fc426600fbf401f33425cc
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Mon Nov 13 03:43:59 2023
Prerender: Add test for activation on window.open() with target_hint
This CL adds a new test for prerender activation on window.open() with
target_hint: "_blank". The activation should succeed if window.open() is
annotated with "_blank" and "noopener".
Bug: 1350676
Change-Id: I92d3a8f591f530b71697ae6e544266b787435738
Reviewed-on:
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1223459}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #52
commit b11b9b8f36a642e553bdf59db5cd9b26570eea6f
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Tue Nov 14 02:55:40 2023
Prerender: Run LifecycleState test with target hint
This CL runs PrerenderBrowserTest.RenderFrameHostLifecycleState with
target hint "_blank" (i.e., prerender-into-new-tab).
Bug: 1350676
Change-Id: Ic6f25bf35e04f50e2fe32850d92bab889428ab0a
Reviewed-on:
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1224057}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #53
commit d318cceb124805f55f329545c90796aa386b44cd
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Mon Dec 04 08:24:04 2023
Prerender: Refactor CancelHosts / CancelAllHosts
This CL
1) decouples the implementation of canceling normal hosts and canceling
new tab host to separate functions into CancelHostInternal /
CancelNewTabHostInternal.
2) allows CancelAllHosts to use these functions (so that all
cancellation functions eventually use them).
This CL is intended for refactoring for subsequent CL (more
specifically, 1) to call only new tab cancellation, and 2) to reduce
codepoint to modify cancellation logic), and not intended to change
current behavior. Note that CancelAllHosts now additionally performs
NotifyCancel and ReportMetrics, but the current cancellation reason of
CancelAllHosts will be one of {kTabClosedWithoutUserGesturekStop,
kMemoryPressureAfterTriggered, kPrimaryMainFrameRendererProcessCrashed,
kPrimaryMainFrameRendererProcessKilled, kMemoryPressureAfterTriggered},
and current NotifyCancel and ReportMetrics will not handle this.
Therefore, this modification has no effect on current behavior.
Bug: 1350676, 1499759
Change-Id: If041451ddcda50c5aa8a2aa4c2cc80760927ef4b
Reviewed-on:
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1232589}
[modify]
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #54
commit 2ca19ebe2d865c03981c3f002e67cc62b022d334
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Tue Dec 05 01:02:07 2023
Prerender: Fix obsoleted comment on PHR::FindHostByUrlForTesting
After
longer includes new-tab triggers. This CL deletes the corresponding
comments.
Bug: 1350676
Change-Id: I84cfe98e6b20d5319ce5bd6f25f20e1de75909c9
Reviewed-on:
Auto-Submit: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1233110}
[modify]
gi...@appspot.gserviceaccount.com <gi...@appspot.gserviceaccount.com> #55
commit 7a6716891faf1d0e757754ccb457ea7e40970755
Author: Taiyo Mizuhashi <taiyo@chromium.org>
Date: Fri Dec 08 08:34:15 2023
Prerender: Propagate new tab trigger cancellation to initiator WC
The cancellation of new-tab hosts can be invoked through either the
initiator WebContents’s PrerenderHostRegistry or PHR on WC created for
new-tab hosts. This CL propagates latter cancellation to initiator WC’s
PHR to perform the followings:
- Clear the corresponding entry of
prerender_new_tab_handle_by_frame_tree_node_id_ in the initiator PHR.
This will eventually destroy WC created for new-tab hosts.
- Notify the initiator PrerendererImpl of cancellation (for consistency)
This CL implements this by asynchronously calling initiator PHR’s
CancelNewTabHostInternal on the CancelHostInternal on the new-tab PHR.
For more information, please refer to this doc:
Bug: 1350676, 1499759
Change-Id: I2e7e2bf42132a1f16f99993fef2430996fa65259
Reviewed-on:
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Taiyo Mizuhashi <taiyo@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1234906}
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
[modify]
nh...@chromium.org <nh...@chromium.org> #56
is...@google.com <is...@google.com> #57
[Auto-CCs applied]
[Monorail blocked-on:
[Monorail components added to Component Tags custom field.]
ap...@google.com <ap...@google.com> #58
Branch: main
commit 79536f27a32379c750db2a0fd1fe57c2dcc1bb82
Author: HuanPo Lin <robertlin@chromium.org>
Date: Sat Feb 10 14:41:53 2024
preload: relax window_id constraint in TabObject
This CL makes ExtensionTabUtil::GetTabById return WINDOW_ID_NONE and
relax the constraints that TabObject cannot have invalid window_id when
it is prerender into a new tab.
Please refer to
for more details about the discussion.
Bug: 1350676
Change-Id: I677cc431ec567e6150bb5ea66739afc86537df47
Reviewed-on:
Reviewed-by: Devlin Cronin <rdevlin.cronin@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1258893}
M chrome/browser/extensions/api/tabs/tabs_apitest.cc
M chrome/browser/extensions/extension_tab_util.cc
M chrome/common/extensions/api/tabs.json
M chrome/test/data/extensions/api_test/tabs/prerendering_into_new_tab/test.js
ap...@google.com <ap...@google.com> #59
Branch: main
commit 12ce3b5fb4807fd2b6b0929ad8f38ea759d3d393
Author: HuanPo Lin <robertlin@chromium.org>
Date: Mon Mar 04 09:01:14 2024
Prerender: Support PreloadingPrediction for prerender-into-new-tab
This CL is a follow-up for
- PreloadingPrediction is associated with WebContents.
Prerender-into-new-tab creates its own WebContents (known as
prerender WebContents) and this CL makes the PreloadingPrediction to be
associated with the Prerender WebContents instead of initiators.
- When a prerendered page is not activated (e.g., the primary page that
triggered prerendering navigates to a different page), Chrome records
PreloadingPrediction UKM with the primary page, namely
Preloading_Prediction_PreviousPrimaryPage,
not within the prerendered page, as UKM cannot be recorded
with pages that are never visible to users.
In case of prerender-into-new-tab, the primary trigger page and the
prerendered page are two separate WebContents. When
prerender-into-new-tab starts, it passes a UKM source ID of the
primary page (triggering_primary_page_source_id) to
PreloadingPrediction and then let it record the UKM with the ID in the
case where activation doesn't happen.- This CL extends test helpers to
handle the case explained above.
Bug: 40234240
Change-Id: I6dd41b7d33bc08109aa91224664e7706165ca319
Reviewed-on:
Reviewed-by: Max Curran <curranmax@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Lingqi Chi <lingqi@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1267735}
M chrome/browser/navigation_predictor/anchor_element_preloader.cc
M chrome/browser/predictors/autocomplete_action_predictor.cc
M chrome/browser/preloading/prefetch/search_prefetch/search_prefetch_service.cc
M components/no_state_prefetch/browser/no_state_prefetch_manager.cc
M content/browser/preloading/preloading_data_impl.cc
M content/browser/preloading/preloading_data_impl.h
M content/browser/preloading/preloading_data_impl_unittest.cc
M content/browser/preloading/preloading_decider.cc
M content/browser/preloading/prerender/prerender_browsertest.cc
M content/browser/preloading/prerender/prerender_host_registry.cc
M content/browser/preloading/prerender/prerender_new_tab_handle.cc
M content/public/browser/preloading_data.h
ap...@google.com <ap...@google.com> #60
Branch: main
commit b44220ac7fa4088100832d9a5c631b00449cc4ab
Author: Robert Lin <robertlin@chromium.org>
Date: Mon Apr 15 12:32:36 2024
prerender: Verify that chrome.tabs.onAttached listeners are aware of
prerendering into a new tab.
This CL verifies that onAttached includes prerendering into a new
tab after prerender activation (move shouldn't be able to interact
with invisible tabs).
Bug: 1350676
Change-Id: Ie88763d7e33bfa25f57d54cb8c51756267f50fdb
Reviewed-on:
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287277}
M chrome/test/data/extensions/api_test/tabs/prerendering_into_new_tab/test.js
ap...@google.com <ap...@google.com> #61
Project: chromium/src
Branch: main
Author: Hiroki Nakagawa <
Link:
Prerender: Test popup activates a page prerendered with target_hint _blank
Expand for full commit details
Prerender: Test popup activates a page prerendered with target_hint _blank
This CL adds a new test to confirm that a page prerendered with
target_hint "_blank" can be activated by window.open() with "popup".
Bug: 40234240
Change-Id: I80596217c4f85c51bba7d31c5c196a4429ad9f5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090535
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Taiyo Mizuhashi <taiyo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1396574}
Files:
- M
content/browser/preloading/prerender/prerender_browsertest.cc
Hash: c9239d9f0498a7e9b9c25f1352b78f542e0e2488
Date: Sun Dec 15 22:09:43 2024
ap...@google.com <ap...@google.com> #62
Project: chromium/src
Branch: main
Author: Hiroki Nakagawa <
Link:
Prerender: Deduplicate test code for window.open()
Expand for full commit details
Prerender: Deduplicate test code for window.open()
For code cleanup, this CL deduplicates test code for
ActivateOnWindowOpen_NewTab and ActivateOnWindowOpen_PopUp.
Bug: 40234240
Change-Id: If877f02e2b492e1c37c4e572e1335eada00444ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6101118
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1397182}
Files:
- M
content/browser/preloading/prerender/prerender_browsertest.cc
Hash: 684b8aa70e634855e5bde946f5159efd0a6834f9
Date: Tue Dec 17 01:07:34 2024
ap...@google.com <ap...@google.com> #63
Project: chromium/src
Branch: main
Author: HuanPo Lin <
Link:
preload: Enable OT for Prerender2InNewTab
Expand for full commit details
preload: Enable OT for Prerender2InNewTab
This CL associates Prerender2InNewTab with RuntimeEnabledFeature and put
the feature in the origin trial list.
1. Prerender2InNewTab will work as a kill-switch for the basic
functionality, so it is enabled by default.
2. SpeculationRulesTargetHint is used for origin trial that allows
sites to opt-in the target hint experiment.
3. Only if both Prerender2InNewTab and SpeculationRulesTargetHint
are enabled, the target hint of target="_blank" can be parsed, and
then UA will attempt to prerender the target page in a new tab, or it
will be prerendered into same tab as fallback.
Bug: 40234240
Change-Id: I4ee5768664e7bc13d5069e86b21872adff922719
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6261869
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1424410}
Files:
- M
content/browser/preloading/prerender/prerender_browsertest.cc
- M
content/browser/preloading/prerenderer_impl_browsertest.cc
- M
content/public/test/prerender_test_util.cc
- M
content/public/test/prerender_test_util.h
- M
content/test/content_test_bundle_data.filelist
- A
content/test/data/prerender/origin_trial_initiator.html
- M
third_party/blink/common/features.cc
- M
third_party/blink/public/common/features.h
- M
third_party/blink/renderer/core/origin_trials/origin_trial_context.cc
- M
third_party/blink/renderer/core/speculation_rules/document_speculation_rules.cc
- M
third_party/blink/renderer/core/speculation_rules/speculation_rule_set.cc
- M
third_party/blink/renderer/platform/runtime_enabled_features.json5
- M
third_party/blink/web_tests/VirtualTestSuites
Hash: fc5c6a24ee52c0289e89b0fec1bc4497f4d2a643
Date: Tue Feb 25 02:42:23 2025
dx...@google.com <dx...@google.com> #64
Project: chromium/src
Branch: main
Author: Robert Lin
Link:
preload: Add UseCounter for prerender in new tab
Expand for full commit details
Allow Prerender2InNewTab feature to support origin trials by adding
UserCounter.
https://chromestatus.com/feature/5162540351094784
Bug: 40234240
Change-Id: Ia8c09ff232d6368d0ecbd8c774bd52c002c68c38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6356103
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1433326}
Files:
- M
chrome/browser/preloading/prerender/prerender_browsertest.cc
- M
content/browser/preloading/prerenderer_impl.cc
- M
third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
- M
tools/metrics/histograms/metadata/blink/enums.xml
Hash: 3354b290c4752757835b0888406b2055a5b39c75
Date: Mon Mar 17 02:19:57 2025
ch...@google.com <ch...@google.com> #65
M135 merge request created. Please update crbug/404360643 to have this merge reviewed.
dx...@google.com <dx...@google.com> #66
Project: chromium/src
Branch: refs/branch-heads/7049
Author: Robert Lin
Link:
[M135] preload: Add UseCounter for prerender in new tab
Expand for full commit details
Allow Prerender2InNewTab feature to support origin trials by adding
UserCounter.
https://chromestatus.com/feature/5162540351094784
(cherry picked from commit 3354b290c4752757835b0888406b2055a5b39c75)
Bug: 40234240
Fixed: 404360643
Change-Id: Ia8c09ff232d6368d0ecbd8c774bd52c002c68c38
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6356103
Commit-Queue: Huanpo Lin <robertlin@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1433326}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6379443
Cr-Commit-Position: refs/branch-heads/7049@{#1087}
Cr-Branched-From: 2dab7846d0951a552bdc4f350dad497f986e6fed-refs/heads/main@{#1427262}
Files:
- M
chrome/browser/preloading/prerender/prerender_browsertest.cc
- M
content/browser/preloading/prerenderer_impl.cc
- M
third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
- M
tools/metrics/histograms/metadata/blink/enums.xml
Hash: 970dbc415c733b3e33b37967358e0c7944fe500e
Date: Fri Mar 21 07:40:07 2025
Description
Design Doc (visible only to Googlers for now):