OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | |
4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | |
5 * Copyright (C) 2006 Apple Inc. All rights reserved. | |
6 * | 3 * |
7 * This library is free software; you can redistribute it and/or | 4 * Redistribution and use in source and binary forms, with or without |
8 * modify it under the terms of the GNU Library General Public | 5 * modification, are permitted provided that the following conditions are |
9 * License as published by the Free Software Foundation; either | 6 * met: |
10 * version 2 of the License, or (at your option) any later version. | |
11 * | 7 * |
12 * This library is distributed in the hope that it will be useful, | 8 * * Redistributions of source code must retain the above copyright |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 * notice, this list of conditions and the following disclaimer. |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 10 * * Redistributions in binary form must reproduce the above |
15 * Library General Public License for more details. | 11 * copyright notice, this list of conditions and the following disclaimer |
| 12 * in the documentation and/or other materials provided with the |
| 13 * distribution. |
| 14 * * Neither the name of Google Inc. nor the names of its |
| 15 * contributors may be used to endorse or promote products derived from |
| 16 * this software without specific prior written permission. |
16 * | 17 * |
17 * You should have received a copy of the GNU Library General Public License | 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
18 * along with this library; see the file COPYING.LIB. If not, write to | 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
20 * Boston, MA 02110-1301, USA. | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
21 */ | 29 */ |
22 | 30 |
23 interface SVGLength { | 31 [ |
| 32 ImplementedAs=SVGLengthTearOff, |
| 33 SetReference(SVGElement contextElement) |
| 34 ] interface SVGLength { |
24 // Length Unit Types | 35 // Length Unit Types |
25 const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; | 36 const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0; |
26 const unsigned short SVG_LENGTHTYPE_NUMBER = 1; | 37 const unsigned short SVG_LENGTHTYPE_NUMBER = 1; |
27 const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; | 38 const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2; |
28 const unsigned short SVG_LENGTHTYPE_EMS = 3; | 39 const unsigned short SVG_LENGTHTYPE_EMS = 3; |
29 const unsigned short SVG_LENGTHTYPE_EXS = 4; | 40 const unsigned short SVG_LENGTHTYPE_EXS = 4; |
30 const unsigned short SVG_LENGTHTYPE_PX = 5; | 41 const unsigned short SVG_LENGTHTYPE_PX = 5; |
31 const unsigned short SVG_LENGTHTYPE_CM = 6; | 42 const unsigned short SVG_LENGTHTYPE_CM = 6; |
32 const unsigned short SVG_LENGTHTYPE_MM = 7; | 43 const unsigned short SVG_LENGTHTYPE_MM = 7; |
33 const unsigned short SVG_LENGTHTYPE_IN = 8; | 44 const unsigned short SVG_LENGTHTYPE_IN = 8; |
34 const unsigned short SVG_LENGTHTYPE_PT = 9; | 45 const unsigned short SVG_LENGTHTYPE_PT = 9; |
35 const unsigned short SVG_LENGTHTYPE_PC = 10; | 46 const unsigned short SVG_LENGTHTYPE_PC = 10; |
36 | 47 |
37 readonly attribute unsigned short unitType; | 48 readonly attribute unsigned short unitType; |
38 [Custom, StrictTypeChecking, RaisesException] attribute float value; | 49 [StrictTypeChecking, RaisesException] attribute float value; |
39 | 50 |
40 [StrictTypeChecking] attribute float valueInSpecifiedUnits; | 51 [StrictTypeChecking, RaisesException=Setter] attribute float valueInSpecifie
dUnits; |
41 [TreatNullAs=NullString, StrictTypeChecking, RaisesException=Setter] attribu
te DOMString valueAsString; | 52 [TreatNullAs=NullString, StrictTypeChecking, RaisesException=Setter] attribu
te DOMString valueAsString; |
42 | 53 |
43 [StrictTypeChecking, RaisesException] void newValueSpecifiedUnits(unsigned s
hort unitType, | 54 [StrictTypeChecking, RaisesException] void newValueSpecifiedUnits(unsigned s
hort unitType, |
44 float valueInSpecifiedUnits
); | 55 float valueInSpecifiedUnits
); |
45 | 56 |
46 [Custom, StrictTypeChecking, RaisesException] void convertToSpecifiedUnits(u
nsigned short unitType); | 57 [StrictTypeChecking, RaisesException] void convertToSpecifiedUnits(unsigned
short unitType); |
47 }; | 58 }; |
48 | 59 |
OLD | NEW |