Re: [cssom-view] Why is body's offsetParent null ?

On Wed, 23 Apr 2008 15:03:45 +0200, Mike Wilson <mikewse@hotmail.com>  
wrote:
> You seem to try to scare people into your own preference with threats
> about that all quirks of IE will have to be implemented. That is just
> not true in my opinion. I strongly believe that the standard should
> propose a simplified version of the IE model (something like the one
> I showed) instead of leaning towards the bug-ridden cloned impls made
> by IE's competitors.

There are some quirks that Web sites depend upon that we can't simply  
break. For instance, when Opera initially implemented this in a way more  
compatible with Internet Explorer we broke hotmail.com because it was  
using the while(ele != document.body) type of loop.

So the choice for the specification is to either have a separate path for  
quirks mode where the HTML body element is special or just always make the  
HTML body element special. Since there is a better API available, and  
avoiding quirks is preferable, and since this API is discouraged anyway I  
don't think making the HTML body element always special is an issue. It's  
also what three implementors are already doing and one implementor is  
doing already in quirks mode.


> As I've said before; why this focus on quirks mode?
> If there must be only one algorithm why not make it compatible with
> IE's standards mode instead of quirks mode?

Because that would not be unacceptable to implementors. (And compatible  
with IE's standards mode is also not as straightforward as you put it, do  
you pick the hasLayout behavior for instance?)


>> 3. This special cases the root element instead which is arguably
>> somewhat of an improvement, but not much.
>
> It is less special-casing than what CSSOM currently suggests.

Actually, given that CSS allows the root element to be positioned and all  
it would be identical as far as I can tell.


> Now when talking about browsers I have to bring up another thing.
> Considering deployed content on the Web that is using offset* properties  
> -
> what browsers was that content made for? I would say IE as they invented
> the properties. I wouldn't say Opera or Safari. What is your position on
> that? This is a crucial part of being backwards compatible with the Web.

Probably Internet Explorer and Firefox primarily. It more depends on what  
the content is actually doing though. For instance, it seems not enough  
content relies on the difference between quirks and standards mode IE has  
for other browsers to reverse engineer that. It also seems that the  
hasLayout dependency did not have to be reverse engineered by other  
browsers, etc.


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

Received on Thursday, 24 April 2008 10:14:40 UTC