Re: [cssom-view] ISSUE-4: Coordinate space of the return value of getBoxQuads()

CSS doesn't specify any such thing as "document coordinates" AFAIK. It
doesn't specify any layout for Document nodes.

Thus, I thought using it as a proxy for the viewport would be OK. I
proposed using Document to represent the viewport on the mailing list:
http://lists.w3.org/Archives/Public/www-style/2013Sep/0486.html
http://lists.w3.org/Archives/Public/www-style/2013Oct/0044.html
Simon wasn't sure but accepted it, and no-one clearly objected. In those
messages I also suggested making the viewport the default coordinate system
when relativeTo is not specified, and I stick by that since it matches
getBoundingClientRect/getClientRects and helps you use getBoxQuads as a
more powerful version of those methods.

Perhaps using Window as the object representing the viewport would be more
intuitive, but that would require making Window implement GeometryUtils,
and keeping things off the global object has some value. Also we have
geometry-related methods like elementFromPoint on Document currently,
taking coordinates in the viewport coordinate system, so there is precedent.

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 June 2014 22:14:35 UTC