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

Re: [matrix][cssom-view] DOMPoint, DOMPointLiteral definitions

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 25 Sep 2013 12:46:07 +1200
Message-ID: <CAOp6jLZ53ScejpuijvdY+Brx=Vqy5Rj4_B67V54XTgn-Vr7Wxw@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Simon Pieters <simonp@opera.com>, Simon Fraser <smfr@me.com>, Dirk Schulze <dschulze@adobe.com>, www-style list <www-style@w3.org>
On Wed, Sep 25, 2013 at 11:52 AM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Tue, Sep 24, 2013 at 4:34 PM, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > Who said anything about DOMRect inheriting from DOMQuad? It shouldn't,
> IMHO.
> > Constructing a DOMQuad from a DOMRect is good enough.
>
> I think I did - anything that can take a DOMQuad should be able to
> take a DOMRect as well, and user-level code should be able to interact
> with multiple Quads/Rects in a consistent way (that is, as Quads).  We
> could maybe do this latter by just letting the DOMQuad constructor
> take a DOMRect (and vice versa, to obtain the aligned bounding rect?).
>

I feel like things are spinning out of control here. Should we make
DOMPoint inherit from DOMRect since a point is just a degenerate rectangle?

APIs that take quads (of which we have zero right now) can take DOMRects as
well via overloading or union types. That, plus a DOMQuad constructor that
takes a DOMRect, and DOMQuad.bounds, should be enough to make things
arbitrarily convenient.

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 Wednesday, 25 September 2013 00:46:36 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC