2002-07-09 08:10:10 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
// vim:cindent:ts=8:et:sw=4:
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2002
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
2003-01-02 02:53:20 +03:00
|
|
|
* L. David Baron <dbaron@dbaron.org> (original author)
|
2002-07-09 08:10:10 +04:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
2006-03-25 08:47:31 +03:00
|
|
|
/*
|
|
|
|
* list of structs that contain the data provided by nsStyleContext, the
|
|
|
|
* internal API for computed style data for an element
|
|
|
|
*/
|
|
|
|
|
2002-07-09 08:10:10 +04:00
|
|
|
/*
|
|
|
|
* This file is intended to be used by different parts of the code, with
|
|
|
|
* the STYLE_STRUCT macro (or the STYLE_STRUCT_INHERITED and
|
|
|
|
* STYLE_STRUCT_RESET pair of macros) defined in different ways.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef STYLE_STRUCT_INHERITED
|
2003-03-13 18:29:36 +03:00
|
|
|
#define STYLE_STRUCT_INHERITED(name, checkdata_cb, ctor_args) \
|
|
|
|
STYLE_STRUCT(name, checkdata_cb, ctor_args)
|
2002-07-09 08:10:10 +04:00
|
|
|
#define UNDEF_STYLE_STRUCT_INHERITED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef STYLE_STRUCT_RESET
|
2003-03-13 18:29:36 +03:00
|
|
|
#define STYLE_STRUCT_RESET(name, checkdata_cb, ctor_args) \
|
|
|
|
STYLE_STRUCT(name, checkdata_cb, ctor_args)
|
2002-07-09 08:10:10 +04:00
|
|
|
#define UNDEF_STYLE_STRUCT_RESET
|
|
|
|
#endif
|
|
|
|
|
2003-07-09 07:46:27 +04:00
|
|
|
#ifdef STYLE_STRUCT_TEST
|
|
|
|
#define STYLE_STRUCT_TEST_CODE(c) c
|
|
|
|
#else
|
|
|
|
#define STYLE_STRUCT_TEST_CODE(c)
|
|
|
|
#endif
|
|
|
|
|
2011-03-18 06:14:31 +03:00
|
|
|
// The inherited structs must be listed before the Reset structs.
|
|
|
|
// nsStyleStructID assumes this is the case, and callers other than
|
|
|
|
// nsStyleStructFwd.h that want the structs in id-order just define
|
|
|
|
// STYLE_STRUCT rather than including the file twice.
|
|
|
|
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE(if (STYLE_STRUCT_TEST < 8) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 4) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 2) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 0) {)
|
2003-03-13 18:29:36 +03:00
|
|
|
STYLE_STRUCT_INHERITED(Font, CheckFontCallback, (SSARG_PRESCONTEXT))
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2006-04-16 10:41:25 +04:00
|
|
|
STYLE_STRUCT_INHERITED(Color, CheckColorCallback, (SSARG_PRESCONTEXT))
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 2) {)
|
2003-03-13 18:29:36 +03:00
|
|
|
STYLE_STRUCT_INHERITED(List, nsnull, ())
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_INHERITED(Text, CheckTextCallback, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 6) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 4) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_INHERITED(Visibility, nsnull, (SSARG_PRESCONTEXT))
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_INHERITED(Quotes, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 6) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_INHERITED(UserInterface, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_INHERITED(TableBorder, nsnull, (SSARG_PRESCONTEXT))
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE(} else if (STYLE_STRUCT_TEST < 16) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 12) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 10) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 8) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_INHERITED(SVG, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Background, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 10) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Position, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(TextReset, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 14) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 12) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Display, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Content, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 14) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(UIReset, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Table, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
2004-06-17 15:57:37 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE(} else if (STYLE_STRUCT_TEST < 20) {)
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST < 18) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 16) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Margin, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Padding, nsnull, ())
|
2003-07-09 07:46:27 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
2003-07-12 00:42:59 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
Landing of SVG_20020806_BRANCH, Bug 182533. Refactoring of SVG backend, new GDI+ and Libart rendering
backends, text support on Windows (GDI+), rudimentary text support on Linux (libart/freetype2), presentation
attributes, lots of bug fixes (see bug 182533 for dependency list).
Not part of default build; code is #ifdef'ed out.
r=sicking, sr=jst for dom and htmlparser changes
r=bsmedberg, sr=tor for config changes
r=dbaron, sr=bzbarsky for content and layout changes
r=tor, sr=bzbarsky for gfx changes
2004-02-07 15:39:26 +03:00
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 18) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Border, nsnull, (SSARG_PRESCONTEXT))
|
Landing of SVG_20020806_BRANCH, Bug 182533. Refactoring of SVG backend, new GDI+ and Libart rendering
backends, text support on Windows (GDI+), rudimentary text support on Linux (libart/freetype2), presentation
attributes, lots of bug fixes (see bug 182533 for dependency list).
Not part of default build; code is #ifdef'ed out.
r=sicking, sr=jst for dom and htmlparser changes
r=bsmedberg, sr=tor for config changes
r=dbaron, sr=bzbarsky for content and layout changes
r=tor, sr=bzbarsky for gfx changes
2004-02-07 15:39:26 +03:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(Outline, nsnull, (SSARG_PRESCONTEXT))
|
Landing of SVG_20020806_BRANCH, Bug 182533. Refactoring of SVG backend, new GDI+ and Libart rendering
backends, text support on Windows (GDI+), rudimentary text support on Linux (libart/freetype2), presentation
attributes, lots of bug fixes (see bug 182533 for dependency list).
Not part of default build; code is #ifdef'ed out.
r=sicking, sr=jst for dom and htmlparser changes
r=bsmedberg, sr=tor for config changes
r=dbaron, sr=bzbarsky for content and layout changes
r=tor, sr=bzbarsky for gfx changes
2004-02-07 15:39:26 +03:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
2004-06-17 15:57:37 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
|
|
|
STYLE_STRUCT_TEST_CODE(} else if (STYLE_STRUCT_TEST < 22) {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( if (STYLE_STRUCT_TEST == 20) {)
|
2011-03-18 06:14:31 +03:00
|
|
|
STYLE_STRUCT_RESET(XUL, nsnull, ())
|
Landing of SVG_20020806_BRANCH, Bug 182533. Refactoring of SVG backend, new GDI+ and Libart rendering
backends, text support on Windows (GDI+), rudimentary text support on Linux (libart/freetype2), presentation
attributes, lots of bug fixes (see bug 182533 for dependency list).
Not part of default build; code is #ifdef'ed out.
r=sicking, sr=jst for dom and htmlparser changes
r=bsmedberg, sr=tor for config changes
r=dbaron, sr=bzbarsky for content and layout changes
r=tor, sr=bzbarsky for gfx changes
2004-02-07 15:39:26 +03:00
|
|
|
STYLE_STRUCT_TEST_CODE( } else {)
|
|
|
|
STYLE_STRUCT_RESET(SVGReset,nsnull, ())
|
|
|
|
STYLE_STRUCT_TEST_CODE( })
|
2004-06-17 15:57:37 +04:00
|
|
|
STYLE_STRUCT_TEST_CODE(} else {)
|
|
|
|
STYLE_STRUCT_TEST_CODE( NS_ASSERTION(STYLE_STRUCT_TEST == 22, "out of range");)
|
2011-03-18 06:14:32 +03:00
|
|
|
STYLE_STRUCT_RESET(Column, nsnull, (SSARG_PRESCONTEXT))
|
|
|
|
STYLE_STRUCT_TEST_CODE(})
|
Landing of SVG_20020806_BRANCH, Bug 182533. Refactoring of SVG backend, new GDI+ and Libart rendering
backends, text support on Windows (GDI+), rudimentary text support on Linux (libart/freetype2), presentation
attributes, lots of bug fixes (see bug 182533 for dependency list).
Not part of default build; code is #ifdef'ed out.
r=sicking, sr=jst for dom and htmlparser changes
r=bsmedberg, sr=tor for config changes
r=dbaron, sr=bzbarsky for content and layout changes
r=tor, sr=bzbarsky for gfx changes
2004-02-07 15:39:26 +03:00
|
|
|
|
2002-07-09 08:10:10 +04:00
|
|
|
#ifdef UNDEF_STYLE_STRUCT_INHERITED
|
|
|
|
#undef STYLE_STRUCT_INHERITED
|
|
|
|
#undef UNDEF_STYLE_STRUCT_INHERITED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef UNDEF_STYLE_STRUCT_RESET
|
|
|
|
#undef STYLE_STRUCT_RESET
|
|
|
|
#undef UNDEF_STYLE_STRUCT_RESET
|
|
|
|
#endif
|
2003-07-09 07:46:27 +04:00
|
|
|
|
|
|
|
#undef STYLE_STRUCT_TEST_CODE
|