W3C home > Mailing lists > Public > www-style@w3.org > September 2013

Re: [CSSOM] Revisiting transforms and getBoundingClientRect()

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 20 Sep 2013 15:30:27 +1200
Message-ID: <CAOp6jLb1x6Rbv22zPie3qV5t_p_hJiRpYKR4kAn3s6k1CjnpjA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Pieters <simonp@opera.com>, Simon Fraser <smfr@me.com>, Andrew Dupont <w3@andrewdupont.net>, www-style <www-style@w3.org>
On Fri, Sep 20, 2013 at 8:41 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Thu, Sep 19, 2013 at 1:09 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > On Fri, Sep 20, 2013 at 12:19 AM, Simon Pieters <simonp@opera.com>
> wrote:
> >> What's the use case for this constructor?
> >
> > Which one? I guess I don'thave a use-case for these right now. Let's drop
> > them and we can add them later if they turn out to be useful.
>
> I prefer going the other way - having constructable interfaces unless
> there's a reason not to do so.
>

Actually yes, for writing tests for convertRectFromNode and
convertQuadFromNode I need constructors that let me construct arbitrary
DOMRects and DOMQuads. Is that a valid use-case? I think so :-).

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)]

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.)

For DOMQuad, should we allow self-intersecting quads? I can't see a reason
not to.

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 03:30:56 UTC

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