- From: Dirk Schulze <dschulze@adobe.com>
- Date: Fri, 23 May 2014 21:27:03 +0000
- To: FX <public-fx@w3.org>, www-style <www-style@w3.org>
Hi, Geometry Interfaces defines a constructor for DOMMatrix that takes a DOMString as argument[1]. The DOMString may be a <transform-list> as defined by CSS Transforms[2]. DOMMatrix does not have any context. It is independent of a Document or Element. However, DOMString can have transform function values with relative or percentage units. “translate(2em, 3rem) translateX(50%) translateY(10ex)” These values can not be resolved without the context of an Element. A possibility could be to pass a second optional Element argument. DOMMatrix would use the context of a passed Element to resolve these values. Constructor(DOMString, Element?) However, SVG transform attributes traditionally don’t have any value units at all and are context unbound. That is why I would like to have the Element argument optional. So we would still need a fallback behavior if no Element was passed. I am also not sure what happens it Element is not attached to a document. How can the viewport or relative values be resolved then? To summarize: 1) Shall we support Element as an optional argument to provide a context for the parser? What about unattached Elements? 2) If no Element was passed, what is the fallback for relative of percentage values? Greetings, Dirk [1] http://dev.w3.org/fxtf/geometry/#dom-dommatrix-dommatrix [2] http://dev.w3.org/csswg/css-transforms/#typedef-transform-list
Received on Friday, 23 May 2014 21:27:40 UTC