[css3-2d-transforms] convertPoint* functions when node isn't an element in a document

View: New views
3 Messages — Rating Filter:   Alert me  

[css3-2d-transforms] convertPoint* functions when node isn't an element in a document

by Øyvind Stenhaug :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The convertPointFromPageToNode and convertPointFromNodeToPage functions  
take a Node as their first parameter. Since there are at least 12 node  
types this means they don't just accept elements, but also things like  
attribute nodes and comment nodes, for which the function descriptions  
don't really make sense. It's also possible to have a node that's not part  
of a document tree. The specification should say what happens in these  
cases.

A related suggestion is to have these functions on an extension to the  
Element interface instead (though that still leaves the case of e.g.  
document.createElement('div').convertPoint[...]).

--
Øyvind Stenhaug
Core Norway, Opera Software ASA


Re: [css3-2d-transforms] convertPoint* functions when node isn't an element in a document

by Simon Fraser-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 5, 2009, at 6:14 AM, Øyvind Stenhaug wrote:

> The convertPointFromPageToNode and convertPointFromNodeToPage  
> functions take a Node as their first parameter. Since there are at  
> least 12 node types this means they don't just accept elements, but  
> also things like attribute nodes and comment nodes, for which the  
> function descriptions don't really make sense. It's also possible to  
> have a node that's not part of a document tree. The specification  
> should say what happens in these cases.
>
> A related suggestion is to have these functions on an extension to  
> the Element interface instead (though that still leaves the case of  
> e.g. document.createElement('div').convertPoint[...]).

I think these methods would sit better as part of the CSSOM View  
module (http://www.w3.org/TR/cssom-view/), which, in general, needs to  
become more transform-aware.

Simon



Re: [css3-2d-transforms] convertPoint* functions when node isn't an element in a document

by Dean Jackson-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 06/10/2009, at 9:50 AM, Simon Fraser wrote:

> On Oct 5, 2009, at 6:14 AM, Øyvind Stenhaug wrote:
>
>> The convertPointFromPageToNode and convertPointFromNodeToPage  
>> functions take a Node as their first parameter. Since there are at  
>> least 12 node types this means they don't just accept elements, but  
>> also things like attribute nodes and comment nodes, for which the  
>> function descriptions don't really make sense. It's also possible  
>> to have a node that's not part of a document tree. The  
>> specification should say what happens in these cases.
>>
>> A related suggestion is to have these functions on an extension to  
>> the Element interface instead (though that still leaves the case of  
>> e.g. document.createElement('div').convertPoint[...]).
>
> I think these methods would sit better as part of the CSSOM View  
> module (http://www.w3.org/TR/cssom-view/), which, in general, needs  
> to become more transform-aware.

I've just noted in the specification that convertPoint* should be part  
of CSSOM View.

Anne or Øyvind - since Opera seems to be looking after that spec, do  
you have any proposals for how this should appear?

Dean