W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: [cssom-view] Which APIs should be 'double' vs. 'long'

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 22 Dec 2015 16:29:49 +1300
Message-ID: <CAOp6jLZxmZceHUTMjYJAq2OSAetPdDM7td82AVPbyPZhN+OSRg@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Trav Stone <travtrilogi@gmail.com>, Rick Byers <rbyers@chromium.org>, "www-style@w3.org" <www-style@w3.org>, Emil A Eklund <eae@chromium.org>, Boris Zbarsky <bzbarsky@mit.edu>
On Mon, Dec 21, 2015 at 9:33 PM, Simon Pieters <simonp@opera.com> wrote:

> Or if there's a border, then getBoundingClientRect includes the border.
> But getBoxQuads() lets you select the content box... An alternative would
> be to extend getBoxQuads() with a way to get the "content minus scrollbars"
> box.
>
>     elm.getBoxQuads({box: 'scroll'})[0].getBounds().width
>
> It's more wordy than elm.scrollWidth (and elm.getScrollRect().width),
> although you can support transformed boxes.


I'd prefer to add new box types to CSSBoxType rather than add new methods
to expose them independently.

But for this particular use-case, it's even more important to add
getBoxQuads() to Range. Anything based on ClientRects is broken if you use
it inside a rotation transform. Admittedly that's rare, but I shudder to
think of how many apps would break if you just put a rotation on <body>...

Rob
-- 
lbir ye,ea yer.tnietoehr  rdn rdsme,anea lurpr  edna e hnysnenh hhe uresyf
toD
selthor  stor  edna  siewaoeodm  or v sstvr  esBa  kbvted,t
rdsme,aoreseoouoto
o l euetiuruewFa  kbn e hnystoivateweh uresyf tulsa rehr  rdm  or rnea
lurpr
.a war hsrer holsa rodvted,t  nenh hneireseoouot.tniesiewaoeivatewt sstvr
esn
Received on Tuesday, 22 December 2015 03:30:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC