1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
23 * Daniel Glazman <glazman@netscape.com>
24 * Mats Palmgren <mats.palmgren@bredband.net>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
41 * temporary (expanded) representation of the property-value pairs
42 * within a CSS declaration using during parsing and mutation, and
43 * representation of complex values for CSS properties
46 #include "nsCSSStruct.h"
49 // --- nsCSSFont -----------------
51 nsCSSFont::nsCSSFont(void)
53 MOZ_COUNT_CTOR(nsCSSFont
);
56 nsCSSFont::~nsCSSFont(void)
58 MOZ_COUNT_DTOR(nsCSSFont
);
61 // --- nsCSSColor -----------------
63 nsCSSColor::nsCSSColor(void)
65 MOZ_COUNT_CTOR(nsCSSColor
);
68 nsCSSColor::~nsCSSColor(void)
70 MOZ_COUNT_DTOR(nsCSSColor
);
73 // --- nsCSSText -----------------
75 nsCSSText::nsCSSText(void)
77 MOZ_COUNT_CTOR(nsCSSText
);
80 nsCSSText::~nsCSSText(void)
82 MOZ_COUNT_DTOR(nsCSSText
);
85 // --- nsCSSCornerSizes -----------------
87 nsCSSCornerSizes::nsCSSCornerSizes(void)
89 MOZ_COUNT_CTOR(nsCSSCornerSizes
);
92 nsCSSCornerSizes::nsCSSCornerSizes(const nsCSSCornerSizes
& aCopy
)
93 : mTopLeft(aCopy
.mTopLeft
),
94 mTopRight(aCopy
.mTopRight
),
95 mBottomRight(aCopy
.mBottomRight
),
96 mBottomLeft(aCopy
.mBottomLeft
)
98 MOZ_COUNT_CTOR(nsCSSCornerSizes
);
101 nsCSSCornerSizes::~nsCSSCornerSizes()
103 MOZ_COUNT_DTOR(nsCSSCornerSizes
);
107 nsCSSCornerSizes::Reset()
109 NS_FOR_CSS_FULL_CORNERS(corner
) {
110 this->GetCorner(corner
).Reset();
114 PR_STATIC_ASSERT(NS_CORNER_TOP_LEFT
== 0 && NS_CORNER_TOP_RIGHT
== 1 && \
115 NS_CORNER_BOTTOM_RIGHT
== 2 && NS_CORNER_BOTTOM_LEFT
== 3);
117 /* static */ const nsCSSCornerSizes::corner_type
118 nsCSSCornerSizes::corners
[4] = {
119 &nsCSSCornerSizes::mTopLeft
,
120 &nsCSSCornerSizes::mTopRight
,
121 &nsCSSCornerSizes::mBottomRight
,
122 &nsCSSCornerSizes::mBottomLeft
,
125 // --- nsCSSDisplay -----------------
127 nsCSSDisplay::nsCSSDisplay(void)
129 MOZ_COUNT_CTOR(nsCSSDisplay
);
132 nsCSSDisplay::~nsCSSDisplay(void)
134 MOZ_COUNT_DTOR(nsCSSDisplay
);
137 // --- nsCSSMargin -----------------
139 nsCSSMargin::nsCSSMargin(void)
141 MOZ_COUNT_CTOR(nsCSSMargin
);
144 nsCSSMargin::~nsCSSMargin(void)
146 MOZ_COUNT_DTOR(nsCSSMargin
);
149 // --- nsCSSPosition -----------------
151 nsCSSPosition::nsCSSPosition(void)
153 MOZ_COUNT_CTOR(nsCSSPosition
);
156 nsCSSPosition::~nsCSSPosition(void)
158 MOZ_COUNT_DTOR(nsCSSPosition
);
161 // --- nsCSSList -----------------
163 nsCSSList::nsCSSList(void)
165 MOZ_COUNT_CTOR(nsCSSList
);
168 nsCSSList::~nsCSSList(void)
170 MOZ_COUNT_DTOR(nsCSSList
);
173 // --- nsCSSTable -----------------
175 nsCSSTable::nsCSSTable(void)
177 MOZ_COUNT_CTOR(nsCSSTable
);
180 nsCSSTable::~nsCSSTable(void)
182 MOZ_COUNT_DTOR(nsCSSTable
);
185 // --- nsCSSBreaks -----------------
187 nsCSSBreaks::nsCSSBreaks(void)
189 MOZ_COUNT_CTOR(nsCSSBreaks
);
192 nsCSSBreaks::~nsCSSBreaks(void)
194 MOZ_COUNT_DTOR(nsCSSBreaks
);
197 // --- nsCSSPage -----------------
199 nsCSSPage::nsCSSPage(void)
201 MOZ_COUNT_CTOR(nsCSSPage
);
204 nsCSSPage::~nsCSSPage(void)
206 MOZ_COUNT_DTOR(nsCSSPage
);
209 // --- nsCSSContent -----------------
211 nsCSSContent::nsCSSContent(void)
213 MOZ_COUNT_CTOR(nsCSSContent
);
216 nsCSSContent::~nsCSSContent(void)
218 MOZ_COUNT_DTOR(nsCSSContent
);
221 // --- nsCSSUserInterface -----------------
223 nsCSSUserInterface::nsCSSUserInterface(void)
225 MOZ_COUNT_CTOR(nsCSSUserInterface
);
228 nsCSSUserInterface::~nsCSSUserInterface(void)
230 MOZ_COUNT_DTOR(nsCSSUserInterface
);
233 // --- nsCSSAural -----------------
235 nsCSSAural::nsCSSAural(void)
237 MOZ_COUNT_CTOR(nsCSSAural
);
240 nsCSSAural::~nsCSSAural(void)
242 MOZ_COUNT_DTOR(nsCSSAural
);
245 // --- nsCSSXUL -----------------
247 nsCSSXUL::nsCSSXUL(void)
249 MOZ_COUNT_CTOR(nsCSSXUL
);
252 nsCSSXUL::~nsCSSXUL(void)
254 MOZ_COUNT_DTOR(nsCSSXUL
);
257 // --- nsCSSColumn -----------------
259 nsCSSColumn::nsCSSColumn(void)
261 MOZ_COUNT_CTOR(nsCSSColumn
);
264 nsCSSColumn::~nsCSSColumn(void)
266 MOZ_COUNT_DTOR(nsCSSColumn
);
269 // --- nsCSSSVG -----------------
271 nsCSSSVG::nsCSSSVG(void)
273 MOZ_COUNT_CTOR(nsCSSSVG
);
276 nsCSSSVG::~nsCSSSVG(void)
278 MOZ_COUNT_DTOR(nsCSSSVG
);