| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
HasTransientUserActivation());| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
HasTransientUserActivation());That case goes through the navigation path, [FrameLoader](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/frame_loader.cc;drc=2838c7f0f68ba5b24d3c9658b1866d38dccfa1bf;l=717) sets has_user_gesture and the browser turns it into a download via NavigationRequest via navigation common_params, so this line doesn't affect it.
For the flows that do use this IPC (<a download>) Blink [sets the bit](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_anchor_element.cc;drc=b8bd66449acc30b96766f13e4e25c64fc968e287;l=518]) from [local_frame](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/local_frame.cc;drc=2838c7f0f68ba5b24d3c9658b1866d38dccfa1bf;l=2901) so the renderer's copy of the same per-frame user_activation_state_ the browser reads here. The IPC is per-frame and reads the initiating frame's own activation. Lmk if I misunderstood that!
Also added a test.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
HasTransientUserActivation());Zainab Rizvican you check the case where user clicks on a button on foo.com which navigates to bar.com which then turns into a download from content-disposition
I don't think user activation carries across cross-origin frames, but maybe blink doesn't set user activation bit anyway
That case goes through the navigation path, [FrameLoader](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/frame_loader.cc;drc=2838c7f0f68ba5b24d3c9658b1866d38dccfa1bf;l=717) sets has_user_gesture and the browser turns it into a download via NavigationRequest via navigation common_params, so this line doesn't affect it.
For the flows that do use this IPC (<a download>) Blink [sets the bit](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_anchor_element.cc;drc=b8bd66449acc30b96766f13e4e25c64fc968e287;l=518]) from [local_frame](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/local_frame.cc;drc=2838c7f0f68ba5b24d3c9658b1866d38dccfa1bf;l=2901) so the renderer's copy of the same per-frame user_activation_state_ the browser reads here. The IPC is per-frame and reads the initiating frame's own activation. Lmk if I misunderstood that!
Also added a test.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |