1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/CSSPrimitiveValue.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 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 file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + */ 1.9 + 1.10 +interface Counter; 1.11 + 1.12 +interface CSSPrimitiveValue : CSSValue { 1.13 + 1.14 + // UnitTypes 1.15 + const unsigned short CSS_UNKNOWN = 0; 1.16 + const unsigned short CSS_NUMBER = 1; 1.17 + const unsigned short CSS_PERCENTAGE = 2; 1.18 + const unsigned short CSS_EMS = 3; 1.19 + const unsigned short CSS_EXS = 4; 1.20 + const unsigned short CSS_PX = 5; 1.21 + const unsigned short CSS_CM = 6; 1.22 + const unsigned short CSS_MM = 7; 1.23 + const unsigned short CSS_IN = 8; 1.24 + const unsigned short CSS_PT = 9; 1.25 + const unsigned short CSS_PC = 10; 1.26 + const unsigned short CSS_DEG = 11; 1.27 + const unsigned short CSS_RAD = 12; 1.28 + const unsigned short CSS_GRAD = 13; 1.29 + const unsigned short CSS_MS = 14; 1.30 + const unsigned short CSS_S = 15; 1.31 + const unsigned short CSS_HZ = 16; 1.32 + const unsigned short CSS_KHZ = 17; 1.33 + const unsigned short CSS_DIMENSION = 18; 1.34 + const unsigned short CSS_STRING = 19; 1.35 + const unsigned short CSS_URI = 20; 1.36 + const unsigned short CSS_IDENT = 21; 1.37 + const unsigned short CSS_ATTR = 22; 1.38 + const unsigned short CSS_COUNTER = 23; 1.39 + const unsigned short CSS_RECT = 24; 1.40 + const unsigned short CSS_RGBCOLOR = 25; 1.41 + 1.42 + readonly attribute unsigned short primitiveType; 1.43 + [Throws] 1.44 + void setFloatValue(unsigned short unitType, 1.45 + float floatValue); 1.46 + [Throws] 1.47 + float getFloatValue(unsigned short unitType); 1.48 + [Throws] 1.49 + void setStringValue(unsigned short stringType, 1.50 + DOMString stringValue); 1.51 + [Throws] 1.52 + DOMString getStringValue(); 1.53 + [Throws] 1.54 + Counter getCounterValue(); 1.55 + [Throws] 1.56 + Rect getRectValue(); 1.57 + [Throws] 1.58 + RGBColor getRGBColorValue(); 1.59 +};