Re: Fwd: [cssom-view] small update

On Mon, Apr 21, 2008 at 12:11 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Mon, 21 Apr 2008 20:33:31 +0200, Garrett Smith <dhtmlkitchen@gmail.com>
> wrote:
> > You've made a spec that disagrees with 3/4 implementations. It sounds
> > like you're saying you did it on purpose. Am I right? Please confirm
> > that this was deliberate and intentional.
> >
>
> It actually disagrees with all implementations. That's pretty much the
> behavior you get when you define legacy features. See HTML 5 for more
> examples of this.
>
Is that 'yes I did it on purpose' or a 'no, it was a mistake'?


>
>
> > Opera doesn't disagree with the spec. You said yourself that you
> > changed Opera's implementation then the spec and the spec came first.
> > You actually followed up with saying that neither Opera's impl, nor
> > CSSOM came first:
> > http://lists.w3.org/Archives/Public/www-style/2008Apr/0259.html
> >
>
> Opera does disagree with the specification for a number of features. If I
> remember correctly offset* is not done correctly on inline boxes for
> instance.
>
>
> > [...] The algorithm was backed by an example. Here it is again:
> >
> >
> > <body style='position:relative' onload="alert(a.offsetParent ==
> document.body)">
> > <div id=a style='position:relative'>a</div>
> > </body>
> >
> > The intuitive outcome of the display would be an alert with the value
> 'true'.
> > However, CSSOM would make it so that the outcome would 'false' in the
> alert.
> >
>
> Actually, per the CSSOM the outcome would be 'true'. Replacing
> a.offsetParent with document.getElementById('a') I get 'true' in Firefox and
> Opera in both quirks and standards mode.
>
The example should be checking offsetTop:

javascript:document.write("<body style='position:relative'
onload='alert(a.offsetTop == 0)'><div id=a
style='position:relative'>a</div></body>");document.close();

[snip]

Received on Monday, 21 April 2008 19:17:27 UTC