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

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.

~TJ

Received on Tuesday, 22 December 2015 17:20:56 UTC