Re: [CSSOM] Revisiting transforms and getBoundingClientRect()

On Sat, Sep 21, 2013 at 5:11 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Sep 19, 2013 at 8:30 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > For DOMRect I suggest:
> > [Constructor(double left, double top, double width, double height)]
> > For DOMQuad:
> > [Constructor(DOMRect rect),
> >  Constructor(DOMPoint p1, DOMPoint p2, DOMPoint p3, DOMPoint p4)]
>
> Yeah, these are all good.
>
> > One question about the DOMRect constructor: Should we allow negative
> > width/height? I think not. (And APIs should never create DOMRects with
> > negative width/height.)
>
> We should "allow", where that means at least "not throw".  I'm
> undecided on whether it should clamp to zero, or just construct the
> appropriate rectangle (with a top/left different from what you passed
> in).  Or just go ahead and allow negative width/height directly, with
> the obvious mapping to a quad?  That would mean that the top/left
> properties aren't actually the top left corner of the shape, though.
>

Yes, that sounds bad. I think it'd be best to have the DOMRect constructor
flip things around to ensure that width and height are not negative.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Friday, 20 September 2013 21:58:19 UTC