Closed Bug 1870835 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 43725 - Remove CSS Zoom Adjustment for GetClientRect

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 43725 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/43725
Details from upstream follow.

Yotam Hacohen <yotha@chromium.org> wrote:

Remove CSS Zoom Adjustment for GetClientRect

This patch is a follow up for crrev.con/c/5085708, implementing the same
logic that was added to GetBoundingClientRect in GetClientRect.

This change modifies the behavior of the call for elements with a CSS
property. Previously, the dimensions of the quad returned by
GetClientRect were adjusted to the effective zoom of an
element, which is the combination of the page zoom and the CSS zoom.
This meant that the dimensions were not affected by either of those
values.

This had the unintended consequence of causing two elements with the
same size before zoom, but with different zoom properties, to have the
same sized Client Rects, even though they had different sizes on the
page.

The new behavior adjusts the quad to the page's zoom, but not to
the CSS zoom. This means that two elements with the same size before
zoom, but with different zoom properties, will now have different sized
Client Rects.

Change-Id: Id2298581b4e218b4783067a3af13b44329abe58d

Reviewed-on: https://chromium-review.googlesource.com/5135595
WPT-Export-Revision: 23ebd136cd97b06624f65df4afcf960b96f8a960

Component: web-platform-tests → Layout
Product: Testing → Core
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.