michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://dev.w3.org/csswg/cssom-view/ michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: enum CSSBoxType { "margin", "border", "padding", "content" }; michael@0: dictionary BoxQuadOptions { michael@0: CSSBoxType box = "border"; michael@0: GeometryNode relativeTo; michael@0: }; michael@0: michael@0: dictionary ConvertCoordinateOptions { michael@0: CSSBoxType fromBox = "border"; michael@0: CSSBoxType toBox = "border"; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface GeometryUtils { michael@0: [Throws, Pref="layout.css.getBoxQuads.enabled"] michael@0: sequence getBoxQuads(optional BoxQuadOptions options); michael@0: [Throws, Pref="layout.css.convertFromNode.enabled"] michael@0: DOMQuad convertQuadFromNode(DOMQuad quad, GeometryNode from, optional ConvertCoordinateOptions options); michael@0: [Throws, Pref="layout.css.convertFromNode.enabled"] michael@0: DOMQuad convertRectFromNode(DOMRectReadOnly rect, GeometryNode from, optional ConvertCoordinateOptions options); michael@0: [Throws, Pref="layout.css.convertFromNode.enabled"] michael@0: DOMPoint convertPointFromNode(DOMPointInit point, GeometryNode from, optional ConvertCoordinateOptions options); michael@0: }; michael@0: michael@0: Text implements GeometryUtils; michael@0: Element implements GeometryUtils; michael@0: // PseudoElement implements GeometryUtils; michael@0: Document implements GeometryUtils; michael@0: michael@0: typedef (Text or Element /* or PseudoElement */ or Document) GeometryNode;