W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2019

Re: [csswg-drafts] [resize-observer] device-pixel-border-box size (#3554)

From: Chris Harrelson via GitHub <sysbot+gh@w3.org>
Date: Sat, 09 Mar 2019 00:44:37 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-471126740-1552092276-sysbot+gh@w3.org>
Re compositing: in Chromium, it is *not* the case that the pixel snapped size depends on compositing.
It depends only on the local layout size of the element. Therefore that concern is moot.

Re pixel snapping across transforms: Chromium pixel-snaps across rectilinear translations, but
not scales. It also does not pixel-snap across CSS containment isolation.
(ref: `FragmentPaintPropertyTreeBuilder::UpdateForPaintOffsetTranslation` in the code)

The pixel-sizing of the canvas depends on the pixel-sizing algorithm and is not scaled up to include
scales of ancestor transforms.

This means that the `device-pixel-border-box` will change if certain ancestor transforms change.
`device-pixel-border-box` also depends on paint offset generally.

I think we should just specify that if a `ResizeObserver` is configured to observe `device-pixel-border-box`, it needs to take into account all such sources of rounding and difference like I enumerated
above. This is more expensive, and so should be an opt-in only for developers who need it.

-- 
GitHub Notification of comment by chrishtr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3554#issuecomment-471126740 using your GitHub account
Received on Saturday, 9 March 2019 00:44:38 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:31:05 UTC