[whatwg] Use of 'direction' of canvas element

Ian Hickson ian at hixie.ch
Tue Aug 5 02:17:01 PDT 2008

On Fri, 13 Jun 2008, L. David Baron wrote:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas.html#text
> has the following bullet point:
>   # Form a hypothetical infinitely wide CSS line box containing a
>   # single inline box containing the text text, with all the
>   # properties at their initial values except the 'font' property of
>   # the inline element set to font and the 'direction' property of
>   # the inline element set to the 'direction' property of the canvas
>   # element. [CSS]
> This should describe what to do if the canvas element is not in a
> document (and therefore has no 'direction').
> It should probably fall back to 'ltr' as a last resort.
> However, as an intermediate step, it might be worth falling back to
> the direction property of the root element (if present) of the
> canvas element's ownerDocument.

I've made it depend on the 'dir' attribute of the <cavnas> element if the 
CSS property doesn't have a defined computed value.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list