Hi Charlie,
Could you please take a look?
+CC Rakina (OOO) / Fergal: FYI
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks! A few initial questions as I get caught up from OOO.
pending deletion, or in the back-forward cache. kPendingCommit is
intentionally still accepted, since the renderer sends these messages
while committing the new document and before the browser has processed
DidCommitNavigation.I'm curious whether this is a problem? It seems similar to the CSP case being changed in https://chromium-review.googlesource.com/c/chromium/src/+/7877125, so that the state is sent at DidCommitNavigation time and not before.
// kPendingCommit, or kPrerendering). Note that kPendingCommit must beI'm not sure I understand why prerendering is ok. That document might not activate for quite a while after it commits, which makes it seem like it could set values that are seen by the current RFH in the meantime. Does it not use the same BrowsingContextState, or is there another reason it's ok?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
pending deletion, or in the back-forward cache. kPendingCommit is
intentionally still accepted, since the renderer sends these messages
while committing the new document and before the browser has processed
DidCommitNavigation.I'm curious whether this is a problem? It seems similar to the CSP case being changed in https://chromium-review.googlesource.com/c/chromium/src/+/7877125, so that the state is sent at DidCommitNavigation time and not before.
Yes, this annoys me. At the moment, we can handle IPCs about the document, prior to receiving the DidCommit of the document, which is problematic.
Ideally, we would break the IPC into two parts:
The second parts would be "bound" to the RenderFrameHost after DidCommit (e.g. this could be an interface requested with browser_interface_binders).
I don't have easy solution I can implement immediately. Please see this as a better than nothing improvement.
// kPendingCommit, or kPrerendering). Note that kPendingCommit must beI'm not sure I understand why prerendering is ok. That document might not activate for quite a while after it commits, which makes it seem like it could set values that are seen by the current RFH in the meantime. Does it not use the same BrowsingContextState, or is there another reason it's ok?
My understanding of prerendering (subject to recent updates): Like BFCache, we only support full 'page' prerendering rather than individual iframe documents. Because prerendering runs inside an independent FrameTree, it cannot affect other active pages. Additionally, prerendering is disallowed if the page maintains a window.open relationship with another context, which would have been problematic.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Thanks! Basically LGTM apart from the prerendering case. Feel free to pull in a prerendering-knowledgable reviewer if that's useful for resolving the question.
pending deletion, or in the back-forward cache. kPendingCommit is
intentionally still accepted, since the renderer sends these messages
while committing the new document and before the browser has processed
DidCommitNavigation.Arthur SonzogniI'm curious whether this is a problem? It seems similar to the CSP case being changed in https://chromium-review.googlesource.com/c/chromium/src/+/7877125, so that the state is sent at DidCommitNavigation time and not before.
Yes, this annoys me. At the moment, we can handle IPCs about the document, prior to receiving the DidCommit of the document, which is problematic.
Ideally, we would break the IPC into two parts:
- Initials IPCs to setup the communications with the renderer and initiate the creation of the document.
- IPC sent from the committed document.
The second parts would be "bound" to the RenderFrameHost after DidCommit (e.g. this could be an interface requested with browser_interface_binders).
I don't have easy solution I can implement immediately. Please see this as a better than nothing improvement.
Thanks, that sounds like a good plan, and consistent in spirit with what Diana did in the CL above. No need to solve in this CL.
// kPendingCommit, or kPrerendering). Note that kPendingCommit must beArthur SonzogniI'm not sure I understand why prerendering is ok. That document might not activate for quite a while after it commits, which makes it seem like it could set values that are seen by the current RFH in the meantime. Does it not use the same BrowsingContextState, or is there another reason it's ok?
My understanding of prerendering (subject to recent updates): Like BFCache, we only support full 'page' prerendering rather than individual iframe documents. Because prerendering runs inside an independent FrameTree, it cannot affect other active pages. Additionally, prerendering is disallowed if the page maintains a window.open relationship with another context, which would have been problematic.
Those sound like reasons to treat it the same as BFCache, since it sounds like neither will attempt to make changes to the BrowsingContextState of the current RFH.
Does anything fail if we leave kPrerendering out of the condition, and ideally cancel the prerender similar to line 539?
If there is a reason that prerendering has to be allowed to target the current BrowsingContextState, we should leave a comment about it, but so far that doesn't sound safe to me. (I suppose we could leave a TODO to tackle that next if necessary, but it seems a lot like the other cases we're guarding against here.)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
// kPendingCommit, or kPrerendering). Note that kPendingCommit must beArthur SonzogniI'm not sure I understand why prerendering is ok. That document might not activate for quite a while after it commits, which makes it seem like it could set values that are seen by the current RFH in the meantime. Does it not use the same BrowsingContextState, or is there another reason it's ok?
Charlie ReisMy understanding of prerendering (subject to recent updates): Like BFCache, we only support full 'page' prerendering rather than individual iframe documents. Because prerendering runs inside an independent FrameTree, it cannot affect other active pages. Additionally, prerendering is disallowed if the page maintains a window.open relationship with another context, which would have been problematic.
Those sound like reasons to treat it the same as BFCache, since it sounds like neither will attempt to make changes to the BrowsingContextState of the current RFH.
Does anything fail if we leave kPrerendering out of the condition, and ideally cancel the prerender similar to line 539?
If there is a reason that prerendering has to be allowed to target the current BrowsingContextState, we should leave a comment about it, but so far that doesn't sound safe to me. (I suppose we could leave a TODO to tackle that next if necessary, but it seems a lot like the other cases we're guarding against here.)
Unlike BFCache (where the FrameTreeNode is shared with the active page), prerender runs in a completely isolated FrameTree that has never seen any active RenderFrameHost before activation. Its replication updates only mutate its own isolated BrowsingContextState.
Additionally, prerendered pages actively load and legitimately receive updates (e.g., ad tagging, CSP).
Tested on CQ:
I've updated the comment in `CanApplyFrameReplicationUpdate` and filed crbug.com/547754865 with TODOs for both cases.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Adding the missing owner for extending the enum:
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
From analysis/uma/chrome-metrics.gwsq:
Histograms should by default be reviewed by the owners of the subdirectories. The chromium-met...@google.com gwsq should be used when there are no individual owners, or for escalation to the Metrics team.
If you are interested in becoming a metrics reviewer, please review the instructions at https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#Becoming-a-Metrics-Reviewer
Reviewer source(s):
rka...@chromium.org is from context(analysis/uma/chrome-metrics.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
RfhEnforceInsecureNavigationsSetIs there a name that would make it clear for external consumers what the reason is about? RFH is a Chromium-specific internal term so it might not be well understood by developers of CDP clients. Perhaps we can drop the Rfh prefix?
| Code-Review | +1 |
ChromeTrackEvent LGTM assuming agreement on the names for the reasons.
RfhEnforceInsecureNavigationsSetIs there a name that would make it clear for external consumers what the reason is about? RFH is a Chromium-specific internal term so it might not be well understood by developers of CDP clients. Perhaps we can drop the Rfh prefix?
Thanks Alex. Since these reasons reflect temporary Chromium-internal RFH state that we plan to resolve at some point, I decided not to expose them in DevTools at all. They are important for chromium metrics, but not for devtools consumers. I've reverted the Page.pdl changes and mapped them to Unknown in page_handler.cc instead.
Does that sounds good to you? See change in: content/browser/devtools/protocol/page_handler.cc
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
RfhEnforceInsecureNavigationsSetArthur SonzogniIs there a name that would make it clear for external consumers what the reason is about? RFH is a Chromium-specific internal term so it might not be well understood by developers of CDP clients. Perhaps we can drop the Rfh prefix?
Thanks Alex. Since these reasons reflect temporary Chromium-internal RFH state that we plan to resolve at some point, I decided not to expose them in DevTools at all. They are important for chromium metrics, but not for devtools consumers. I've reverted the Page.pdl changes and mapped them to Unknown in page_handler.cc instead.
Does that sounds good to you? See change in: content/browser/devtools/protocol/page_handler.cc
| Auto-Submit | +1 |
Thanks! Waiting for Robert review now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Ignore FrameReplicationState updates from speculative RFHs
EnforceInsecureRequestPolicy, EnforceInsecureNavigationsSet and
HadStickyUserActivationBeforeNavigationChanged write directly to the
BrowsingContextState that a speculative RenderFrameHost shares with the
FrameTreeNode's current document. This means that updates received on a
speculative RenderFrameHost would overwrite the FrameReplicationState of
the still-current cross-origin document and be broadcast to its proxies.
Ignore these updates when the receiving RenderFrameHost is speculative,
pending deletion, or in the back-forward cache. kPendingCommit is
intentionally still accepted, since the renderer sends these messages
while committing the new document and before the browser has processed
DidCommitNavigation.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |