Re: [cssom-view] Correction and clarification for the coordinate systems of getClientRect/getBoundingClientRect

On Fri, Dec 2, 2011 at 6:17 AM, Rik Cabanier <cabanier@gmail.com> wrote:

> That was just an example.
>
> My point was that information is lost if you append all the transforms.
> Better to give back the untransformed bounds and tell the user to do the
> math himself.
>

Information is already lost when an ancestor element has a CSS transform.
The only way to not lose information would be to treat every element with a
CSS transform as establishing a new viewport for the purposes of
getClientRects, and then requiring authors to do a massive amount of work
to take all transforms into account themselves. This isn't how
getClientRects works in any browser, and isn't going to happen. Instead, we
need to define new APIs that don't lose information.

Adobe works on Webkit. If you feel strongly enough about this, get the
behavior changed in Webkit. If you do that within a couple of months, I can
still revert my changes before they reach a Firefox release.

By the way, I wish we could avoid:
1) Browsers A, B and C introduce some behavior that either violates a spec
or treats an unclear part of the spec in a certain way, silently without
seeking clarification or modification of the spec
2) Browser D follows suit, and raises the issue that the spec needs to be
clarified/modified
3) Bystanders object (often violently) to browser D developers, holding
them to responsible for the change
4) Browser D developers get to take the heat and spend a lot of time and
energy defending the change
(It's especially galling when the bystanders in step 3 work on browsers A,
B or C :-).)

The worst case of this was the CSS unit changes to make 1in==96px. People
are still writing comments on my blog accusing me of destroying the metric
system :-).

Rob
-- 
"If we claim to be without sin, we deceive ourselves and the truth is not
in us. If we confess our sins, he is faithful and just and will forgive us
our sins and purify us from all unrighteousness. If we claim we have not
sinned, we make him out to be a liar and his word is not in us." [1 John
1:8-10]

Received on Thursday, 1 December 2011 21:11:37 UTC