layout/base/GeometryUtils.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef MOZILLA_GEOMETRYUTILS_H_
michael@0 7 #define MOZILLA_GEOMETRYUTILS_H_
michael@0 8
michael@0 9 #include "mozilla/ErrorResult.h"
michael@0 10 #include "nsTArray.h"
michael@0 11 #include "nsCOMPtr.h"
michael@0 12
michael@0 13 /**
michael@0 14 * This file defines utility functions for converting between layout
michael@0 15 * coordinate systems.
michael@0 16 */
michael@0 17
michael@0 18 class nsINode;
michael@0 19 class nsIDocument;
michael@0 20
michael@0 21 namespace mozilla {
michael@0 22
michael@0 23 namespace dom {
michael@0 24 struct BoxQuadOptions;
michael@0 25 struct ConvertCoordinateOptions;
michael@0 26 class DOMQuad;
michael@0 27 class DOMRectReadOnly;
michael@0 28 class DOMPoint;
michael@0 29 class DOMPointInit;
michael@0 30 class OwningTextOrElementOrDocument;
michael@0 31 class TextOrElementOrDocument;
michael@0 32 }
michael@0 33
michael@0 34 typedef dom::TextOrElementOrDocument GeometryNode;
michael@0 35 typedef dom::OwningTextOrElementOrDocument OwningGeometryNode;
michael@0 36
michael@0 37 /**
michael@0 38 * Computes quads for aNode using aOptions, according to GeometryUtils.getBoxQuads.
michael@0 39 * May set an error in aRv.
michael@0 40 */
michael@0 41 void GetBoxQuads(nsINode* aNode,
michael@0 42 const dom::BoxQuadOptions& aOptions,
michael@0 43 nsTArray<nsRefPtr<dom::DOMQuad> >& aResult,
michael@0 44 ErrorResult& aRv);
michael@0 45
michael@0 46 already_AddRefed<dom::DOMQuad>
michael@0 47 ConvertQuadFromNode(nsINode* aTo, dom::DOMQuad& aQuad,
michael@0 48 const GeometryNode& aFrom,
michael@0 49 const dom::ConvertCoordinateOptions& aOptions,
michael@0 50 ErrorResult& aRv);
michael@0 51
michael@0 52 already_AddRefed<dom::DOMQuad>
michael@0 53 ConvertRectFromNode(nsINode* aTo, dom::DOMRectReadOnly& aRect,
michael@0 54 const GeometryNode& aFrom,
michael@0 55 const dom::ConvertCoordinateOptions& aOptions,
michael@0 56 ErrorResult& aRv);
michael@0 57
michael@0 58 already_AddRefed<dom::DOMPoint>
michael@0 59 ConvertPointFromNode(nsINode* aTo, const dom::DOMPointInit& aPoint,
michael@0 60 const GeometryNode& aFrom,
michael@0 61 const dom::ConvertCoordinateOptions& aOptions,
michael@0 62 ErrorResult& aRv);
michael@0 63
michael@0 64 }
michael@0 65
michael@0 66 #endif /* MOZILLA_GEOMETRYUTILS_H_ */

mercurial