From bc144352a2c77415ab3aa17a3d783bc6fa4d90e4 Mon Sep 17 00:00:00 2001 From: Daniel Libby Date: Fri, 8 Nov 2019 14:21:14 -0800 Subject: [PATCH] Add support for device-pixel-content-box-size #3554 (#4476) Authors need a way to get the content box size in integral physical pixels. This allows for the correct sizing of the backing store of a canvas to match the snapped CSS size and prevents moire patterns that arise when the sizes are mismatched. Currently authors could use devicePixelRatio and rounding in order to approximate this, but due to implementation differences in pixel snapping, can still get the wrong answer. Additionally, this can be affected by position changes which authors cannot currently hook into in a reasonable manner. --- resize-observer-1/Overview.bs | 41 +++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/resize-observer-1/Overview.bs b/resize-observer-1/Overview.bs index ab051633308..40d5533cd96 100644 --- a/resize-observer-1/Overview.bs +++ b/resize-observer-1/Overview.bs @@ -42,6 +42,8 @@ urlPrefix: https://www.w3.org/TR/CSS21/box.html url: #box-border-area; type: dfn; text: box border area urlPrefix: https://drafts.csswg.org/css-box-3/ url: #content-area; type: dfn; text: content area +urlPrefix: https://www.w3.org/TR/cssom-view-1/ + url: #dom-window-devicepixelratio; type: dfn; text: devicePixelRatio