Bug
1632885 [wpt PR 23234] - Account for root element paint offset when painting backgrounds, a=testonly
Automatic update from web-platform-tests
Account for root element paint offset when painting backgrounds
The root background is painted from the coordinate space of the root
element, but expands to fill the viewport. The difference between these
spaces needs to be used as an offset when painting the background.
For the non-transform case, this patch removes the paint offset
adjustment made to the entire paint rect in ViewPainter, and only
applies the paint offset for positioning the background in
BackgroundImageGeometry::ComputePositioningArea. This way, painting
starts from the origin, without paint offset.
For the transform case, paint properties will apply the paint offset,
and the entire paint rect needs to be adjusted to remove the paint
offset. This patch specifies the transform state of the view and root
element, and uses GeometryMapper to map the background paint rect into
the coordinate space of the root element.
A TODO has been added to more clearly specify the non-transform
and transform cases.
Bug:
1071957
Change-Id: Iedc1834ef9c400340b668b3eec73a0f3f4506194
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2161350
Auto-Submit: Philip Rogers <pdr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762543}
--
wpt-commits:
f8bd87deb2c2a0ea974adb6c64ef013a60188193
wpt-pr: 23234