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

Re: [csswg-drafts] [cssom-view] getBoundingClientRect undefined in paged media (#4463)

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Tue, 29 Oct 2019 10:05:25 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-547345913-1572343524-sysbot+gh@w3.org>
Well, not quite. `getClientRects()` gives you one rectangle per fragment of the element. The goal of `getBoundingClientRect()` is to get a bounding box grouping those. But you can only group per page.

So if you have an element with 5 fragments, 2 on the first page and 3 on the second, `getClientRects()` will give you 5 rectangles. `getBoundingClientRect()` as currently specified will give you one, but what it is is undefined. Some kind of `getBoundingClientRects()`  (note the plural) would give you 2: one that is the bounding box of both fragments on the first page, one that is the bounding box of the 3 fragments on the second page.

GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4463#issuecomment-547345913 using your GitHub account
Received on Tuesday, 29 October 2019 10:05:26 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:55 UTC