Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix regression in computing <select> visibility.
This was regressed by https://crrev.com/c/3792529. Prior to the above CL, in an out-of-process iframe, the IsEmpty check in MenuListSelectType::ShowPopup would skip the visual viewport check in Element::VisibleBoundsInVisualViewport because the frame is not the page's main frame. The above CL tried to replace this with an equivalent check at the call site: if (!document.GetFrame()->LocalFrameRoot().IsOutermostMainFrame()) { if (local_root_rect.IsEmpty()) return; } followed by the visual viewport intersection if we're in a main frame. However, this isn't equivalent because if the element is showing in the local root we don't return and we execute the visual viewport intersection code erroneously. If the element's y position in the local root is greater than the visual viewport's height this will cause it to be inadvertantly discarded. The fix here is to only perform the visual viewport check in the outermost main frame as before. Bug: 1395079 Change-Id: Ib79f9ab59f80819ca52e41d86e441338fb74a374 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4083099 Reviewed-by: David Bokan <bokan@chromium.org> Commit-Queue: Srinivas Sista <srinivassista@chromium.org> Owners-Override: Srinivas Sista <srinivassista@chromium.org> Cr-Commit-Position: refs/branch-heads/5359@{#1112} Cr-Branched-From: 27d3765-refs/heads/main@{#1058933}
- Loading branch information
Showing
2 changed files
with
79 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters