1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/GeometryUtils.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * http://dev.w3.org/csswg/cssom-view/ 1.11 + * 1.12 + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 1.13 + * liability, trademark and document use rules apply. 1.14 + */ 1.15 + 1.16 +enum CSSBoxType { "margin", "border", "padding", "content" }; 1.17 +dictionary BoxQuadOptions { 1.18 + CSSBoxType box = "border"; 1.19 + GeometryNode relativeTo; 1.20 +}; 1.21 + 1.22 +dictionary ConvertCoordinateOptions { 1.23 + CSSBoxType fromBox = "border"; 1.24 + CSSBoxType toBox = "border"; 1.25 +}; 1.26 + 1.27 +[NoInterfaceObject] 1.28 +interface GeometryUtils { 1.29 + [Throws, Pref="layout.css.getBoxQuads.enabled"] 1.30 + sequence<DOMQuad> getBoxQuads(optional BoxQuadOptions options); 1.31 + [Throws, Pref="layout.css.convertFromNode.enabled"] 1.32 + DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options); 1.33 + [Throws, Pref="layout.css.convertFromNode.enabled"] 1.34 + DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options); 1.35 + [Throws, Pref="layout.css.convertFromNode.enabled"] 1.36 + DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); 1.37 +}; 1.38 + 1.39 +Text implements GeometryUtils; 1.40 +Element implements GeometryUtils; 1.41 +// PseudoElement implements GeometryUtils; 1.42 +Document implements GeometryUtils; 1.43 + 1.44 +typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode; 1.45 \ No newline at end of file