Re: [cssom-view] New WD "CSSOM View Module"

On Thu, 28 Feb 2008 20:09:40 +0100, Garrett Smith <dhtmlkitchen@gmail.com>  
wrote:
> "not perfect," huh?
>
> (sarcasm)

It would be good if you stayed constructive.


> It is useless to have BODY be a containing block in CSS1Compat mode.
> There is no reason for having BODY be an offsetParent.

This is what several browsers implement already.


> I've asked you why BODY should be an offsetParent, you ignored. So I'm
> asking again: Why must BODY be an offsetParent? Why is it important to
> break what Internet Explorer really does? How does this help
> compatibility?

Several browsers already do this and it doesn't require a separate quirks  
mode code path. This is the most straightforward solution to that problem.


>>> What is b's containing block?
>>
>>  The initial containing block as far as I can tell.
>
> Are you sure?

Pretty sure, but it's been a while since I studied CSS 2.1 in detail.


> BODY being offsetParent:
>   PRO: AVK doesn't think it's bad
>   PRO: AVK already spec'd it that way
>   CON: Contradicts Internet Explorer's behavior
>   CON: Impossible to determine coords of BODY element.

There's another API for that.


>   CON: Impossible to determine coords of BODY's abs pos'd child when
> BODY is static.

That's not true as far as I can tell.


>>  I couldn't find that function, but yes, that might be problematic.
>
> Did you download the file?

I did, but apparently something went wrong as I just retried and found the  
function you mentioned. It sees to use getBoundingClientRect() and falls  
back to offset otherwise. Doesn't seem too bad.


> It seems you are writing an API that you do not actually use.

My profession is Web developer, if that's what you mean. I've certainly  
used the API though, see the numerous tests I pointed out earlier.


> I asked you before, and you ignored my question:
> Will browsers really "converge" to implement offsetXXX the way you've
> specified?

I can't predict the future. That's the plan though.


> GS: "The browsers have different implementations - from each other and  
> from the spec. Should all the browsers change? Won't that break existing
>  scripts?..."
>
> AVK: "They should converge in one way or another."
> -- end.
>
> Can you answer my second question?
> 2. Won't that break existing scripts?

As currently specified the API will work fine for most scripts that simply  
try to determine the position of an element. If scripts rely on API  
specifics of a particular implementation it might be problematic yes.  
We'll have to await implementation feedback.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Thursday, 28 February 2008 19:56:41 UTC