Fix viewport mapping for OOPIF roots in GeometryMapper fast path The GeometryMapper fast path in MapToVisualRectInAncestorSpace had an early return when the object being mapped was the same as the target ancestor. While correct for standard ancestor mapping, this was incorrect when mapping a LayoutView to the viewport (ancestor == nullptr). In the fast path, mapping to the viewport internalizes the ancestor as the LayoutView itself. The early return caused the code to skip ApplyViewportClippingAndOffsets, which is responsible for applying the remote viewport transform in OOPIF processes. As a result, OOPIF roots incorrectly returned process-local coordinates instead of absolute coordinates when mapping to the viewport. This fix ensures the early return only triggers if we are specifically mapping to the object's own space and NOT to the viewport. This allows remote transforms to be correctly applied to the LayoutView, making its geometry consistent with its children and other frames. Gated behind the new FixVisualRectRemoteViewportTransform runtime feature as a kill-switch. Bug: 496593975 Change-Id: I7af640b3178e3a4abc241bd609a4934f030e266c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7745904 Commit-Queue: Nan Lin <linnan@chromium.org> Reviewed-by: Stefan Zager <szager@chromium.org> Cr-Commit-Position: refs/heads/main@{#1613267}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.