mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 21:28:04 +02:00
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
16 lines
301 B
HTML
16 lines
301 B
HTML
<!doctype HTML>
|
|
<iframe srcdoc="
|
|
<!doctype HTML>
|
|
<style>
|
|
div {
|
|
background: linear-gradient(lightblue, yellow);
|
|
background-size: 300px 300px;
|
|
background-position: 50px 50px;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
}
|
|
</style>
|
|
<div></div>"></iframe>
|