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

OffscreenCanvas is "upcoming" until [multiple implementations support it](https://caniuse.com/#search=OffscreenCanvas). Until then, it's premature to call it a finished spec, regardless of spec document status. (A web that only works in Chrome is not the web)

Likewise, the effort here is to cooperate on a direction amongst the implementations.

I disagree with your characterization of (a), as the same issue can happen with the resize observer. (b) is accurate, absent a window.devicePixelRatio observer.

However, the ergonomics of an explicit poll are much better for most apps, in particular much easier to integrate into existing codebases. If an app relayouts after getting a rect, that's on them, just as it's on them when they relayout after canvas resize today. "Move your resize into a ResizeObserver event" sounds good but in practice tends to be a pain. As echoed by @juj, non-trivial apps have a preference for a simpler more explicit API here.

As such, explicit poll is my preference, even if we also add an event observer. Requiring use of the event observer seems worse. (Additionally, the explicit poll is easier to implement, and thus easier to ship quickly)

-- 
GitHub Notification of comment by jdashg
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3554#issuecomment-504209572 using your GitHub account

Received on Thursday, 20 June 2019 21:37:50 UTC