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