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

On Tue, Dec 22, 2015 at 12:20 PM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:

> On Mon, Dec 21, 2015 at 7:29 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > 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.
>
> Agreed - we created the nice, powerful, generalized method for a
> reason.  Adding independent methods, even if it results in slightly
> shorter code, means the new functionality doesn't interoperate - you
> can't get the coords relative to something else, for instance.
>

I agree this sounds better, thanks!

So how would we characterize this?  Just a new CSSBoxType for "scrolling
area" as defined by http://www.w3.org/TR/cssom-view/#scrolling-area?


> ~TJ
>

Received on Tuesday, 22 December 2015 18:00:57 UTC