2001-09-25 05:32:19 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2006-03-25 08:47:31 +03:00
|
|
|
/*
|
|
|
|
* methods for dealing with CSS properties and tables of the keyword
|
|
|
|
* values they accept
|
|
|
|
*/
|
|
|
|
|
2013-12-09 06:52:54 +04:00
|
|
|
#include "mozilla/ArrayUtils.h"
|
2011-10-11 09:50:08 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#include "nsCSSProps.h"
|
1999-07-18 04:32:32 +04:00
|
|
|
#include "nsCSSKeywords.h"
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
#include "nsLayoutUtils.h"
|
1999-07-18 04:32:32 +04:00
|
|
|
#include "nsStyleConsts.h"
|
2009-04-02 01:59:02 +04:00
|
|
|
#include "nsIWidget.h"
|
2001-12-18 01:51:39 +03:00
|
|
|
#include "nsThemeConstants.h" // For system widget appearance types
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2015-11-21 08:34:00 +03:00
|
|
|
#include "mozilla/dom/AnimationEffectReadOnlyBinding.h" // for PlaybackDirection
|
2011-09-09 06:27:12 +04:00
|
|
|
#include "mozilla/LookAndFeel.h" // for system colors
|
1999-09-10 09:54:46 +04:00
|
|
|
|
1999-07-18 04:32:32 +04:00
|
|
|
#include "nsString.h"
|
2000-08-22 10:57:32 +04:00
|
|
|
#include "nsStaticNameTable.h"
|
1999-07-18 04:32:32 +04:00
|
|
|
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "mozilla/Preferences.h"
|
|
|
|
|
2011-10-11 09:50:08 +04:00
|
|
|
using namespace mozilla;
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
typedef nsCSSProps::KTableEntry KTableEntry;
|
2014-02-05 15:10:44 +04:00
|
|
|
|
2015-10-03 04:12:09 +03:00
|
|
|
// By wrapping internal-only properties in this macro, we are not
|
|
|
|
// exposing them in the CSSOM. Since currently it is not necessary to
|
|
|
|
// allow accessing them in that way, it is easier and cheaper to just
|
|
|
|
// do this rather than exposing them conditionally.
|
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, ...) \
|
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_ENABLED_MASK) || pref_[0], \
|
|
|
|
"Internal-only property '" #name_ "' should be wrapped in " \
|
|
|
|
"#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL");
|
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#undef CSS_PROP
|
|
|
|
|
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, ...) \
|
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_ENABLED_IN_CHROME) || \
|
|
|
|
((flags_) & CSS_PROPERTY_ENABLED_IN_UA_SHEETS), \
|
|
|
|
"Property '" #name_ "' is enabled in chrome, so it should " \
|
|
|
|
"also be enabled in UA sheets");
|
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#undef CSS_PROP
|
|
|
|
|
2003-02-26 06:34:15 +03:00
|
|
|
// required to make the symbol external, so that TestCSSPropertyLookup.cpp can link with it
|
|
|
|
extern const char* const kCSSRawProperties[];
|
|
|
|
|
1999-07-18 04:32:32 +04:00
|
|
|
// define an array of all CSS properties
|
2013-03-13 20:58:39 +04:00
|
|
|
const char* const kCSSRawProperties[eCSSProperty_COUNT_with_aliases] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
|
|
|
stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
#name_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
1999-07-18 04:32:32 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
1999-07-18 04:32:32 +04:00
|
|
|
#undef CSS_PROP
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) #name_,
|
2003-06-08 02:14:42 +04:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
2013-03-13 20:58:39 +04:00
|
|
|
#define CSS_PROP_ALIAS(aliasname_, id_, method_, pref_) #aliasname_,
|
|
|
|
#include "nsCSSPropAliasList.h"
|
|
|
|
#undef CSS_PROP_ALIAS
|
2003-06-08 02:14:42 +04:00
|
|
|
};
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2011-09-09 06:27:12 +04:00
|
|
|
using namespace mozilla;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2013-11-15 06:42:57 +04:00
|
|
|
static int32_t gPropertyTableRefCount;
|
2000-08-22 10:57:32 +04:00
|
|
|
static nsStaticCaseInsensitiveNameTable* gPropertyTable;
|
2008-08-11 01:13:49 +04:00
|
|
|
static nsStaticCaseInsensitiveNameTable* gFontDescTable;
|
2014-06-12 05:10:00 +04:00
|
|
|
static nsStaticCaseInsensitiveNameTable* gCounterDescTable;
|
|
|
|
static nsStaticCaseInsensitiveNameTable* gPredefinedCounterStyleTable;
|
2016-08-17 04:37:48 +03:00
|
|
|
static nsDataHashtable<nsCStringHashKey,nsCSSPropertyID>* gPropertyIDLNameTable;
|
2008-08-11 01:13:49 +04:00
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
/* static */ nsCSSPropertyID *
|
2008-12-23 17:06:57 +03:00
|
|
|
nsCSSProps::gShorthandsContainingTable[eCSSProperty_COUNT_no_shorthands];
|
2016-08-17 04:37:48 +03:00
|
|
|
/* static */ nsCSSPropertyID* nsCSSProps::gShorthandsContainingPool = nullptr;
|
2008-12-23 17:06:57 +03:00
|
|
|
|
2008-08-11 01:13:49 +04:00
|
|
|
static const char* const kCSSRawFontDescs[] = {
|
2011-12-20 20:49:16 +04:00
|
|
|
#define CSS_FONT_DESC(name_, method_) #name_,
|
|
|
|
#include "nsCSSFontDescList.h"
|
|
|
|
#undef CSS_FONT_DESC
|
2008-08-11 01:13:49 +04:00
|
|
|
};
|
1999-07-18 04:32:32 +04:00
|
|
|
|
2014-06-12 05:10:00 +04:00
|
|
|
static const char* const kCSSRawCounterDescs[] = {
|
|
|
|
#define CSS_COUNTER_DESC(name_, method_) #name_,
|
|
|
|
#include "nsCSSCounterDescList.h"
|
|
|
|
#undef CSS_COUNTER_DESC
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char* const kCSSRawPredefinedCounterStyles[] = {
|
2015-03-03 00:32:58 +03:00
|
|
|
"none",
|
|
|
|
// 6 Simple Predefined Counter Styles
|
|
|
|
// 6.1 Numeric
|
|
|
|
"decimal", "decimal-leading-zero", "arabic-indic", "armenian",
|
|
|
|
"upper-armenian", "lower-armenian", "bengali", "cambodian", "khmer",
|
|
|
|
"cjk-decimal", "devanagari", "georgian", "gujarati", "gurmukhi", "hebrew",
|
|
|
|
"kannada", "lao", "malayalam", "mongolian", "myanmar", "oriya", "persian",
|
|
|
|
"lower-roman", "upper-roman", "tamil", "telugu", "thai", "tibetan",
|
|
|
|
// 6.2 Alphabetic
|
2014-06-12 05:10:00 +04:00
|
|
|
"lower-alpha", "lower-latin", "upper-alpha", "upper-latin",
|
2015-03-03 00:32:58 +03:00
|
|
|
"cjk-earthly-branch", "cjk-heavenly-stem", "lower-greek",
|
|
|
|
"hiragana", "hiragana-iroha", "katakana", "katakana-iroha",
|
|
|
|
// 6.3 Symbolic
|
2014-06-12 05:10:00 +04:00
|
|
|
"disc", "circle", "square", "disclosure-open", "disclosure-closed",
|
2015-03-03 00:32:58 +03:00
|
|
|
// 7 Complex Predefined Counter Styles
|
|
|
|
// 7.1 Longhand East Asian Counter Styles
|
|
|
|
// 7.1.1 Japanese
|
2014-06-12 05:10:00 +04:00
|
|
|
"japanese-informal", "japanese-formal",
|
2015-03-03 00:32:58 +03:00
|
|
|
// 7.1.2 Korean
|
2014-06-12 05:10:00 +04:00
|
|
|
"korean-hangul-formal", "korean-hanja-informal", "korean-hanja-formal",
|
2015-03-03 00:32:58 +03:00
|
|
|
// 7.1.3 Chinese
|
2014-06-12 05:10:00 +04:00
|
|
|
"simp-chinese-informal", "simp-chinese-formal",
|
|
|
|
"trad-chinese-informal", "trad-chinese-formal", "cjk-ideographic",
|
2015-03-03 00:32:58 +03:00
|
|
|
// 7.2 Ethiopic Numeric Counter Style
|
2014-06-12 05:10:00 +04:00
|
|
|
"ethiopic-numeric"
|
|
|
|
};
|
|
|
|
|
2008-12-23 17:06:57 +03:00
|
|
|
struct PropertyAndCount {
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID property;
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t count;
|
2008-12-23 17:06:57 +03:00
|
|
|
};
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
static int
|
2008-12-23 17:06:57 +03:00
|
|
|
SortPropertyAndCount(const void* s1, const void* s2, void *closure)
|
|
|
|
{
|
|
|
|
const PropertyAndCount *pc1 = static_cast<const PropertyAndCount*>(s1);
|
|
|
|
const PropertyAndCount *pc2 = static_cast<const PropertyAndCount*>(s2);
|
|
|
|
// Primary sort by count (lowest to highest)
|
|
|
|
if (pc1->count != pc2->count)
|
|
|
|
return pc1->count - pc2->count;
|
|
|
|
// Secondary sort by property index (highest to lowest)
|
|
|
|
return pc2->property - pc1->property;
|
|
|
|
}
|
|
|
|
|
2012-07-14 03:59:05 +04:00
|
|
|
// We need eCSSAliasCount so we can make gAliases nonzero size when there
|
|
|
|
// are no aliases.
|
|
|
|
enum {
|
2013-03-13 20:58:39 +04:00
|
|
|
eCSSAliasCount = eCSSProperty_COUNT_with_aliases - eCSSProperty_COUNT
|
2012-07-14 03:59:05 +04:00
|
|
|
};
|
|
|
|
|
2013-03-13 20:58:39 +04:00
|
|
|
// The names are in kCSSRawProperties.
|
2016-08-17 04:37:48 +03:00
|
|
|
static nsCSSPropertyID gAliases[eCSSAliasCount != 0 ? eCSSAliasCount : 1] = {
|
2012-07-14 03:59:05 +04:00
|
|
|
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
2013-03-13 20:58:39 +04:00
|
|
|
eCSSProperty_##propid_ ,
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropAliasList.h"
|
|
|
|
#undef CSS_PROP_ALIAS
|
|
|
|
};
|
|
|
|
|
2014-04-02 19:47:55 +04:00
|
|
|
nsStaticCaseInsensitiveNameTable*
|
2014-08-06 17:31:21 +04:00
|
|
|
CreateStaticTable(const char* const aRawTable[], int32_t aLength)
|
2014-04-02 19:47:55 +04:00
|
|
|
{
|
2015-05-06 07:13:53 +03:00
|
|
|
auto table = new nsStaticCaseInsensitiveNameTable(aRawTable, aLength);
|
2014-04-02 19:47:55 +04:00
|
|
|
#ifdef DEBUG
|
2015-05-06 07:13:53 +03:00
|
|
|
// Partially verify the entries.
|
|
|
|
for (int32_t index = 0; index < aLength; ++index) {
|
|
|
|
nsAutoCString temp(aRawTable[index]);
|
|
|
|
MOZ_ASSERT(-1 == temp.FindChar('_'),
|
|
|
|
"underscore char in case insensitive name table");
|
2014-04-02 19:47:55 +04:00
|
|
|
}
|
2015-05-06 07:13:53 +03:00
|
|
|
#endif
|
2014-04-02 19:47:55 +04:00
|
|
|
return table;
|
|
|
|
}
|
|
|
|
|
1999-07-18 04:32:32 +04:00
|
|
|
void
|
2009-10-13 10:35:57 +04:00
|
|
|
nsCSSProps::AddRefTable(void)
|
1998-04-14 00:24:54 +04:00
|
|
|
{
|
2013-11-15 06:42:57 +04:00
|
|
|
if (0 == gPropertyTableRefCount++) {
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(!gPropertyTable, "pre existing array!");
|
|
|
|
MOZ_ASSERT(!gFontDescTable, "pre existing array!");
|
|
|
|
MOZ_ASSERT(!gCounterDescTable, "pre existing array!");
|
|
|
|
MOZ_ASSERT(!gPredefinedCounterStyleTable, "pre existing array!");
|
2015-10-22 11:22:37 +03:00
|
|
|
MOZ_ASSERT(!gPropertyIDLNameTable, "pre existing array!");
|
2008-08-11 01:13:49 +04:00
|
|
|
|
2014-04-02 19:47:55 +04:00
|
|
|
gPropertyTable = CreateStaticTable(
|
|
|
|
kCSSRawProperties, eCSSProperty_COUNT_with_aliases);
|
|
|
|
gFontDescTable = CreateStaticTable(kCSSRawFontDescs, eCSSFontDesc_COUNT);
|
2014-06-12 05:10:00 +04:00
|
|
|
gCounterDescTable = CreateStaticTable(
|
|
|
|
kCSSRawCounterDescs, eCSSCounterDesc_COUNT);
|
|
|
|
gPredefinedCounterStyleTable = CreateStaticTable(
|
|
|
|
kCSSRawPredefinedCounterStyles,
|
|
|
|
ArrayLength(kCSSRawPredefinedCounterStyles));
|
2008-12-23 17:06:57 +03:00
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
gPropertyIDLNameTable = new nsDataHashtable<nsCStringHashKey,nsCSSPropertyID>;
|
|
|
|
for (nsCSSPropertyID p = nsCSSPropertyID(0);
|
2015-10-22 11:22:37 +03:00
|
|
|
size_t(p) < ArrayLength(kIDLNameTable);
|
2016-08-17 04:37:48 +03:00
|
|
|
p = nsCSSPropertyID(p + 1)) {
|
2015-10-22 11:22:37 +03:00
|
|
|
if (kIDLNameTable[p]) {
|
|
|
|
gPropertyIDLNameTable->Put(nsDependentCString(kIDLNameTable[p]), p);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-23 17:06:57 +03:00
|
|
|
BuildShorthandsContainingTable();
|
2012-07-14 03:59:05 +04:00
|
|
|
|
|
|
|
static bool prefObserversInited = false;
|
|
|
|
if (!prefObserversInited) {
|
|
|
|
prefObserversInited = true;
|
|
|
|
|
|
|
|
#define OBSERVE_PROP(pref_, id_) \
|
|
|
|
if (pref_[0]) { \
|
2013-03-13 20:58:39 +04:00
|
|
|
Preferences::AddBoolVarCache(&gPropertyEnabled[id_], \
|
2012-07-14 03:59:05 +04:00
|
|
|
pref_); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
2013-03-13 20:58:39 +04:00
|
|
|
OBSERVE_PROP(pref_, eCSSProperty_##id_)
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2012-07-14 03:59:05 +04:00
|
|
|
#undef CSS_PROP
|
|
|
|
|
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
|
2013-03-13 20:58:39 +04:00
|
|
|
OBSERVE_PROP(pref_, eCSSProperty_##id_)
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
|
|
|
|
|
|
|
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
2013-03-13 20:58:39 +04:00
|
|
|
OBSERVE_PROP(pref_, eCSSPropertyAlias_##aliasmethod_)
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropAliasList.h"
|
|
|
|
#undef CSS_PROP_ALIAS
|
2013-03-13 20:58:39 +04:00
|
|
|
|
|
|
|
#undef OBSERVE_PROP
|
2012-07-14 03:59:05 +04:00
|
|
|
}
|
2015-01-17 07:55:07 +03:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
{
|
2015-10-03 04:12:09 +03:00
|
|
|
// Assert that if CSS_PROPERTY_ENABLED_IN_UA_SHEETS or
|
|
|
|
// CSS_PROPERTY_ENABLED_IN_CHROME is used on a shorthand property
|
|
|
|
// that all of its component longhands also have the flag.
|
2015-01-17 07:55:07 +03:00
|
|
|
static uint32_t flagsToCheck[] = {
|
2015-10-03 04:12:09 +03:00
|
|
|
CSS_PROPERTY_ENABLED_IN_UA_SHEETS,
|
|
|
|
CSS_PROPERTY_ENABLED_IN_CHROME
|
2015-01-17 07:55:07 +03:00
|
|
|
};
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID shorthand = eCSSProperty_COUNT_no_shorthands;
|
2015-01-17 07:55:07 +03:00
|
|
|
shorthand < eCSSProperty_COUNT;
|
2016-08-17 04:37:48 +03:00
|
|
|
shorthand = nsCSSPropertyID(shorthand + 1)) {
|
2015-01-17 07:55:07 +03:00
|
|
|
for (size_t i = 0; i < ArrayLength(flagsToCheck); i++) {
|
|
|
|
uint32_t flag = flagsToCheck[i];
|
|
|
|
if (!nsCSSProps::PropHasFlags(shorthand, flag)) {
|
|
|
|
continue;
|
|
|
|
}
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID* p =
|
2015-01-17 07:55:07 +03:00
|
|
|
nsCSSProps::SubpropertyEntryFor(shorthand);
|
|
|
|
*p != eCSSProperty_UNKNOWN;
|
|
|
|
++p) {
|
|
|
|
MOZ_ASSERT(nsCSSProps::PropHasFlags(*p, flag),
|
|
|
|
"all subproperties of a property with a "
|
2015-10-03 04:12:09 +03:00
|
|
|
"CSS_PROPERTY_ENABLED_* flag must also have "
|
2015-01-17 07:55:07 +03:00
|
|
|
"the flag");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-09-22 08:58:20 +03:00
|
|
|
|
|
|
|
// Assert that CSS_PROPERTY_INTERNAL is used on properties in
|
|
|
|
// #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL sections of nsCSSPropList.h
|
|
|
|
// and on no others.
|
2016-08-17 04:37:48 +03:00
|
|
|
static nsCSSPropertyID nonInternalProperties[] = {
|
2015-09-22 08:58:20 +03:00
|
|
|
#define CSS_PROP(name_, id_, ...) eCSSProperty_##id_,
|
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, ...) eCSSProperty_##id_,
|
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#define CSS_PROP_LIST_EXCLUDE_INTERNAL
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LIST_EXCLUDE_INTERNAL
|
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
|
|
|
#undef CSS_PROP
|
|
|
|
};
|
|
|
|
MOZ_ASSERT(ArrayLength(nonInternalProperties) <= eCSSProperty_COUNT);
|
|
|
|
|
|
|
|
bool found[eCSSProperty_COUNT];
|
|
|
|
PodArrayZero(found);
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID p : nonInternalProperties) {
|
2015-09-22 08:58:20 +03:00
|
|
|
MOZ_ASSERT(!nsCSSProps::PropHasFlags(p, CSS_PROPERTY_INTERNAL),
|
|
|
|
"properties defined outside of #ifndef "
|
|
|
|
"CSS_PROP_LIST_EXCLUDE_INTERNAL sections must not have "
|
|
|
|
"the CSS_PROPERTY_INTERNAL flag");
|
|
|
|
found[p] = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (size_t i = 0; i < ArrayLength(found); ++i) {
|
|
|
|
if (!found[i]) {
|
2016-08-17 04:37:48 +03:00
|
|
|
auto p = static_cast<nsCSSPropertyID>(i);
|
2015-09-22 08:58:20 +03:00
|
|
|
MOZ_ASSERT(nsCSSProps::PropHasFlags(p, CSS_PROPERTY_INTERNAL),
|
|
|
|
"properties defined in #ifndef "
|
|
|
|
"CSS_PROP_LIST_EXCLUDE_INTERNAL sections must have "
|
|
|
|
"the CSS_PROPERTY_INTERNAL flag");
|
|
|
|
}
|
|
|
|
}
|
2015-01-17 07:55:07 +03:00
|
|
|
}
|
|
|
|
#endif
|
1998-04-14 00:24:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-12-23 17:06:57 +03:00
|
|
|
#undef DEBUG_SHORTHANDS_CONTAINING
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool
|
2009-10-13 10:35:57 +04:00
|
|
|
nsCSSProps::BuildShorthandsContainingTable()
|
2008-12-23 17:06:57 +03:00
|
|
|
{
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t occurrenceCounts[eCSSProperty_COUNT_no_shorthands];
|
2008-12-23 17:06:57 +03:00
|
|
|
memset(occurrenceCounts, 0, sizeof(occurrenceCounts));
|
|
|
|
PropertyAndCount subpropCounts[eCSSProperty_COUNT -
|
|
|
|
eCSSProperty_COUNT_no_shorthands];
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID shorthand = eCSSProperty_COUNT_no_shorthands;
|
2008-12-23 17:06:57 +03:00
|
|
|
shorthand < eCSSProperty_COUNT;
|
2016-08-17 04:37:48 +03:00
|
|
|
shorthand = nsCSSPropertyID(shorthand + 1)) {
|
2008-12-23 17:06:57 +03:00
|
|
|
#ifdef DEBUG_SHORTHANDS_CONTAINING
|
|
|
|
printf("Considering shorthand property '%s'.\n",
|
|
|
|
nsCSSProps::GetStringValue(shorthand).get());
|
|
|
|
#endif
|
|
|
|
PropertyAndCount &subpropCountsEntry =
|
|
|
|
subpropCounts[shorthand - eCSSProperty_COUNT_no_shorthands];
|
|
|
|
subpropCountsEntry.property = shorthand;
|
|
|
|
subpropCountsEntry.count = 0;
|
2012-09-18 22:37:14 +04:00
|
|
|
if (nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS)) {
|
|
|
|
// Don't put shorthands that are acting as aliases in the
|
|
|
|
// shorthands-containing lists.
|
|
|
|
continue;
|
|
|
|
}
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID* subprops = SubpropertyEntryFor(shorthand);
|
2008-12-23 17:06:57 +03:00
|
|
|
*subprops != eCSSProperty_UNKNOWN;
|
|
|
|
++subprops) {
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(0 <= *subprops && *subprops < eCSSProperty_COUNT_no_shorthands,
|
|
|
|
"subproperty must be a longhand");
|
2008-12-23 17:06:57 +03:00
|
|
|
++occurrenceCounts[*subprops];
|
|
|
|
++subpropCountsEntry.count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t poolEntries = 0;
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID longhand = nsCSSPropertyID(0);
|
2008-12-23 17:06:57 +03:00
|
|
|
longhand < eCSSProperty_COUNT_no_shorthands;
|
2016-08-17 04:37:48 +03:00
|
|
|
longhand = nsCSSPropertyID(longhand + 1)) {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t count = occurrenceCounts[longhand];
|
2008-12-23 17:06:57 +03:00
|
|
|
if (count > 0)
|
|
|
|
// leave room for terminator
|
|
|
|
poolEntries += count + 1;
|
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
gShorthandsContainingPool = new nsCSSPropertyID[poolEntries];
|
2008-12-23 17:06:57 +03:00
|
|
|
if (!gShorthandsContainingPool)
|
2011-10-17 18:59:28 +04:00
|
|
|
return false;
|
2008-12-23 17:06:57 +03:00
|
|
|
|
|
|
|
// Initialize all entries to point to their null-terminator.
|
|
|
|
{
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID *poolCursor = gShorthandsContainingPool - 1;
|
|
|
|
nsCSSPropertyID *lastTerminator =
|
2008-12-23 17:06:57 +03:00
|
|
|
gShorthandsContainingPool + poolEntries - 1;
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID longhand = nsCSSPropertyID(0);
|
2008-12-23 17:06:57 +03:00
|
|
|
longhand < eCSSProperty_COUNT_no_shorthands;
|
2016-08-17 04:37:48 +03:00
|
|
|
longhand = nsCSSPropertyID(longhand + 1)) {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t count = occurrenceCounts[longhand];
|
2008-12-23 17:06:57 +03:00
|
|
|
if (count > 0) {
|
|
|
|
poolCursor += count + 1;
|
|
|
|
gShorthandsContainingTable[longhand] = poolCursor;
|
|
|
|
*poolCursor = eCSSProperty_UNKNOWN;
|
|
|
|
} else {
|
|
|
|
gShorthandsContainingTable[longhand] = lastTerminator;
|
|
|
|
}
|
|
|
|
}
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(poolCursor == lastTerminator, "miscalculation");
|
2008-12-23 17:06:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Sort with lowest count at the start and highest at the end, and
|
|
|
|
// within counts sort in reverse property index order.
|
2011-10-11 09:50:08 +04:00
|
|
|
NS_QuickSort(&subpropCounts, ArrayLength(subpropCounts),
|
2012-07-30 18:20:58 +04:00
|
|
|
sizeof(subpropCounts[0]), SortPropertyAndCount, nullptr);
|
2008-12-23 17:06:57 +03:00
|
|
|
|
|
|
|
// Fill in all the entries in gShorthandsContainingTable
|
|
|
|
for (const PropertyAndCount *shorthandAndCount = subpropCounts,
|
2011-10-11 09:50:08 +04:00
|
|
|
*shorthandAndCountEnd = ArrayEnd(subpropCounts);
|
2008-12-23 17:06:57 +03:00
|
|
|
shorthandAndCount < shorthandAndCountEnd;
|
|
|
|
++shorthandAndCount) {
|
|
|
|
#ifdef DEBUG_SHORTHANDS_CONTAINING
|
|
|
|
printf("Entering %u subprops for '%s'.\n",
|
|
|
|
shorthandAndCount->count,
|
|
|
|
nsCSSProps::GetStringValue(shorthandAndCount->property).get());
|
|
|
|
#endif
|
2012-09-18 22:37:14 +04:00
|
|
|
if (nsCSSProps::PropHasFlags(shorthandAndCount->property,
|
|
|
|
CSS_PROPERTY_IS_ALIAS)) {
|
|
|
|
// Don't put shorthands that are acting as aliases in the
|
|
|
|
// shorthands-containing lists.
|
|
|
|
continue;
|
|
|
|
}
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID* subprops =
|
2008-12-23 17:06:57 +03:00
|
|
|
SubpropertyEntryFor(shorthandAndCount->property);
|
|
|
|
*subprops != eCSSProperty_UNKNOWN;
|
|
|
|
++subprops) {
|
|
|
|
*(--gShorthandsContainingTable[*subprops]) = shorthandAndCount->property;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef DEBUG_SHORTHANDS_CONTAINING
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID longhand = nsCSSPropertyID(0);
|
2008-12-23 17:06:57 +03:00
|
|
|
longhand < eCSSProperty_COUNT_no_shorthands;
|
2016-08-17 04:37:48 +03:00
|
|
|
longhand = nsCSSPropertyID(longhand + 1)) {
|
2008-12-23 17:06:57 +03:00
|
|
|
printf("Property %s is in %d shorthands.\n",
|
|
|
|
nsCSSProps::GetStringValue(longhand).get(),
|
|
|
|
occurrenceCounts[longhand]);
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID *shorthands = ShorthandsContaining(longhand);
|
2008-12-23 17:06:57 +03:00
|
|
|
*shorthands != eCSSProperty_UNKNOWN;
|
|
|
|
++shorthands) {
|
|
|
|
printf(" %s\n", nsCSSProps::GetStringValue(*shorthands).get());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
// Verify that all values that should be are present.
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID shorthand = eCSSProperty_COUNT_no_shorthands;
|
2008-12-23 17:06:57 +03:00
|
|
|
shorthand < eCSSProperty_COUNT;
|
2016-08-17 04:37:48 +03:00
|
|
|
shorthand = nsCSSPropertyID(shorthand + 1)) {
|
2012-09-18 22:37:14 +04:00
|
|
|
if (nsCSSProps::PropHasFlags(shorthand, CSS_PROPERTY_IS_ALIAS)) {
|
|
|
|
// Don't put shorthands that are acting as aliases in the
|
|
|
|
// shorthands-containing lists.
|
|
|
|
continue;
|
|
|
|
}
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID* subprops = SubpropertyEntryFor(shorthand);
|
2008-12-23 17:06:57 +03:00
|
|
|
*subprops != eCSSProperty_UNKNOWN;
|
|
|
|
++subprops) {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t count = 0;
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID *shcont = ShorthandsContaining(*subprops);
|
2008-12-23 17:06:57 +03:00
|
|
|
*shcont != eCSSProperty_UNKNOWN;
|
|
|
|
++shcont) {
|
|
|
|
if (*shcont == shorthand)
|
|
|
|
++count;
|
|
|
|
}
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(count == 1,
|
|
|
|
"subproperty of shorthand should have shorthand"
|
|
|
|
" in its ShorthandsContaining() table");
|
2008-12-23 17:06:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verify that there are no extra values
|
2016-08-17 04:37:48 +03:00
|
|
|
for (nsCSSPropertyID longhand = nsCSSPropertyID(0);
|
2008-12-23 17:06:57 +03:00
|
|
|
longhand < eCSSProperty_COUNT_no_shorthands;
|
2016-08-17 04:37:48 +03:00
|
|
|
longhand = nsCSSPropertyID(longhand + 1)) {
|
|
|
|
for (const nsCSSPropertyID *shorthands = ShorthandsContaining(longhand);
|
2008-12-23 17:06:57 +03:00
|
|
|
*shorthands != eCSSProperty_UNKNOWN;
|
|
|
|
++shorthands) {
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t count = 0;
|
2016-08-17 04:37:48 +03:00
|
|
|
for (const nsCSSPropertyID* subprops = SubpropertyEntryFor(*shorthands);
|
2008-12-23 17:06:57 +03:00
|
|
|
*subprops != eCSSProperty_UNKNOWN;
|
|
|
|
++subprops) {
|
|
|
|
if (*subprops == longhand)
|
|
|
|
++count;
|
|
|
|
}
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(count == 1,
|
|
|
|
"longhand should be in subproperty table of "
|
|
|
|
"property in its ShorthandsContaining() table");
|
2008-12-23 17:06:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-10-17 18:59:28 +04:00
|
|
|
return true;
|
2008-12-23 17:06:57 +03:00
|
|
|
}
|
|
|
|
|
1999-07-18 04:32:32 +04:00
|
|
|
void
|
2009-10-13 10:35:57 +04:00
|
|
|
nsCSSProps::ReleaseTable(void)
|
1999-07-18 04:32:32 +04:00
|
|
|
{
|
2013-11-15 06:42:57 +04:00
|
|
|
if (0 == --gPropertyTableRefCount) {
|
2008-12-23 17:06:57 +03:00
|
|
|
delete gPropertyTable;
|
2012-07-30 18:20:58 +04:00
|
|
|
gPropertyTable = nullptr;
|
2008-12-23 17:06:57 +03:00
|
|
|
|
|
|
|
delete gFontDescTable;
|
2012-07-30 18:20:58 +04:00
|
|
|
gFontDescTable = nullptr;
|
2008-12-23 17:06:57 +03:00
|
|
|
|
2014-06-12 05:10:00 +04:00
|
|
|
delete gCounterDescTable;
|
|
|
|
gCounterDescTable = nullptr;
|
|
|
|
|
|
|
|
delete gPredefinedCounterStyleTable;
|
|
|
|
gPredefinedCounterStyleTable = nullptr;
|
|
|
|
|
2015-10-22 11:22:37 +03:00
|
|
|
delete gPropertyIDLNameTable;
|
|
|
|
gPropertyIDLNameTable = nullptr;
|
|
|
|
|
2009-01-23 04:28:14 +03:00
|
|
|
delete [] gShorthandsContainingPool;
|
2012-07-30 18:20:58 +04:00
|
|
|
gShorthandsContainingPool = nullptr;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-12 06:09:43 +04:00
|
|
|
/* static */ bool
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSProps::IsInherited(nsCSSPropertyID aProperty)
|
2013-12-12 06:09:43 +04:00
|
|
|
{
|
|
|
|
MOZ_ASSERT(!IsShorthand(aProperty));
|
|
|
|
|
|
|
|
nsStyleStructID sid = kSIDTable[aProperty];
|
|
|
|
return nsCachedStyleData::IsInherited(sid);
|
|
|
|
}
|
|
|
|
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
/* static */ bool
|
|
|
|
nsCSSProps::IsCustomPropertyName(const nsACString& aProperty)
|
|
|
|
{
|
2014-04-02 07:32:16 +04:00
|
|
|
// Custom properties don't need to have a character after the "--" prefix.
|
|
|
|
return aProperty.Length() >= CSS_CUSTOM_NAME_PREFIX_LENGTH &&
|
|
|
|
StringBeginsWith(aProperty, NS_LITERAL_CSTRING("--"));
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* static */ bool
|
|
|
|
nsCSSProps::IsCustomPropertyName(const nsAString& aProperty)
|
|
|
|
{
|
2014-04-02 07:32:16 +04:00
|
|
|
return aProperty.Length() >= CSS_CUSTOM_NAME_PREFIX_LENGTH &&
|
|
|
|
StringBeginsWith(aProperty, NS_LITERAL_STRING("--"));
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID
|
2012-07-14 03:59:05 +04:00
|
|
|
nsCSSProps::LookupProperty(const nsACString& aProperty,
|
|
|
|
EnabledState aEnabled)
|
1999-07-18 04:32:32 +04:00
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gPropertyTable, "no lookup table, needs addref");
|
2004-02-24 09:48:25 +03:00
|
|
|
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
if (nsLayoutUtils::CSSVariablesEnabled() &&
|
|
|
|
IsCustomPropertyName(aProperty)) {
|
|
|
|
return eCSSPropertyExtra_variable;
|
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID res = nsCSSPropertyID(gPropertyTable->Lookup(aProperty));
|
2014-02-22 05:18:23 +04:00
|
|
|
if (MOZ_LIKELY(res < eCSSProperty_COUNT)) {
|
|
|
|
if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) {
|
2013-03-13 20:58:39 +04:00
|
|
|
res = eCSSProperty_UNKNOWN;
|
2010-09-09 19:21:48 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
return res;
|
2010-09-09 19:21:48 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
MOZ_ASSERT(eCSSAliasCount != 0,
|
|
|
|
"'res' must be an alias at this point so we better have some!");
|
2016-05-10 11:44:05 +03:00
|
|
|
// We intentionally don't support CSSEnabledState::eInUASheets or
|
|
|
|
// CSSEnabledState::eInChrome for aliases yet because it's unlikely
|
|
|
|
// there will be a need for it.
|
|
|
|
if (IsEnabled(res) || aEnabled == CSSEnabledState::eIgnoreEnabledState) {
|
2014-02-22 05:18:23 +04:00
|
|
|
res = gAliases[res - eCSSProperty_COUNT];
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(0 <= res && res < eCSSProperty_COUNT,
|
|
|
|
"aliases must not point to other aliases");
|
2016-05-10 11:44:05 +03:00
|
|
|
if (IsEnabled(res) || aEnabled == CSSEnabledState::eIgnoreEnabledState) {
|
2014-02-22 05:18:23 +04:00
|
|
|
return res;
|
|
|
|
}
|
2012-07-14 03:59:05 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
return eCSSProperty_UNKNOWN;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID
|
2012-07-14 03:59:05 +04:00
|
|
|
nsCSSProps::LookupProperty(const nsAString& aProperty, EnabledState aEnabled)
|
2005-03-19 03:48:10 +03:00
|
|
|
{
|
Bug 773296 - Part 2: Parse CSS variable declarations and store them on Declaration objects. p=ebassi,heycam r=dbaron
Patch co-authored by Emmanuele Bassi <ebassi@gmail.com>
This defines a CSSVariableDeclarations class that holds a set of
variable declarations. This is at the specified value stage, so values
can either be 'initial', 'inherit' or a token stream (which is what you
normally have). The variables are stored in a hash table. Although
it's a bit of a hack, we store 'initial' and 'inherit' using special
string values that can't be valid token streams (we use "!" and ";").
Declaration objects now can have two CSSVariableDeclarations objects
on them, to store normal and !important variable declarations. So that
we keep preserving the order of declarations on the object, we inflate
mOrder to store uint32_ts, where values from eCSSProperty_COUNT onwards
represent custom properties. mVariableOrder stores the names of the
variables corresponding to those entries in mOrder.
We also add a new nsCSSProperty value, eCSSPropertyExtra_variable, which
is used to represent any custom property name.
nsCSSProps::LookupProperty can return this value.
The changes to nsCSSParser are straightforward. Custom properties
are parsed and checked for syntactic validity (e.g. "var(a,)" being
invalid) and stored on the Declaration. We use nsCSSScanner's
recording ability to grab the unparsed CSS string corresponding to
the variable's value.
2013-12-12 06:09:40 +04:00
|
|
|
if (nsLayoutUtils::CSSVariablesEnabled() &&
|
|
|
|
IsCustomPropertyName(aProperty)) {
|
|
|
|
return eCSSPropertyExtra_variable;
|
|
|
|
}
|
|
|
|
|
2003-01-17 07:55:10 +03:00
|
|
|
// This is faster than converting and calling
|
|
|
|
// LookupProperty(nsACString&). The table will do its own
|
|
|
|
// converting and avoid a PromiseFlatCString() call.
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gPropertyTable, "no lookup table, needs addref");
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID res = nsCSSPropertyID(gPropertyTable->Lookup(aProperty));
|
2014-02-22 05:18:23 +04:00
|
|
|
if (MOZ_LIKELY(res < eCSSProperty_COUNT)) {
|
|
|
|
if (res != eCSSProperty_UNKNOWN && !IsEnabled(res, aEnabled)) {
|
2013-03-13 20:58:39 +04:00
|
|
|
res = eCSSProperty_UNKNOWN;
|
2010-09-09 19:21:48 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
return res;
|
2010-09-09 19:21:48 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
MOZ_ASSERT(eCSSAliasCount != 0,
|
|
|
|
"'res' must be an alias at this point so we better have some!");
|
2016-05-10 11:44:05 +03:00
|
|
|
// We intentionally don't support CSSEnabledState::eInUASheets or
|
|
|
|
// CSSEnabledState::eInChrome for aliases yet because it's unlikely
|
|
|
|
// there will be a need for it.
|
|
|
|
if (IsEnabled(res) || aEnabled == CSSEnabledState::eIgnoreEnabledState) {
|
2014-02-22 05:18:23 +04:00
|
|
|
res = gAliases[res - eCSSProperty_COUNT];
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(0 <= res && res < eCSSProperty_COUNT,
|
|
|
|
"aliases must not point to other aliases");
|
2016-05-10 11:44:05 +03:00
|
|
|
if (IsEnabled(res) || aEnabled == CSSEnabledState::eIgnoreEnabledState) {
|
2014-02-22 05:18:23 +04:00
|
|
|
return res;
|
|
|
|
}
|
2012-07-14 03:59:05 +04:00
|
|
|
}
|
2014-02-22 05:18:23 +04:00
|
|
|
return eCSSProperty_UNKNOWN;
|
2000-03-12 13:07:57 +03:00
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID
|
2015-10-22 11:22:37 +03:00
|
|
|
nsCSSProps::LookupPropertyByIDLName(const nsACString& aPropertyIDLName,
|
|
|
|
EnabledState aEnabled)
|
|
|
|
{
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID res;
|
2015-10-22 11:22:37 +03:00
|
|
|
if (!gPropertyIDLNameTable->Get(aPropertyIDLName, &res)) {
|
|
|
|
return eCSSProperty_UNKNOWN;
|
|
|
|
}
|
|
|
|
MOZ_ASSERT(res < eCSSProperty_COUNT);
|
|
|
|
if (!IsEnabled(res, aEnabled)) {
|
|
|
|
return eCSSProperty_UNKNOWN;
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSPropertyID
|
2015-10-22 11:22:37 +03:00
|
|
|
nsCSSProps::LookupPropertyByIDLName(const nsAString& aPropertyIDLName,
|
|
|
|
EnabledState aEnabled)
|
|
|
|
{
|
|
|
|
MOZ_ASSERT(gPropertyIDLNameTable, "no lookup table, needs addref");
|
|
|
|
return LookupPropertyByIDLName(NS_ConvertUTF16toUTF8(aPropertyIDLName),
|
|
|
|
aEnabled);
|
|
|
|
}
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
nsCSSFontDesc
|
2008-08-11 01:13:49 +04:00
|
|
|
nsCSSProps::LookupFontDesc(const nsACString& aFontDesc)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gFontDescTable, "no lookup table, needs addref");
|
2016-01-07 08:02:58 +03:00
|
|
|
nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
|
|
|
|
|
|
|
|
if (which == eCSSFontDesc_Display &&
|
|
|
|
!Preferences::GetBool("layout.css.font-display.enabled")) {
|
|
|
|
which = eCSSFontDesc_UNKNOWN;
|
|
|
|
} else if (which == eCSSFontDesc_UNKNOWN) {
|
|
|
|
// check for unprefixed font-feature-settings/font-language-override
|
|
|
|
nsAutoCString prefixedProp;
|
|
|
|
prefixedProp.AppendLiteral("-moz-");
|
|
|
|
prefixedProp.Append(aFontDesc);
|
|
|
|
which = nsCSSFontDesc(gFontDescTable->Lookup(prefixedProp));
|
|
|
|
}
|
|
|
|
return which;
|
2008-08-11 01:13:49 +04:00
|
|
|
}
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
nsCSSFontDesc
|
2008-08-11 01:13:49 +04:00
|
|
|
nsCSSProps::LookupFontDesc(const nsAString& aFontDesc)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gFontDescTable, "no lookup table, needs addref");
|
2013-05-20 06:59:20 +04:00
|
|
|
nsCSSFontDesc which = nsCSSFontDesc(gFontDescTable->Lookup(aFontDesc));
|
|
|
|
|
2016-01-07 08:02:58 +03:00
|
|
|
if (which == eCSSFontDesc_Display &&
|
|
|
|
!Preferences::GetBool("layout.css.font-display.enabled")) {
|
|
|
|
which = eCSSFontDesc_UNKNOWN;
|
|
|
|
} else if (which == eCSSFontDesc_UNKNOWN) {
|
|
|
|
// check for unprefixed font-feature-settings/font-language-override
|
2013-05-20 06:59:20 +04:00
|
|
|
nsAutoString prefixedProp;
|
|
|
|
prefixedProp.AppendLiteral("-moz-");
|
|
|
|
prefixedProp.Append(aFontDesc);
|
|
|
|
which = nsCSSFontDesc(gFontDescTable->Lookup(prefixedProp));
|
|
|
|
}
|
|
|
|
return which;
|
2008-08-11 01:13:49 +04:00
|
|
|
}
|
|
|
|
|
2014-06-12 05:10:00 +04:00
|
|
|
nsCSSCounterDesc
|
|
|
|
nsCSSProps::LookupCounterDesc(const nsAString& aProperty)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gCounterDescTable, "no lookup table, needs addref");
|
2014-06-12 05:10:00 +04:00
|
|
|
return nsCSSCounterDesc(gCounterDescTable->Lookup(aProperty));
|
|
|
|
}
|
|
|
|
|
|
|
|
nsCSSCounterDesc
|
|
|
|
nsCSSProps::LookupCounterDesc(const nsACString& aProperty)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gCounterDescTable, "no lookup table, needs addref");
|
2014-06-12 05:10:00 +04:00
|
|
|
return nsCSSCounterDesc(gCounterDescTable->Lookup(aProperty));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
nsCSSProps::IsPredefinedCounterStyle(const nsAString& aStyle)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gPredefinedCounterStyleTable,
|
|
|
|
"no lookup table, needs addref");
|
2014-06-12 05:10:00 +04:00
|
|
|
return gPredefinedCounterStyleTable->Lookup(aStyle) !=
|
|
|
|
nsStaticCaseInsensitiveNameTable::NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
nsCSSProps::IsPredefinedCounterStyle(const nsACString& aStyle)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gPredefinedCounterStyleTable,
|
|
|
|
"no lookup table, needs addref");
|
2014-06-12 05:10:00 +04:00
|
|
|
return gPredefinedCounterStyleTable->Lookup(aStyle) !=
|
|
|
|
nsStaticCaseInsensitiveNameTable::NOT_FOUND;
|
|
|
|
}
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
const nsAFlatCString&
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSProps::GetStringValue(nsCSSPropertyID aProperty)
|
1999-07-18 04:32:32 +04:00
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gPropertyTable, "no lookup table, needs addref");
|
2000-08-22 10:57:32 +04:00
|
|
|
if (gPropertyTable) {
|
2012-08-22 19:56:38 +04:00
|
|
|
return gPropertyTable->GetStringValue(int32_t(aProperty));
|
2000-08-22 10:57:32 +04:00
|
|
|
} else {
|
2001-11-28 00:13:53 +03:00
|
|
|
static nsDependentCString sNullStr("");
|
2000-08-22 10:57:32 +04:00
|
|
|
return sNullStr;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
const nsAFlatCString&
|
2008-08-11 01:13:49 +04:00
|
|
|
nsCSSProps::GetStringValue(nsCSSFontDesc aFontDescID)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gFontDescTable, "no lookup table, needs addref");
|
2008-08-11 01:13:49 +04:00
|
|
|
if (gFontDescTable) {
|
2012-08-22 19:56:38 +04:00
|
|
|
return gFontDescTable->GetStringValue(int32_t(aFontDescID));
|
2008-08-11 01:13:49 +04:00
|
|
|
} else {
|
|
|
|
static nsDependentCString sNullStr("");
|
|
|
|
return sNullStr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-12 05:10:00 +04:00
|
|
|
const nsAFlatCString&
|
|
|
|
nsCSSProps::GetStringValue(nsCSSCounterDesc aCounterDesc)
|
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(gCounterDescTable, "no lookup table, needs addref");
|
2014-06-12 05:10:00 +04:00
|
|
|
if (gCounterDescTable) {
|
|
|
|
return gCounterDescTable->GetStringValue(int32_t(aCounterDesc));
|
|
|
|
} else {
|
|
|
|
static nsDependentCString sNullStr("");
|
|
|
|
return sNullStr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-08-22 10:57:32 +04:00
|
|
|
/***************************************************************************/
|
1999-07-18 04:32:32 +04:00
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAnimationDirectionKTable[] = {
|
2015-11-21 08:34:00 +03:00
|
|
|
{ eCSSKeyword_normal, static_cast<uint32_t>(dom::PlaybackDirection::Normal) },
|
|
|
|
{ eCSSKeyword_reverse, static_cast<uint32_t>(dom::PlaybackDirection::Reverse) },
|
|
|
|
{ eCSSKeyword_alternate, static_cast<uint32_t>(dom::PlaybackDirection::Alternate) },
|
|
|
|
{ eCSSKeyword_alternate_reverse, static_cast<uint32_t>(dom::PlaybackDirection::Alternate_reverse) },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-04-12 10:18:42 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAnimationFillModeKTable[] = {
|
2015-11-21 08:34:00 +03:00
|
|
|
{ eCSSKeyword_none, static_cast<uint32_t>(dom::FillMode::None) },
|
|
|
|
{ eCSSKeyword_forwards, static_cast<uint32_t>(dom::FillMode::Forwards) },
|
|
|
|
{ eCSSKeyword_backwards, static_cast<uint32_t>(dom::FillMode::Backwards) },
|
|
|
|
{ eCSSKeyword_both, static_cast<uint32_t>(dom::FillMode::Both) },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-04-12 10:18:42 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAnimationIterationCountKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_infinite, NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-04-12 10:18:42 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAnimationPlayStateKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_running, NS_STYLE_ANIMATION_PLAY_STATE_RUNNING },
|
|
|
|
{ eCSSKeyword_paused, NS_STYLE_ANIMATION_PLAY_STATE_PAUSED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-04-12 10:18:42 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAppearanceKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_THEME_NONE },
|
|
|
|
{ eCSSKeyword_button, NS_THEME_BUTTON },
|
|
|
|
{ eCSSKeyword_radio, NS_THEME_RADIO },
|
|
|
|
{ eCSSKeyword_checkbox, NS_THEME_CHECKBOX },
|
|
|
|
{ eCSSKeyword_button_bevel, NS_THEME_BUTTON_BEVEL },
|
|
|
|
{ eCSSKeyword_toolbox, NS_THEME_TOOLBOX },
|
|
|
|
{ eCSSKeyword_toolbar, NS_THEME_TOOLBAR },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_toolbarbutton, NS_THEME_TOOLBARBUTTON },
|
|
|
|
{ eCSSKeyword_toolbargripper, NS_THEME_TOOLBARGRIPPER },
|
|
|
|
{ eCSSKeyword_dualbutton, NS_THEME_DUALBUTTON },
|
|
|
|
{ eCSSKeyword_toolbarbutton_dropdown, NS_THEME_TOOLBARBUTTON_DROPDOWN },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_button_arrow_up, NS_THEME_BUTTON_ARROW_UP },
|
|
|
|
{ eCSSKeyword_button_arrow_down, NS_THEME_BUTTON_ARROW_DOWN },
|
|
|
|
{ eCSSKeyword_button_arrow_next, NS_THEME_BUTTON_ARROW_NEXT },
|
|
|
|
{ eCSSKeyword_button_arrow_previous, NS_THEME_BUTTON_ARROW_PREVIOUS },
|
|
|
|
{ eCSSKeyword_meterbar, NS_THEME_METERBAR },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_meterchunk, NS_THEME_METERCHUNK },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_number_input, NS_THEME_NUMBER_INPUT },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_separator, NS_THEME_SEPARATOR },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_splitter, NS_THEME_SPLITTER },
|
|
|
|
{ eCSSKeyword_statusbar, NS_THEME_STATUSBAR },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_statusbarpanel, NS_THEME_STATUSBARPANEL },
|
2016-05-19 11:58:00 +03:00
|
|
|
{ eCSSKeyword_resizerpanel, NS_THEME_RESIZERPANEL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_resizer, NS_THEME_RESIZER },
|
|
|
|
{ eCSSKeyword_listbox, NS_THEME_LISTBOX },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_listitem, NS_THEME_LISTITEM },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_treeview, NS_THEME_TREEVIEW },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_treeitem, NS_THEME_TREEITEM },
|
|
|
|
{ eCSSKeyword_treetwisty, NS_THEME_TREETWISTY },
|
|
|
|
{ eCSSKeyword_treetwistyopen, NS_THEME_TREETWISTYOPEN },
|
|
|
|
{ eCSSKeyword_treeline, NS_THEME_TREELINE },
|
|
|
|
{ eCSSKeyword_treeheader, NS_THEME_TREEHEADER },
|
|
|
|
{ eCSSKeyword_treeheadercell, NS_THEME_TREEHEADERCELL },
|
|
|
|
{ eCSSKeyword_treeheadersortarrow, NS_THEME_TREEHEADERSORTARROW },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_progressbar, NS_THEME_PROGRESSBAR },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_progresschunk, NS_THEME_PROGRESSCHUNK },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_progressbar_vertical, NS_THEME_PROGRESSBAR_VERTICAL },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_progresschunk_vertical, NS_THEME_PROGRESSCHUNK_VERTICAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_tab, NS_THEME_TAB },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_tabpanels, NS_THEME_TABPANELS },
|
|
|
|
{ eCSSKeyword_tabpanel, NS_THEME_TABPANEL },
|
|
|
|
{ eCSSKeyword_tab_scroll_arrow_back, NS_THEME_TAB_SCROLL_ARROW_BACK },
|
|
|
|
{ eCSSKeyword_tab_scroll_arrow_forward, NS_THEME_TAB_SCROLL_ARROW_FORWARD },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_tooltip, NS_THEME_TOOLTIP },
|
|
|
|
{ eCSSKeyword_spinner, NS_THEME_SPINNER },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_spinner_upbutton, NS_THEME_SPINNER_UPBUTTON },
|
|
|
|
{ eCSSKeyword_spinner_downbutton, NS_THEME_SPINNER_DOWNBUTTON },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_spinner_textfield, NS_THEME_SPINNER_TEXTFIELD },
|
|
|
|
{ eCSSKeyword_scrollbar, NS_THEME_SCROLLBAR },
|
|
|
|
{ eCSSKeyword_scrollbar_small, NS_THEME_SCROLLBAR_SMALL },
|
2015-12-22 07:05:00 +03:00
|
|
|
{ eCSSKeyword_scrollbar_horizontal, NS_THEME_SCROLLBAR_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_scrollbar_vertical, NS_THEME_SCROLLBAR_VERTICAL },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_scrollbarbutton_up, NS_THEME_SCROLLBARBUTTON_UP },
|
|
|
|
{ eCSSKeyword_scrollbarbutton_down, NS_THEME_SCROLLBARBUTTON_DOWN },
|
|
|
|
{ eCSSKeyword_scrollbarbutton_left, NS_THEME_SCROLLBARBUTTON_LEFT },
|
|
|
|
{ eCSSKeyword_scrollbarbutton_right, NS_THEME_SCROLLBARBUTTON_RIGHT },
|
|
|
|
{ eCSSKeyword_scrollbartrack_horizontal, NS_THEME_SCROLLBARTRACK_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_scrollbartrack_vertical, NS_THEME_SCROLLBARTRACK_VERTICAL },
|
|
|
|
{ eCSSKeyword_scrollbarthumb_horizontal, NS_THEME_SCROLLBARTHUMB_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_scrollbarthumb_vertical, NS_THEME_SCROLLBARTHUMB_VERTICAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_textfield, NS_THEME_TEXTFIELD },
|
|
|
|
{ eCSSKeyword_textfield_multiline, NS_THEME_TEXTFIELD_MULTILINE },
|
2016-05-19 11:58:00 +03:00
|
|
|
{ eCSSKeyword_caret, NS_THEME_CARET },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_searchfield, NS_THEME_SEARCHFIELD },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_menulist, NS_THEME_MENULIST },
|
|
|
|
{ eCSSKeyword_menulist_button, NS_THEME_MENULIST_BUTTON },
|
|
|
|
{ eCSSKeyword_menulist_text, NS_THEME_MENULIST_TEXT },
|
|
|
|
{ eCSSKeyword_menulist_textfield, NS_THEME_MENULIST_TEXTFIELD },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_range, NS_THEME_RANGE },
|
|
|
|
{ eCSSKeyword_range_thumb, NS_THEME_RANGE_THUMB },
|
|
|
|
{ eCSSKeyword_scale_horizontal, NS_THEME_SCALE_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_scale_vertical, NS_THEME_SCALE_VERTICAL },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword_scalethumb_horizontal, NS_THEME_SCALETHUMB_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_scalethumb_vertical, NS_THEME_SCALETHUMB_VERTICAL },
|
|
|
|
{ eCSSKeyword_scalethumbstart, NS_THEME_SCALETHUMBSTART },
|
|
|
|
{ eCSSKeyword_scalethumbend, NS_THEME_SCALETHUMBEND },
|
|
|
|
{ eCSSKeyword_scalethumbtick, NS_THEME_SCALETHUMBTICK },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_groupbox, NS_THEME_GROUPBOX },
|
|
|
|
{ eCSSKeyword_checkbox_container, NS_THEME_CHECKBOX_CONTAINER },
|
|
|
|
{ eCSSKeyword_radio_container, NS_THEME_RADIO_CONTAINER },
|
|
|
|
{ eCSSKeyword_checkbox_label, NS_THEME_CHECKBOX_LABEL },
|
|
|
|
{ eCSSKeyword_radio_label, NS_THEME_RADIO_LABEL },
|
|
|
|
{ eCSSKeyword_button_focus, NS_THEME_BUTTON_FOCUS },
|
|
|
|
{ eCSSKeyword_window, NS_THEME_WINDOW },
|
|
|
|
{ eCSSKeyword_dialog, NS_THEME_DIALOG },
|
|
|
|
{ eCSSKeyword_menubar, NS_THEME_MENUBAR },
|
|
|
|
{ eCSSKeyword_menupopup, NS_THEME_MENUPOPUP },
|
|
|
|
{ eCSSKeyword_menuitem, NS_THEME_MENUITEM },
|
|
|
|
{ eCSSKeyword_checkmenuitem, NS_THEME_CHECKMENUITEM },
|
|
|
|
{ eCSSKeyword_radiomenuitem, NS_THEME_RADIOMENUITEM },
|
|
|
|
{ eCSSKeyword_menucheckbox, NS_THEME_MENUCHECKBOX },
|
|
|
|
{ eCSSKeyword_menuradio, NS_THEME_MENURADIO },
|
|
|
|
{ eCSSKeyword_menuseparator, NS_THEME_MENUSEPARATOR },
|
|
|
|
{ eCSSKeyword_menuarrow, NS_THEME_MENUARROW },
|
|
|
|
{ eCSSKeyword_menuimage, NS_THEME_MENUIMAGE },
|
|
|
|
{ eCSSKeyword_menuitemtext, NS_THEME_MENUITEMTEXT },
|
|
|
|
{ eCSSKeyword__moz_win_media_toolbox, NS_THEME_WIN_MEDIA_TOOLBOX },
|
|
|
|
{ eCSSKeyword__moz_win_communications_toolbox, NS_THEME_WIN_COMMUNICATIONS_TOOLBOX },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword__moz_win_browsertabbar_toolbox, NS_THEME_WIN_BROWSERTABBAR_TOOLBOX },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_win_glass, NS_THEME_WIN_GLASS },
|
|
|
|
{ eCSSKeyword__moz_win_borderless_glass, NS_THEME_WIN_BORDERLESS_GLASS },
|
2016-05-18 20:29:56 +03:00
|
|
|
{ eCSSKeyword__moz_mac_fullscreen_button, NS_THEME_MAC_FULLSCREEN_BUTTON },
|
|
|
|
{ eCSSKeyword__moz_mac_help_button, NS_THEME_MAC_HELP_BUTTON },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_window_titlebar, NS_THEME_WINDOW_TITLEBAR },
|
|
|
|
{ eCSSKeyword__moz_window_titlebar_maximized, NS_THEME_WINDOW_TITLEBAR_MAXIMIZED },
|
|
|
|
{ eCSSKeyword__moz_window_frame_left, NS_THEME_WINDOW_FRAME_LEFT },
|
|
|
|
{ eCSSKeyword__moz_window_frame_right, NS_THEME_WINDOW_FRAME_RIGHT },
|
|
|
|
{ eCSSKeyword__moz_window_frame_bottom, NS_THEME_WINDOW_FRAME_BOTTOM },
|
|
|
|
{ eCSSKeyword__moz_window_button_close, NS_THEME_WINDOW_BUTTON_CLOSE },
|
|
|
|
{ eCSSKeyword__moz_window_button_minimize, NS_THEME_WINDOW_BUTTON_MINIMIZE },
|
|
|
|
{ eCSSKeyword__moz_window_button_maximize, NS_THEME_WINDOW_BUTTON_MAXIMIZE },
|
|
|
|
{ eCSSKeyword__moz_window_button_restore, NS_THEME_WINDOW_BUTTON_RESTORE },
|
|
|
|
{ eCSSKeyword__moz_window_button_box, NS_THEME_WINDOW_BUTTON_BOX },
|
|
|
|
{ eCSSKeyword__moz_window_button_box_maximized, NS_THEME_WINDOW_BUTTON_BOX_MAXIMIZED },
|
|
|
|
{ eCSSKeyword__moz_win_exclude_glass, NS_THEME_WIN_EXCLUDE_GLASS },
|
|
|
|
{ eCSSKeyword__moz_mac_vibrancy_light, NS_THEME_MAC_VIBRANCY_LIGHT },
|
|
|
|
{ eCSSKeyword__moz_mac_vibrancy_dark, NS_THEME_MAC_VIBRANCY_DARK },
|
|
|
|
{ eCSSKeyword__moz_mac_disclosure_button_open, NS_THEME_MAC_DISCLOSURE_BUTTON_OPEN },
|
|
|
|
{ eCSSKeyword__moz_mac_disclosure_button_closed, NS_THEME_MAC_DISCLOSURE_BUTTON_CLOSED },
|
|
|
|
{ eCSSKeyword__moz_gtk_info_bar, NS_THEME_GTK_INFO_BAR },
|
2016-05-17 08:37:05 +03:00
|
|
|
{ eCSSKeyword__moz_mac_source_list, NS_THEME_MAC_SOURCE_LIST },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-12-18 01:51:39 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBackfaceVisibilityKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_visible, NS_STYLE_BACKFACE_VISIBILITY_VISIBLE },
|
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_BACKFACE_VISIBILITY_HIDDEN },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-08-03 07:04:22 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTransformStyleKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_flat, NS_STYLE_TRANSFORM_STYLE_FLAT },
|
|
|
|
{ eCSSKeyword_preserve_3d, NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-08-27 04:01:06 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerAttachmentKTable[] = {
|
|
|
|
{ eCSSKeyword_fixed, NS_STYLE_IMAGELAYER_ATTACHMENT_FIXED },
|
|
|
|
{ eCSSKeyword_scroll, NS_STYLE_IMAGELAYER_ATTACHMENT_SCROLL },
|
|
|
|
{ eCSSKeyword_local, NS_STYLE_IMAGELAYER_ATTACHMENT_LOCAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
static_assert(NS_STYLE_IMAGELAYER_CLIP_BORDER == NS_STYLE_IMAGELAYER_ORIGIN_BORDER &&
|
|
|
|
NS_STYLE_IMAGELAYER_CLIP_PADDING == NS_STYLE_IMAGELAYER_ORIGIN_PADDING &&
|
|
|
|
NS_STYLE_IMAGELAYER_CLIP_CONTENT == NS_STYLE_IMAGELAYER_ORIGIN_CONTENT,
|
2016-04-14 11:28:06 +03:00
|
|
|
"Except background-clip:text, all {background,mask}-clip and "
|
|
|
|
"{background,mask}-origin style constants must agree");
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerOriginKTable[] = {
|
|
|
|
{ eCSSKeyword_border_box, NS_STYLE_IMAGELAYER_ORIGIN_BORDER },
|
|
|
|
{ eCSSKeyword_padding_box, NS_STYLE_IMAGELAYER_ORIGIN_PADDING },
|
|
|
|
{ eCSSKeyword_content_box, NS_STYLE_IMAGELAYER_ORIGIN_CONTENT },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2002-10-08 14:24:53 +04:00
|
|
|
};
|
|
|
|
|
2016-04-14 11:28:06 +03:00
|
|
|
KTableEntry nsCSSProps::kBackgroundClipKTable[] = {
|
|
|
|
{ eCSSKeyword_border_box, NS_STYLE_IMAGELAYER_CLIP_BORDER },
|
|
|
|
{ eCSSKeyword_padding_box, NS_STYLE_IMAGELAYER_CLIP_PADDING },
|
|
|
|
{ eCSSKeyword_content_box, NS_STYLE_IMAGELAYER_CLIP_CONTENT },
|
|
|
|
// The next entry is controlled by the layout.css.background-clip-text.enabled
|
|
|
|
// pref.
|
|
|
|
{ eCSSKeyword_text, NS_STYLE_IMAGELAYER_CLIP_TEXT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2016-04-18 06:31:24 +03:00
|
|
|
static_assert(MOZ_ARRAY_LENGTH(nsCSSProps::kImageLayerOriginKTable) ==
|
|
|
|
MOZ_ARRAY_LENGTH(nsCSSProps::kBackgroundClipKTable) - 1,
|
2016-04-14 11:28:06 +03:00
|
|
|
"background-clip has one extra value, which is text, compared"
|
|
|
|
"to {background,mask}-origin");
|
|
|
|
|
2007-04-19 00:41:14 +04:00
|
|
|
// Note: Don't change this table unless you update
|
2016-01-28 08:27:00 +03:00
|
|
|
// ParseImageLayerPosition!
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kImageLayerPositionKTable[] = {
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_IMAGELAYER_POSITION_CENTER },
|
|
|
|
{ eCSSKeyword_top, NS_STYLE_IMAGELAYER_POSITION_TOP },
|
|
|
|
{ eCSSKeyword_bottom, NS_STYLE_IMAGELAYER_POSITION_BOTTOM },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_IMAGELAYER_POSITION_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_IMAGELAYER_POSITION_RIGHT },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2007-04-19 00:41:14 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerRepeatKTable[] = {
|
|
|
|
{ eCSSKeyword_no_repeat, NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT },
|
|
|
|
{ eCSSKeyword_repeat, NS_STYLE_IMAGELAYER_REPEAT_REPEAT },
|
|
|
|
{ eCSSKeyword_repeat_x, NS_STYLE_IMAGELAYER_REPEAT_REPEAT_X },
|
|
|
|
{ eCSSKeyword_repeat_y, NS_STYLE_IMAGELAYER_REPEAT_REPEAT_Y },
|
2016-05-06 03:16:00 +03:00
|
|
|
{ eCSSKeyword_round, NS_STYLE_IMAGELAYER_REPEAT_ROUND},
|
|
|
|
{ eCSSKeyword_space, NS_STYLE_IMAGELAYER_REPEAT_SPACE},
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-02-25 09:23:14 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerRepeatPartKTable[] = {
|
|
|
|
{ eCSSKeyword_no_repeat, NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT },
|
|
|
|
{ eCSSKeyword_repeat, NS_STYLE_IMAGELAYER_REPEAT_REPEAT },
|
2016-05-06 03:16:00 +03:00
|
|
|
{ eCSSKeyword_round, NS_STYLE_IMAGELAYER_REPEAT_ROUND},
|
|
|
|
{ eCSSKeyword_space, NS_STYLE_IMAGELAYER_REPEAT_SPACE},
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:27:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerSizeKTable[] = {
|
|
|
|
{ eCSSKeyword_contain, NS_STYLE_IMAGELAYER_SIZE_CONTAIN },
|
|
|
|
{ eCSSKeyword_cover, NS_STYLE_IMAGELAYER_SIZE_COVER },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-07 11:59:10 +04:00
|
|
|
};
|
|
|
|
|
2016-01-28 08:28:00 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageLayerModeKTable[] = {
|
|
|
|
{ eCSSKeyword_alpha, NS_STYLE_MASK_MODE_ALPHA },
|
|
|
|
{ eCSSKeyword_luminance, NS_STYLE_MASK_MODE_LUMINANCE },
|
2016-02-25 12:31:47 +03:00
|
|
|
{ eCSSKeyword_match_source, NS_STYLE_MASK_MODE_MATCH_SOURCE },
|
2016-01-28 08:28:00 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kImageLayerCompositeKTable[] = {
|
|
|
|
{ eCSSKeyword_add, NS_STYLE_MASK_COMPOSITE_ADD },
|
2016-07-04 06:17:13 +03:00
|
|
|
{ eCSSKeyword_subtract, NS_STYLE_MASK_COMPOSITE_SUBTRACT },
|
2016-01-28 08:28:00 +03:00
|
|
|
{ eCSSKeyword_intersect, NS_STYLE_MASK_COMPOSITE_INTERSECT },
|
|
|
|
{ eCSSKeyword_exclude, NS_STYLE_MASK_COMPOSITE_EXCLUDE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBlendModeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_BLEND_NORMAL },
|
|
|
|
{ eCSSKeyword_multiply, NS_STYLE_BLEND_MULTIPLY },
|
|
|
|
{ eCSSKeyword_screen, NS_STYLE_BLEND_SCREEN },
|
|
|
|
{ eCSSKeyword_overlay, NS_STYLE_BLEND_OVERLAY },
|
|
|
|
{ eCSSKeyword_darken, NS_STYLE_BLEND_DARKEN },
|
|
|
|
{ eCSSKeyword_lighten, NS_STYLE_BLEND_LIGHTEN },
|
|
|
|
{ eCSSKeyword_color_dodge, NS_STYLE_BLEND_COLOR_DODGE },
|
|
|
|
{ eCSSKeyword_color_burn, NS_STYLE_BLEND_COLOR_BURN },
|
|
|
|
{ eCSSKeyword_hard_light, NS_STYLE_BLEND_HARD_LIGHT },
|
|
|
|
{ eCSSKeyword_soft_light, NS_STYLE_BLEND_SOFT_LIGHT },
|
|
|
|
{ eCSSKeyword_difference, NS_STYLE_BLEND_DIFFERENCE },
|
|
|
|
{ eCSSKeyword_exclusion, NS_STYLE_BLEND_EXCLUSION },
|
|
|
|
{ eCSSKeyword_hue, NS_STYLE_BLEND_HUE },
|
|
|
|
{ eCSSKeyword_saturation, NS_STYLE_BLEND_SATURATION },
|
|
|
|
{ eCSSKeyword_color, NS_STYLE_BLEND_COLOR },
|
|
|
|
{ eCSSKeyword_luminosity, NS_STYLE_BLEND_LUMINOSITY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-05-28 22:09:05 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderCollapseKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_collapse, NS_STYLE_BORDER_COLLAPSE },
|
|
|
|
{ eCSSKeyword_separate, NS_STYLE_BORDER_SEPARATE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderColorKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_use_text_color, NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderImageRepeatKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH },
|
|
|
|
{ eCSSKeyword_repeat, NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT },
|
|
|
|
{ eCSSKeyword_round, NS_STYLE_BORDER_IMAGE_REPEAT_ROUND },
|
2016-07-12 22:50:00 +03:00
|
|
|
{ eCSSKeyword_space, NS_STYLE_BORDER_IMAGE_REPEAT_SPACE },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-12-23 03:34:45 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderImageSliceKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_fill, NS_STYLE_BORDER_IMAGE_SLICE_FILL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2008-07-17 10:30:25 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderStyleKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_BORDER_STYLE_NONE },
|
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_BORDER_STYLE_HIDDEN },
|
|
|
|
{ eCSSKeyword_dotted, NS_STYLE_BORDER_STYLE_DOTTED },
|
|
|
|
{ eCSSKeyword_dashed, NS_STYLE_BORDER_STYLE_DASHED },
|
|
|
|
{ eCSSKeyword_solid, NS_STYLE_BORDER_STYLE_SOLID },
|
|
|
|
{ eCSSKeyword_double, NS_STYLE_BORDER_STYLE_DOUBLE },
|
|
|
|
{ eCSSKeyword_groove, NS_STYLE_BORDER_STYLE_GROOVE },
|
|
|
|
{ eCSSKeyword_ridge, NS_STYLE_BORDER_STYLE_RIDGE },
|
|
|
|
{ eCSSKeyword_inset, NS_STYLE_BORDER_STYLE_INSET },
|
|
|
|
{ eCSSKeyword_outset, NS_STYLE_BORDER_STYLE_OUTSET },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBorderWidthKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_thin, NS_STYLE_BORDER_WIDTH_THIN },
|
|
|
|
{ eCSSKeyword_medium, NS_STYLE_BORDER_WIDTH_MEDIUM },
|
|
|
|
{ eCSSKeyword_thick, NS_STYLE_BORDER_WIDTH_THICK },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxDecorationBreakKTable[] = {
|
2016-08-26 10:14:32 +03:00
|
|
|
{ eCSSKeyword_slice, StyleBoxDecorationBreak::Slice },
|
|
|
|
{ eCSSKeyword_clone, StyleBoxDecorationBreak::Clone },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-05-05 21:55:53 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxShadowTypeKTable[] = {
|
2016-07-25 09:23:27 +03:00
|
|
|
{ eCSSKeyword_inset, uint8_t(StyleBoxShadowType::Inset) },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-02-10 11:45:13 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxSizingKTable[] = {
|
2016-07-28 10:40:09 +03:00
|
|
|
{ eCSSKeyword_content_box, StyleBoxSizing::Content },
|
|
|
|
{ eCSSKeyword_border_box, StyleBoxSizing::Border },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCaptionSideKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_top, NS_STYLE_CAPTION_SIDE_TOP },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_CAPTION_SIDE_RIGHT },
|
|
|
|
{ eCSSKeyword_bottom, NS_STYLE_CAPTION_SIDE_BOTTOM },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_CAPTION_SIDE_LEFT },
|
|
|
|
{ eCSSKeyword_top_outside, NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE },
|
|
|
|
{ eCSSKeyword_bottom_outside, NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
KTableEntry nsCSSProps::kClearKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_CLEAR_NONE },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_CLEAR_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_CLEAR_RIGHT },
|
|
|
|
{ eCSSKeyword_inline_start, NS_STYLE_CLEAR_INLINE_START },
|
|
|
|
{ eCSSKeyword_inline_end, NS_STYLE_CLEAR_INLINE_END },
|
|
|
|
{ eCSSKeyword_both, NS_STYLE_CLEAR_BOTH },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2013-05-16 06:35:15 +04:00
|
|
|
// See also kContextPatternKTable for SVG paint-specific values
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kColorKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_activeborder, LookAndFeel::eColorID_activeborder },
|
|
|
|
{ eCSSKeyword_activecaption, LookAndFeel::eColorID_activecaption },
|
|
|
|
{ eCSSKeyword_appworkspace, LookAndFeel::eColorID_appworkspace },
|
|
|
|
{ eCSSKeyword_background, LookAndFeel::eColorID_background },
|
|
|
|
{ eCSSKeyword_buttonface, LookAndFeel::eColorID_buttonface },
|
|
|
|
{ eCSSKeyword_buttonhighlight, LookAndFeel::eColorID_buttonhighlight },
|
|
|
|
{ eCSSKeyword_buttonshadow, LookAndFeel::eColorID_buttonshadow },
|
|
|
|
{ eCSSKeyword_buttontext, LookAndFeel::eColorID_buttontext },
|
|
|
|
{ eCSSKeyword_captiontext, LookAndFeel::eColorID_captiontext },
|
|
|
|
{ eCSSKeyword_graytext, LookAndFeel::eColorID_graytext },
|
|
|
|
{ eCSSKeyword_highlight, LookAndFeel::eColorID_highlight },
|
|
|
|
{ eCSSKeyword_highlighttext, LookAndFeel::eColorID_highlighttext },
|
|
|
|
{ eCSSKeyword_inactiveborder, LookAndFeel::eColorID_inactiveborder },
|
|
|
|
{ eCSSKeyword_inactivecaption, LookAndFeel::eColorID_inactivecaption },
|
|
|
|
{ eCSSKeyword_inactivecaptiontext, LookAndFeel::eColorID_inactivecaptiontext },
|
|
|
|
{ eCSSKeyword_infobackground, LookAndFeel::eColorID_infobackground },
|
|
|
|
{ eCSSKeyword_infotext, LookAndFeel::eColorID_infotext },
|
|
|
|
{ eCSSKeyword_menu, LookAndFeel::eColorID_menu },
|
|
|
|
{ eCSSKeyword_menutext, LookAndFeel::eColorID_menutext },
|
|
|
|
{ eCSSKeyword_scrollbar, LookAndFeel::eColorID_scrollbar },
|
|
|
|
{ eCSSKeyword_threeddarkshadow, LookAndFeel::eColorID_threeddarkshadow },
|
|
|
|
{ eCSSKeyword_threedface, LookAndFeel::eColorID_threedface },
|
|
|
|
{ eCSSKeyword_threedhighlight, LookAndFeel::eColorID_threedhighlight },
|
|
|
|
{ eCSSKeyword_threedlightshadow, LookAndFeel::eColorID_threedlightshadow },
|
|
|
|
{ eCSSKeyword_threedshadow, LookAndFeel::eColorID_threedshadow },
|
|
|
|
{ eCSSKeyword_window, LookAndFeel::eColorID_window },
|
|
|
|
{ eCSSKeyword_windowframe, LookAndFeel::eColorID_windowframe },
|
|
|
|
{ eCSSKeyword_windowtext, LookAndFeel::eColorID_windowtext },
|
|
|
|
{ eCSSKeyword__moz_activehyperlinktext, NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT },
|
|
|
|
{ eCSSKeyword__moz_buttondefault, LookAndFeel::eColorID__moz_buttondefault },
|
|
|
|
{ eCSSKeyword__moz_buttonhoverface, LookAndFeel::eColorID__moz_buttonhoverface },
|
|
|
|
{ eCSSKeyword__moz_buttonhovertext, LookAndFeel::eColorID__moz_buttonhovertext },
|
|
|
|
{ eCSSKeyword__moz_cellhighlight, LookAndFeel::eColorID__moz_cellhighlight },
|
|
|
|
{ eCSSKeyword__moz_cellhighlighttext, LookAndFeel::eColorID__moz_cellhighlighttext },
|
|
|
|
{ eCSSKeyword__moz_eventreerow, LookAndFeel::eColorID__moz_eventreerow },
|
|
|
|
{ eCSSKeyword__moz_field, LookAndFeel::eColorID__moz_field },
|
|
|
|
{ eCSSKeyword__moz_fieldtext, LookAndFeel::eColorID__moz_fieldtext },
|
|
|
|
{ eCSSKeyword__moz_default_background_color, NS_COLOR_MOZ_DEFAULT_BACKGROUND_COLOR },
|
|
|
|
{ eCSSKeyword__moz_default_color, NS_COLOR_MOZ_DEFAULT_COLOR },
|
|
|
|
{ eCSSKeyword__moz_dialog, LookAndFeel::eColorID__moz_dialog },
|
|
|
|
{ eCSSKeyword__moz_dialogtext, LookAndFeel::eColorID__moz_dialogtext },
|
|
|
|
{ eCSSKeyword__moz_dragtargetzone, LookAndFeel::eColorID__moz_dragtargetzone },
|
|
|
|
{ eCSSKeyword__moz_gtk_info_bar_text, LookAndFeel::eColorID__moz_gtk_info_bar_text },
|
|
|
|
{ eCSSKeyword__moz_hyperlinktext, NS_COLOR_MOZ_HYPERLINKTEXT },
|
|
|
|
{ eCSSKeyword__moz_html_cellhighlight, LookAndFeel::eColorID__moz_html_cellhighlight },
|
|
|
|
{ eCSSKeyword__moz_html_cellhighlighttext, LookAndFeel::eColorID__moz_html_cellhighlighttext },
|
|
|
|
{ eCSSKeyword__moz_mac_buttonactivetext, LookAndFeel::eColorID__moz_mac_buttonactivetext },
|
|
|
|
{ eCSSKeyword__moz_mac_chrome_active, LookAndFeel::eColorID__moz_mac_chrome_active },
|
|
|
|
{ eCSSKeyword__moz_mac_chrome_inactive, LookAndFeel::eColorID__moz_mac_chrome_inactive },
|
|
|
|
{ eCSSKeyword__moz_mac_defaultbuttontext, LookAndFeel::eColorID__moz_mac_defaultbuttontext },
|
|
|
|
{ eCSSKeyword__moz_mac_focusring, LookAndFeel::eColorID__moz_mac_focusring },
|
|
|
|
{ eCSSKeyword__moz_mac_menuselect, LookAndFeel::eColorID__moz_mac_menuselect },
|
|
|
|
{ eCSSKeyword__moz_mac_menushadow, LookAndFeel::eColorID__moz_mac_menushadow },
|
|
|
|
{ eCSSKeyword__moz_mac_menutextdisable, LookAndFeel::eColorID__moz_mac_menutextdisable },
|
|
|
|
{ eCSSKeyword__moz_mac_menutextselect, LookAndFeel::eColorID__moz_mac_menutextselect },
|
|
|
|
{ eCSSKeyword__moz_mac_disabledtoolbartext, LookAndFeel::eColorID__moz_mac_disabledtoolbartext },
|
|
|
|
{ eCSSKeyword__moz_mac_secondaryhighlight, LookAndFeel::eColorID__moz_mac_secondaryhighlight },
|
|
|
|
{ eCSSKeyword__moz_menuhover, LookAndFeel::eColorID__moz_menuhover },
|
|
|
|
{ eCSSKeyword__moz_menuhovertext, LookAndFeel::eColorID__moz_menuhovertext },
|
|
|
|
{ eCSSKeyword__moz_menubartext, LookAndFeel::eColorID__moz_menubartext },
|
|
|
|
{ eCSSKeyword__moz_menubarhovertext, LookAndFeel::eColorID__moz_menubarhovertext },
|
|
|
|
{ eCSSKeyword__moz_oddtreerow, LookAndFeel::eColorID__moz_oddtreerow },
|
|
|
|
{ eCSSKeyword__moz_visitedhyperlinktext, NS_COLOR_MOZ_VISITEDHYPERLINKTEXT },
|
|
|
|
{ eCSSKeyword_currentcolor, NS_COLOR_CURRENTCOLOR },
|
|
|
|
{ eCSSKeyword__moz_win_mediatext, LookAndFeel::eColorID__moz_win_mediatext },
|
|
|
|
{ eCSSKeyword__moz_win_communicationstext, LookAndFeel::eColorID__moz_win_communicationstext },
|
|
|
|
{ eCSSKeyword__moz_nativehyperlinktext, LookAndFeel::eColorID__moz_nativehyperlinktext },
|
|
|
|
{ eCSSKeyword__moz_comboboxtext, LookAndFeel::eColorID__moz_comboboxtext },
|
|
|
|
{ eCSSKeyword__moz_combobox, LookAndFeel::eColorID__moz_combobox },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-09-10 09:54:46 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kContentKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_open_quote, NS_STYLE_CONTENT_OPEN_QUOTE },
|
|
|
|
{ eCSSKeyword_close_quote, NS_STYLE_CONTENT_CLOSE_QUOTE },
|
|
|
|
{ eCSSKeyword_no_open_quote, NS_STYLE_CONTENT_NO_OPEN_QUOTE },
|
|
|
|
{ eCSSKeyword_no_close_quote, NS_STYLE_CONTENT_NO_CLOSE_QUOTE },
|
|
|
|
{ eCSSKeyword__moz_alt_content, NS_STYLE_CONTENT_ALT_CONTENT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kControlCharacterVisibilityKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN },
|
|
|
|
{ eCSSKeyword_visible, NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-02-05 14:08:48 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCounterRangeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_infinite, NS_STYLE_COUNTER_RANGE_INFINITE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-11-06 02:14:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCounterSpeakAsKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_bullets, NS_STYLE_COUNTER_SPEAKAS_BULLETS },
|
|
|
|
{ eCSSKeyword_numbers, NS_STYLE_COUNTER_SPEAKAS_NUMBERS },
|
|
|
|
{ eCSSKeyword_words, NS_STYLE_COUNTER_SPEAKAS_WORDS },
|
|
|
|
{ eCSSKeyword_spell_out, NS_STYLE_COUNTER_SPEAKAS_SPELL_OUT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-11-06 02:14:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCounterSymbolsSystemKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_cyclic, NS_STYLE_COUNTER_SYSTEM_CYCLIC },
|
|
|
|
{ eCSSKeyword_numeric, NS_STYLE_COUNTER_SYSTEM_NUMERIC },
|
|
|
|
{ eCSSKeyword_alphabetic, NS_STYLE_COUNTER_SYSTEM_ALPHABETIC },
|
|
|
|
{ eCSSKeyword_symbolic, NS_STYLE_COUNTER_SYSTEM_SYMBOLIC },
|
|
|
|
{ eCSSKeyword_fixed, NS_STYLE_COUNTER_SYSTEM_FIXED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-11-06 02:14:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCounterSystemKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_cyclic, NS_STYLE_COUNTER_SYSTEM_CYCLIC },
|
|
|
|
{ eCSSKeyword_numeric, NS_STYLE_COUNTER_SYSTEM_NUMERIC },
|
|
|
|
{ eCSSKeyword_alphabetic, NS_STYLE_COUNTER_SYSTEM_ALPHABETIC },
|
|
|
|
{ eCSSKeyword_symbolic, NS_STYLE_COUNTER_SYSTEM_SYMBOLIC },
|
|
|
|
{ eCSSKeyword_additive, NS_STYLE_COUNTER_SYSTEM_ADDITIVE },
|
|
|
|
{ eCSSKeyword_fixed, NS_STYLE_COUNTER_SYSTEM_FIXED },
|
|
|
|
{ eCSSKeyword_extends, NS_STYLE_COUNTER_SYSTEM_EXTENDS },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-11-06 02:14:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kCursorKTable[] = {
|
2004-09-12 03:24:30 +04:00
|
|
|
// CSS 2.0
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_CURSOR_AUTO },
|
|
|
|
{ eCSSKeyword_crosshair, NS_STYLE_CURSOR_CROSSHAIR },
|
|
|
|
{ eCSSKeyword_default, NS_STYLE_CURSOR_DEFAULT },
|
|
|
|
{ eCSSKeyword_pointer, NS_STYLE_CURSOR_POINTER },
|
|
|
|
{ eCSSKeyword_move, NS_STYLE_CURSOR_MOVE },
|
|
|
|
{ eCSSKeyword_e_resize, NS_STYLE_CURSOR_E_RESIZE },
|
|
|
|
{ eCSSKeyword_ne_resize, NS_STYLE_CURSOR_NE_RESIZE },
|
|
|
|
{ eCSSKeyword_nw_resize, NS_STYLE_CURSOR_NW_RESIZE },
|
|
|
|
{ eCSSKeyword_n_resize, NS_STYLE_CURSOR_N_RESIZE },
|
|
|
|
{ eCSSKeyword_se_resize, NS_STYLE_CURSOR_SE_RESIZE },
|
|
|
|
{ eCSSKeyword_sw_resize, NS_STYLE_CURSOR_SW_RESIZE },
|
|
|
|
{ eCSSKeyword_s_resize, NS_STYLE_CURSOR_S_RESIZE },
|
|
|
|
{ eCSSKeyword_w_resize, NS_STYLE_CURSOR_W_RESIZE },
|
|
|
|
{ eCSSKeyword_text, NS_STYLE_CURSOR_TEXT },
|
|
|
|
{ eCSSKeyword_wait, NS_STYLE_CURSOR_WAIT },
|
|
|
|
{ eCSSKeyword_help, NS_STYLE_CURSOR_HELP },
|
2004-01-09 00:27:56 +03:00
|
|
|
// CSS 2.1
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_progress, NS_STYLE_CURSOR_SPINNING },
|
2004-09-12 03:24:30 +04:00
|
|
|
// CSS3 basic user interface module
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_copy, NS_STYLE_CURSOR_COPY },
|
|
|
|
{ eCSSKeyword_alias, NS_STYLE_CURSOR_ALIAS },
|
|
|
|
{ eCSSKeyword_context_menu, NS_STYLE_CURSOR_CONTEXT_MENU },
|
|
|
|
{ eCSSKeyword_cell, NS_STYLE_CURSOR_CELL },
|
|
|
|
{ eCSSKeyword_not_allowed, NS_STYLE_CURSOR_NOT_ALLOWED },
|
|
|
|
{ eCSSKeyword_col_resize, NS_STYLE_CURSOR_COL_RESIZE },
|
|
|
|
{ eCSSKeyword_row_resize, NS_STYLE_CURSOR_ROW_RESIZE },
|
|
|
|
{ eCSSKeyword_no_drop, NS_STYLE_CURSOR_NO_DROP },
|
|
|
|
{ eCSSKeyword_vertical_text, NS_STYLE_CURSOR_VERTICAL_TEXT },
|
|
|
|
{ eCSSKeyword_all_scroll, NS_STYLE_CURSOR_ALL_SCROLL },
|
|
|
|
{ eCSSKeyword_nesw_resize, NS_STYLE_CURSOR_NESW_RESIZE },
|
|
|
|
{ eCSSKeyword_nwse_resize, NS_STYLE_CURSOR_NWSE_RESIZE },
|
|
|
|
{ eCSSKeyword_ns_resize, NS_STYLE_CURSOR_NS_RESIZE },
|
|
|
|
{ eCSSKeyword_ew_resize, NS_STYLE_CURSOR_EW_RESIZE },
|
|
|
|
{ eCSSKeyword_none, NS_STYLE_CURSOR_NONE },
|
|
|
|
{ eCSSKeyword_grab, NS_STYLE_CURSOR_GRAB },
|
|
|
|
{ eCSSKeyword_grabbing, NS_STYLE_CURSOR_GRABBING },
|
|
|
|
{ eCSSKeyword_zoom_in, NS_STYLE_CURSOR_ZOOM_IN },
|
|
|
|
{ eCSSKeyword_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT },
|
2004-09-12 03:24:30 +04:00
|
|
|
// -moz- prefixed vendor specific
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_grab, NS_STYLE_CURSOR_GRAB },
|
|
|
|
{ eCSSKeyword__moz_grabbing, NS_STYLE_CURSOR_GRABBING },
|
|
|
|
{ eCSSKeyword__moz_zoom_in, NS_STYLE_CURSOR_ZOOM_IN },
|
|
|
|
{ eCSSKeyword__moz_zoom_out, NS_STYLE_CURSOR_ZOOM_OUT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kDirectionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_ltr, NS_STYLE_DIRECTION_LTR },
|
|
|
|
{ eCSSKeyword_rtl, NS_STYLE_DIRECTION_RTL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
KTableEntry nsCSSProps::kDisplayKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_DISPLAY_NONE },
|
|
|
|
{ eCSSKeyword_inline, NS_STYLE_DISPLAY_INLINE },
|
|
|
|
{ eCSSKeyword_block, NS_STYLE_DISPLAY_BLOCK },
|
|
|
|
{ eCSSKeyword_inline_block, NS_STYLE_DISPLAY_INLINE_BLOCK },
|
|
|
|
{ eCSSKeyword_list_item, NS_STYLE_DISPLAY_LIST_ITEM },
|
|
|
|
{ eCSSKeyword_table, NS_STYLE_DISPLAY_TABLE },
|
|
|
|
{ eCSSKeyword_inline_table, NS_STYLE_DISPLAY_INLINE_TABLE },
|
|
|
|
{ eCSSKeyword_table_row_group, NS_STYLE_DISPLAY_TABLE_ROW_GROUP },
|
|
|
|
{ eCSSKeyword_table_header_group, NS_STYLE_DISPLAY_TABLE_HEADER_GROUP },
|
|
|
|
{ eCSSKeyword_table_footer_group, NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP },
|
|
|
|
{ eCSSKeyword_table_row, NS_STYLE_DISPLAY_TABLE_ROW },
|
|
|
|
{ eCSSKeyword_table_column_group, NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP },
|
|
|
|
{ eCSSKeyword_table_column, NS_STYLE_DISPLAY_TABLE_COLUMN },
|
|
|
|
{ eCSSKeyword_table_cell, NS_STYLE_DISPLAY_TABLE_CELL },
|
|
|
|
{ eCSSKeyword_table_caption, NS_STYLE_DISPLAY_TABLE_CAPTION },
|
2006-04-19 19:10:50 +04:00
|
|
|
// Make sure this is kept in sync with the code in
|
|
|
|
// nsCSSFrameConstructor::ConstructXULFrame
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_box, NS_STYLE_DISPLAY_BOX },
|
|
|
|
{ eCSSKeyword__moz_inline_box, NS_STYLE_DISPLAY_INLINE_BOX },
|
2009-10-13 10:35:57 +04:00
|
|
|
#ifdef MOZ_XUL
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_grid, NS_STYLE_DISPLAY_XUL_GRID },
|
|
|
|
{ eCSSKeyword__moz_inline_grid, NS_STYLE_DISPLAY_INLINE_XUL_GRID },
|
|
|
|
{ eCSSKeyword__moz_grid_group, NS_STYLE_DISPLAY_XUL_GRID_GROUP },
|
|
|
|
{ eCSSKeyword__moz_grid_line, NS_STYLE_DISPLAY_XUL_GRID_LINE },
|
|
|
|
{ eCSSKeyword__moz_stack, NS_STYLE_DISPLAY_STACK },
|
|
|
|
{ eCSSKeyword__moz_inline_stack, NS_STYLE_DISPLAY_INLINE_STACK },
|
|
|
|
{ eCSSKeyword__moz_deck, NS_STYLE_DISPLAY_DECK },
|
|
|
|
{ eCSSKeyword__moz_popup, NS_STYLE_DISPLAY_POPUP },
|
|
|
|
{ eCSSKeyword__moz_groupbox, NS_STYLE_DISPLAY_GROUPBOX },
|
2006-04-19 19:10:50 +04:00
|
|
|
#endif
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_flex, NS_STYLE_DISPLAY_FLEX },
|
|
|
|
{ eCSSKeyword_inline_flex, NS_STYLE_DISPLAY_INLINE_FLEX },
|
|
|
|
{ eCSSKeyword_ruby, NS_STYLE_DISPLAY_RUBY },
|
|
|
|
{ eCSSKeyword_ruby_base, NS_STYLE_DISPLAY_RUBY_BASE },
|
|
|
|
{ eCSSKeyword_ruby_base_container, NS_STYLE_DISPLAY_RUBY_BASE_CONTAINER },
|
|
|
|
{ eCSSKeyword_ruby_text, NS_STYLE_DISPLAY_RUBY_TEXT },
|
|
|
|
{ eCSSKeyword_ruby_text_container, NS_STYLE_DISPLAY_RUBY_TEXT_CONTAINER },
|
2015-12-01 01:39:37 +03:00
|
|
|
// The next two entries are controlled by the layout.css.grid.enabled pref.
|
|
|
|
{ eCSSKeyword_grid, NS_STYLE_DISPLAY_GRID },
|
|
|
|
{ eCSSKeyword_inline_grid, NS_STYLE_DISPLAY_INLINE_GRID },
|
2016-05-24 07:42:36 +03:00
|
|
|
// The next 4 entries are controlled by the layout.css.prefixes.webkit pref.
|
2016-03-24 19:55:11 +03:00
|
|
|
{ eCSSKeyword__webkit_box, NS_STYLE_DISPLAY_WEBKIT_BOX },
|
|
|
|
{ eCSSKeyword__webkit_inline_box, NS_STYLE_DISPLAY_WEBKIT_INLINE_BOX },
|
2016-05-24 07:42:36 +03:00
|
|
|
{ eCSSKeyword__webkit_flex, NS_STYLE_DISPLAY_FLEX },
|
|
|
|
{ eCSSKeyword__webkit_inline_flex, NS_STYLE_DISPLAY_INLINE_FLEX },
|
2014-11-20 21:24:08 +03:00
|
|
|
// The next entry is controlled by the layout.css.display-contents.enabled
|
|
|
|
// pref.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_contents, NS_STYLE_DISPLAY_CONTENTS },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kEmptyCellsKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_show, NS_STYLE_TABLE_EMPTY_CELLS_SHOW },
|
|
|
|
{ eCSSKeyword_hide, NS_STYLE_TABLE_EMPTY_CELLS_HIDE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignAllKeywords[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_ALIGN_AUTO },
|
2016-01-05 23:27:13 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START },
|
|
|
|
{ eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END },
|
|
|
|
{ eCSSKeyword_space_between, NS_STYLE_ALIGN_SPACE_BETWEEN },
|
|
|
|
{ eCSSKeyword_space_around, NS_STYLE_ALIGN_SPACE_AROUND },
|
|
|
|
{ eCSSKeyword_space_evenly, NS_STYLE_ALIGN_SPACE_EVENLY },
|
|
|
|
{ eCSSKeyword_legacy, NS_STYLE_ALIGN_LEGACY },
|
|
|
|
{ eCSSKeyword_safe, NS_STYLE_ALIGN_SAFE },
|
2016-01-05 23:27:13 +03:00
|
|
|
{ eCSSKeyword_unsafe, NS_STYLE_ALIGN_UNSAFE },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignOverflowPosition[] = {
|
2016-01-05 23:27:13 +03:00
|
|
|
{ eCSSKeyword_unsafe, NS_STYLE_ALIGN_UNSAFE },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_safe, NS_STYLE_ALIGN_SAFE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignSelfPosition[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START },
|
|
|
|
{ eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignLegacy[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_legacy, NS_STYLE_ALIGN_LEGACY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignLegacyPosition[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2016-01-05 23:27:13 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignAutoNormalStretchBaseline[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_ALIGN_AUTO },
|
2016-01-05 23:27:13 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2016-01-05 23:27:13 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignNormalStretchBaseline[] = {
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kAlignNormalBaseline[] = {
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignContentDistribution[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_space_between, NS_STYLE_ALIGN_SPACE_BETWEEN },
|
|
|
|
{ eCSSKeyword_space_around, NS_STYLE_ALIGN_SPACE_AROUND },
|
|
|
|
{ eCSSKeyword_space_evenly, NS_STYLE_ALIGN_SPACE_EVENLY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kAlignContentPosition[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-11-03 17:18:05 +03:00
|
|
|
};
|
|
|
|
|
2016-02-08 19:35:01 +03:00
|
|
|
// <NOTE> these are only used for auto-completion, not parsing:
|
|
|
|
const KTableEntry nsCSSProps::kAutoCompletionAlignJustifySelf[] = {
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_ALIGN_AUTO },
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START },
|
|
|
|
{ eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kAutoCompletionAlignItems[] = {
|
|
|
|
// Intentionally no 'auto' here.
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_self_start, NS_STYLE_ALIGN_SELF_START },
|
|
|
|
{ eCSSKeyword_self_end, NS_STYLE_ALIGN_SELF_END },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kAutoCompletionAlignJustifyContent[] = {
|
|
|
|
// Intentionally no 'auto' here.
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_ALIGN_NORMAL },
|
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_last_baseline, NS_STYLE_ALIGN_LAST_BASELINE },
|
|
|
|
{ eCSSKeyword_stretch, NS_STYLE_ALIGN_STRETCH },
|
|
|
|
{ eCSSKeyword_space_between, NS_STYLE_ALIGN_SPACE_BETWEEN },
|
|
|
|
{ eCSSKeyword_space_around, NS_STYLE_ALIGN_SPACE_AROUND },
|
|
|
|
{ eCSSKeyword_space_evenly, NS_STYLE_ALIGN_SPACE_EVENLY },
|
|
|
|
{ eCSSKeyword_start, NS_STYLE_ALIGN_START },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_ALIGN_END },
|
|
|
|
{ eCSSKeyword_flex_start, NS_STYLE_ALIGN_FLEX_START },
|
|
|
|
{ eCSSKeyword_flex_end, NS_STYLE_ALIGN_FLEX_END },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
// </NOTE>
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFlexDirectionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_row, NS_STYLE_FLEX_DIRECTION_ROW },
|
|
|
|
{ eCSSKeyword_row_reverse, NS_STYLE_FLEX_DIRECTION_ROW_REVERSE },
|
|
|
|
{ eCSSKeyword_column, NS_STYLE_FLEX_DIRECTION_COLUMN },
|
|
|
|
{ eCSSKeyword_column_reverse, NS_STYLE_FLEX_DIRECTION_COLUMN_REVERSE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-07-07 04:06:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFlexWrapKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_nowrap, NS_STYLE_FLEX_WRAP_NOWRAP },
|
|
|
|
{ eCSSKeyword_wrap, NS_STYLE_FLEX_WRAP_WRAP },
|
|
|
|
{ eCSSKeyword_wrap_reverse, NS_STYLE_FLEX_WRAP_WRAP_REVERSE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-12-05 22:57:50 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kHyphensKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_HYPHENS_NONE },
|
|
|
|
{ eCSSKeyword_manual, NS_STYLE_HYPHENS_MANUAL },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_HYPHENS_AUTO },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-11-06 02:14:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
KTableEntry nsCSSProps::kFloatKTable[] = {
|
2016-08-09 12:32:54 +03:00
|
|
|
{ eCSSKeyword_none, StyleFloat::None_ },
|
|
|
|
{ eCSSKeyword_left, StyleFloat::Left },
|
|
|
|
{ eCSSKeyword_right, StyleFloat::Right },
|
|
|
|
{ eCSSKeyword_inline_start, StyleFloat::InlineStart },
|
|
|
|
{ eCSSKeyword_inline_end, StyleFloat::InlineEnd },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFloatEdgeKTable[] = {
|
2016-07-25 09:26:05 +03:00
|
|
|
{ eCSSKeyword_content_box, uint8_t(StyleFloatEdge::ContentBox) },
|
|
|
|
{ eCSSKeyword_margin_box, uint8_t(StyleFloatEdge::MarginBox) },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2016-01-07 08:02:58 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontDisplayKTable[] = {
|
|
|
|
{ eCSSKeyword_auto, NS_FONT_DISPLAY_AUTO },
|
|
|
|
{ eCSSKeyword_block, NS_FONT_DISPLAY_BLOCK },
|
|
|
|
{ eCSSKeyword_swap, NS_FONT_DISPLAY_SWAP },
|
|
|
|
{ eCSSKeyword_fallback, NS_FONT_DISPLAY_FALLBACK },
|
|
|
|
{ eCSSKeyword_optional, NS_FONT_DISPLAY_OPTIONAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontKTable[] = {
|
2002-05-01 04:17:04 +04:00
|
|
|
// CSS2.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_caption, NS_STYLE_FONT_CAPTION },
|
|
|
|
{ eCSSKeyword_icon, NS_STYLE_FONT_ICON },
|
|
|
|
{ eCSSKeyword_menu, NS_STYLE_FONT_MENU },
|
|
|
|
{ eCSSKeyword_message_box, NS_STYLE_FONT_MESSAGE_BOX },
|
|
|
|
{ eCSSKeyword_small_caption, NS_STYLE_FONT_SMALL_CAPTION },
|
|
|
|
{ eCSSKeyword_status_bar, NS_STYLE_FONT_STATUS_BAR },
|
2002-05-01 04:17:04 +04:00
|
|
|
|
|
|
|
// Proposed for CSS3.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_window, NS_STYLE_FONT_WINDOW },
|
|
|
|
{ eCSSKeyword__moz_document, NS_STYLE_FONT_DOCUMENT },
|
|
|
|
{ eCSSKeyword__moz_workspace, NS_STYLE_FONT_WORKSPACE },
|
|
|
|
{ eCSSKeyword__moz_desktop, NS_STYLE_FONT_DESKTOP },
|
|
|
|
{ eCSSKeyword__moz_info, NS_STYLE_FONT_INFO },
|
|
|
|
{ eCSSKeyword__moz_dialog, NS_STYLE_FONT_DIALOG },
|
|
|
|
{ eCSSKeyword__moz_button, NS_STYLE_FONT_BUTTON },
|
|
|
|
{ eCSSKeyword__moz_pull_down_menu, NS_STYLE_FONT_PULL_DOWN_MENU },
|
|
|
|
{ eCSSKeyword__moz_list, NS_STYLE_FONT_LIST },
|
|
|
|
{ eCSSKeyword__moz_field, NS_STYLE_FONT_FIELD },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontKerningKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_FONT_KERNING_AUTO },
|
|
|
|
{ eCSSKeyword_none, NS_FONT_KERNING_NONE },
|
|
|
|
{ eCSSKeyword_normal, NS_FONT_KERNING_NORMAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontSizeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_xx_small, NS_STYLE_FONT_SIZE_XXSMALL },
|
|
|
|
{ eCSSKeyword_x_small, NS_STYLE_FONT_SIZE_XSMALL },
|
|
|
|
{ eCSSKeyword_small, NS_STYLE_FONT_SIZE_SMALL },
|
|
|
|
{ eCSSKeyword_medium, NS_STYLE_FONT_SIZE_MEDIUM },
|
|
|
|
{ eCSSKeyword_large, NS_STYLE_FONT_SIZE_LARGE },
|
|
|
|
{ eCSSKeyword_x_large, NS_STYLE_FONT_SIZE_XLARGE },
|
|
|
|
{ eCSSKeyword_xx_large, NS_STYLE_FONT_SIZE_XXLARGE },
|
|
|
|
{ eCSSKeyword_larger, NS_STYLE_FONT_SIZE_LARGER },
|
|
|
|
{ eCSSKeyword_smaller, NS_STYLE_FONT_SIZE_SMALLER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontSmoothingKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_FONT_SMOOTHING_AUTO },
|
|
|
|
{ eCSSKeyword_grayscale, NS_FONT_SMOOTHING_GRAYSCALE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-07-30 00:00:41 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontStretchKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_ultra_condensed, NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED },
|
|
|
|
{ eCSSKeyword_extra_condensed, NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED },
|
|
|
|
{ eCSSKeyword_condensed, NS_STYLE_FONT_STRETCH_CONDENSED },
|
|
|
|
{ eCSSKeyword_semi_condensed, NS_STYLE_FONT_STRETCH_SEMI_CONDENSED },
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_FONT_STRETCH_NORMAL },
|
|
|
|
{ eCSSKeyword_semi_expanded, NS_STYLE_FONT_STRETCH_SEMI_EXPANDED },
|
|
|
|
{ eCSSKeyword_expanded, NS_STYLE_FONT_STRETCH_EXPANDED },
|
|
|
|
{ eCSSKeyword_extra_expanded, NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED },
|
|
|
|
{ eCSSKeyword_ultra_expanded, NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontStyleKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_FONT_STYLE_NORMAL },
|
|
|
|
{ eCSSKeyword_italic, NS_STYLE_FONT_STYLE_ITALIC },
|
|
|
|
{ eCSSKeyword_oblique, NS_STYLE_FONT_STYLE_OBLIQUE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontSynthesisKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_weight, NS_FONT_SYNTHESIS_WEIGHT },
|
|
|
|
{ eCSSKeyword_style, NS_FONT_SYNTHESIS_STYLE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantAlternatesKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_historical_forms, NS_FONT_VARIANT_ALTERNATES_HISTORICAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantAlternatesFuncsKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_stylistic, NS_FONT_VARIANT_ALTERNATES_STYLISTIC },
|
|
|
|
{ eCSSKeyword_styleset, NS_FONT_VARIANT_ALTERNATES_STYLESET },
|
|
|
|
{ eCSSKeyword_character_variant, NS_FONT_VARIANT_ALTERNATES_CHARACTER_VARIANT },
|
|
|
|
{ eCSSKeyword_swash, NS_FONT_VARIANT_ALTERNATES_SWASH },
|
|
|
|
{ eCSSKeyword_ornaments, NS_FONT_VARIANT_ALTERNATES_ORNAMENTS },
|
|
|
|
{ eCSSKeyword_annotation, NS_FONT_VARIANT_ALTERNATES_ANNOTATION },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantCapsKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_small_caps, NS_FONT_VARIANT_CAPS_SMALLCAPS },
|
|
|
|
{ eCSSKeyword_all_small_caps, NS_FONT_VARIANT_CAPS_ALLSMALL },
|
|
|
|
{ eCSSKeyword_petite_caps, NS_FONT_VARIANT_CAPS_PETITECAPS },
|
|
|
|
{ eCSSKeyword_all_petite_caps, NS_FONT_VARIANT_CAPS_ALLPETITE },
|
|
|
|
{ eCSSKeyword_titling_caps, NS_FONT_VARIANT_CAPS_TITLING },
|
|
|
|
{ eCSSKeyword_unicase, NS_FONT_VARIANT_CAPS_UNICASE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantEastAsianKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_jis78, NS_FONT_VARIANT_EAST_ASIAN_JIS78 },
|
|
|
|
{ eCSSKeyword_jis83, NS_FONT_VARIANT_EAST_ASIAN_JIS83 },
|
|
|
|
{ eCSSKeyword_jis90, NS_FONT_VARIANT_EAST_ASIAN_JIS90 },
|
|
|
|
{ eCSSKeyword_jis04, NS_FONT_VARIANT_EAST_ASIAN_JIS04 },
|
|
|
|
{ eCSSKeyword_simplified, NS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED },
|
|
|
|
{ eCSSKeyword_traditional, NS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL },
|
|
|
|
{ eCSSKeyword_full_width, NS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH },
|
|
|
|
{ eCSSKeyword_proportional_width, NS_FONT_VARIANT_EAST_ASIAN_PROP_WIDTH },
|
|
|
|
{ eCSSKeyword_ruby, NS_FONT_VARIANT_EAST_ASIAN_RUBY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantLigaturesKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_common_ligatures, NS_FONT_VARIANT_LIGATURES_COMMON },
|
|
|
|
{ eCSSKeyword_no_common_ligatures, NS_FONT_VARIANT_LIGATURES_NO_COMMON },
|
|
|
|
{ eCSSKeyword_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_DISCRETIONARY },
|
|
|
|
{ eCSSKeyword_no_discretionary_ligatures, NS_FONT_VARIANT_LIGATURES_NO_DISCRETIONARY },
|
|
|
|
{ eCSSKeyword_historical_ligatures, NS_FONT_VARIANT_LIGATURES_HISTORICAL },
|
|
|
|
{ eCSSKeyword_no_historical_ligatures, NS_FONT_VARIANT_LIGATURES_NO_HISTORICAL },
|
|
|
|
{ eCSSKeyword_contextual, NS_FONT_VARIANT_LIGATURES_CONTEXTUAL },
|
|
|
|
{ eCSSKeyword_no_contextual, NS_FONT_VARIANT_LIGATURES_NO_CONTEXTUAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantNumericKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_lining_nums, NS_FONT_VARIANT_NUMERIC_LINING },
|
|
|
|
{ eCSSKeyword_oldstyle_nums, NS_FONT_VARIANT_NUMERIC_OLDSTYLE },
|
|
|
|
{ eCSSKeyword_proportional_nums, NS_FONT_VARIANT_NUMERIC_PROPORTIONAL },
|
|
|
|
{ eCSSKeyword_tabular_nums, NS_FONT_VARIANT_NUMERIC_TABULAR },
|
|
|
|
{ eCSSKeyword_diagonal_fractions, NS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS },
|
|
|
|
{ eCSSKeyword_stacked_fractions, NS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS },
|
|
|
|
{ eCSSKeyword_slashed_zero, NS_FONT_VARIANT_NUMERIC_SLASHZERO },
|
|
|
|
{ eCSSKeyword_ordinal, NS_FONT_VARIANT_NUMERIC_ORDINAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontVariantPositionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_super, NS_FONT_VARIANT_POSITION_SUPER },
|
|
|
|
{ eCSSKeyword_sub, NS_FONT_VARIANT_POSITION_SUB },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-20 06:59:20 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFontWeightKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_FONT_WEIGHT_NORMAL },
|
|
|
|
{ eCSSKeyword_bold, NS_STYLE_FONT_WEIGHT_BOLD },
|
|
|
|
{ eCSSKeyword_bolder, NS_STYLE_FONT_WEIGHT_BOLDER },
|
|
|
|
{ eCSSKeyword_lighter, NS_STYLE_FONT_WEIGHT_LIGHTER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kGridAutoFlowKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_row, NS_STYLE_GRID_AUTO_FLOW_ROW },
|
|
|
|
{ eCSSKeyword_column, NS_STYLE_GRID_AUTO_FLOW_COLUMN },
|
|
|
|
{ eCSSKeyword_dense, NS_STYLE_GRID_AUTO_FLOW_DENSE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-03-11 02:54:16 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kGridTrackBreadthKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_min_content, NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT },
|
|
|
|
{ eCSSKeyword_max_content, NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-03-11 02:54:13 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageOrientationKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_flip, NS_STYLE_IMAGE_ORIENTATION_FLIP },
|
|
|
|
{ eCSSKeyword_from_image, NS_STYLE_IMAGE_ORIENTATION_FROM_IMAGE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-29 02:39:06 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageOrientationFlipKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_flip, NS_STYLE_IMAGE_ORIENTATION_FLIP },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-29 02:39:06 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kIsolationKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_ISOLATION_AUTO },
|
|
|
|
{ eCSSKeyword_isolate, NS_STYLE_ISOLATION_ISOLATE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-10-15 16:13:00 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kIMEModeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_IME_MODE_NORMAL },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_IME_MODE_AUTO },
|
|
|
|
{ eCSSKeyword_active, NS_STYLE_IME_MODE_ACTIVE },
|
|
|
|
{ eCSSKeyword_disabled, NS_STYLE_IME_MODE_DISABLED },
|
|
|
|
{ eCSSKeyword_inactive, NS_STYLE_IME_MODE_INACTIVE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2007-05-16 19:51:37 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kLineHeightKTable[] = {
|
2009-05-19 02:13:12 +04:00
|
|
|
// -moz- prefixed, intended for internal use for single-line controls
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_block_height, NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kListStylePositionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_inside, NS_STYLE_LIST_STYLE_POSITION_INSIDE },
|
|
|
|
{ eCSSKeyword_outside, NS_STYLE_LIST_STYLE_POSITION_OUTSIDE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kListStyleKTable[] = {
|
2014-06-12 05:12:00 +04:00
|
|
|
// none and decimal are not redefinable, so they should not be moved.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_LIST_STYLE_NONE },
|
|
|
|
{ eCSSKeyword_decimal, NS_STYLE_LIST_STYLE_DECIMAL },
|
2014-06-12 05:12:00 +04:00
|
|
|
// the following graphic styles are processed in a different way.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_disc, NS_STYLE_LIST_STYLE_DISC },
|
|
|
|
{ eCSSKeyword_circle, NS_STYLE_LIST_STYLE_CIRCLE },
|
|
|
|
{ eCSSKeyword_square, NS_STYLE_LIST_STYLE_SQUARE },
|
|
|
|
{ eCSSKeyword_disclosure_closed, NS_STYLE_LIST_STYLE_DISCLOSURE_CLOSED },
|
|
|
|
{ eCSSKeyword_disclosure_open, NS_STYLE_LIST_STYLE_DISCLOSURE_OPEN },
|
2014-06-12 05:12:00 +04:00
|
|
|
// the following counter styles require specific algorithms to generate.
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_hebrew, NS_STYLE_LIST_STYLE_HEBREW },
|
|
|
|
{ eCSSKeyword_japanese_informal, NS_STYLE_LIST_STYLE_JAPANESE_INFORMAL },
|
|
|
|
{ eCSSKeyword_japanese_formal, NS_STYLE_LIST_STYLE_JAPANESE_FORMAL },
|
|
|
|
{ eCSSKeyword_korean_hangul_formal, NS_STYLE_LIST_STYLE_KOREAN_HANGUL_FORMAL },
|
|
|
|
{ eCSSKeyword_korean_hanja_informal, NS_STYLE_LIST_STYLE_KOREAN_HANJA_INFORMAL },
|
|
|
|
{ eCSSKeyword_korean_hanja_formal, NS_STYLE_LIST_STYLE_KOREAN_HANJA_FORMAL },
|
|
|
|
{ eCSSKeyword_simp_chinese_informal, NS_STYLE_LIST_STYLE_SIMP_CHINESE_INFORMAL },
|
|
|
|
{ eCSSKeyword_simp_chinese_formal, NS_STYLE_LIST_STYLE_SIMP_CHINESE_FORMAL },
|
|
|
|
{ eCSSKeyword_trad_chinese_informal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL },
|
|
|
|
{ eCSSKeyword_trad_chinese_formal, NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL },
|
|
|
|
{ eCSSKeyword_ethiopic_numeric, NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kMathVariantKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_MATHML_MATHVARIANT_NONE },
|
|
|
|
{ eCSSKeyword_normal, NS_MATHML_MATHVARIANT_NORMAL },
|
|
|
|
{ eCSSKeyword_bold, NS_MATHML_MATHVARIANT_BOLD },
|
|
|
|
{ eCSSKeyword_italic, NS_MATHML_MATHVARIANT_ITALIC },
|
|
|
|
{ eCSSKeyword_bold_italic, NS_MATHML_MATHVARIANT_BOLD_ITALIC },
|
|
|
|
{ eCSSKeyword_script, NS_MATHML_MATHVARIANT_SCRIPT },
|
|
|
|
{ eCSSKeyword_bold_script, NS_MATHML_MATHVARIANT_BOLD_SCRIPT },
|
|
|
|
{ eCSSKeyword_fraktur, NS_MATHML_MATHVARIANT_FRAKTUR },
|
|
|
|
{ eCSSKeyword_double_struck, NS_MATHML_MATHVARIANT_DOUBLE_STRUCK },
|
|
|
|
{ eCSSKeyword_bold_fraktur, NS_MATHML_MATHVARIANT_BOLD_FRAKTUR },
|
|
|
|
{ eCSSKeyword_sans_serif, NS_MATHML_MATHVARIANT_SANS_SERIF },
|
|
|
|
{ eCSSKeyword_bold_sans_serif, NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF },
|
|
|
|
{ eCSSKeyword_sans_serif_italic, NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC },
|
|
|
|
{ eCSSKeyword_sans_serif_bold_italic, NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC },
|
|
|
|
{ eCSSKeyword_monospace, NS_MATHML_MATHVARIANT_MONOSPACE },
|
|
|
|
{ eCSSKeyword_initial, NS_MATHML_MATHVARIANT_INITIAL },
|
|
|
|
{ eCSSKeyword_tailed, NS_MATHML_MATHVARIANT_TAILED },
|
|
|
|
{ eCSSKeyword_looped, NS_MATHML_MATHVARIANT_LOOPED },
|
|
|
|
{ eCSSKeyword_stretched, NS_MATHML_MATHVARIANT_STRETCHED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-12-02 20:49:00 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kMathDisplayKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_inline, NS_MATHML_DISPLAYSTYLE_INLINE },
|
|
|
|
{ eCSSKeyword_block, NS_MATHML_DISPLAYSTYLE_BLOCK },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-01-14 18:39:50 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kContainKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_CONTAIN_NONE },
|
|
|
|
{ eCSSKeyword_strict, NS_STYLE_CONTAIN_STRICT },
|
|
|
|
{ eCSSKeyword_layout, NS_STYLE_CONTAIN_LAYOUT },
|
|
|
|
{ eCSSKeyword_style, NS_STYLE_CONTAIN_STYLE },
|
|
|
|
{ eCSSKeyword_paint, NS_STYLE_CONTAIN_PAINT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-06-04 17:38:00 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kContextOpacityKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_context_fill_opacity, NS_STYLE_CONTEXT_FILL_OPACITY },
|
|
|
|
{ eCSSKeyword_context_stroke_opacity, NS_STYLE_CONTEXT_STROKE_OPACITY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-09-06 08:58:46 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kContextPatternKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_context_fill, NS_COLOR_CONTEXT_FILL },
|
|
|
|
{ eCSSKeyword_context_stroke, NS_COLOR_CONTEXT_STROKE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-09-06 08:58:46 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kObjectFitKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_fill, NS_STYLE_OBJECT_FIT_FILL },
|
|
|
|
{ eCSSKeyword_contain, NS_STYLE_OBJECT_FIT_CONTAIN },
|
|
|
|
{ eCSSKeyword_cover, NS_STYLE_OBJECT_FIT_COVER },
|
|
|
|
{ eCSSKeyword_none, NS_STYLE_OBJECT_FIT_NONE },
|
|
|
|
{ eCSSKeyword_scale_down, NS_STYLE_OBJECT_FIT_SCALE_DOWN },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-09-10 05:09:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOrientKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_inline, NS_STYLE_ORIENT_INLINE },
|
|
|
|
{ eCSSKeyword_block, NS_STYLE_ORIENT_BLOCK },
|
|
|
|
{ eCSSKeyword_horizontal, NS_STYLE_ORIENT_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_vertical, NS_STYLE_ORIENT_VERTICAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-05-10 17:47:46 +04:00
|
|
|
};
|
|
|
|
|
2005-03-27 15:36:08 +04:00
|
|
|
// Same as kBorderStyleKTable except 'hidden'.
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOutlineStyleKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_BORDER_STYLE_NONE },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_BORDER_STYLE_AUTO },
|
|
|
|
{ eCSSKeyword_dotted, NS_STYLE_BORDER_STYLE_DOTTED },
|
|
|
|
{ eCSSKeyword_dashed, NS_STYLE_BORDER_STYLE_DASHED },
|
|
|
|
{ eCSSKeyword_solid, NS_STYLE_BORDER_STYLE_SOLID },
|
|
|
|
{ eCSSKeyword_double, NS_STYLE_BORDER_STYLE_DOUBLE },
|
|
|
|
{ eCSSKeyword_groove, NS_STYLE_BORDER_STYLE_GROOVE },
|
|
|
|
{ eCSSKeyword_ridge, NS_STYLE_BORDER_STYLE_RIDGE },
|
|
|
|
{ eCSSKeyword_inset, NS_STYLE_BORDER_STYLE_INSET },
|
|
|
|
{ eCSSKeyword_outset, NS_STYLE_BORDER_STYLE_OUTSET },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2005-03-27 15:36:08 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOutlineColorKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_use_text_color, NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOverflowKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_OVERFLOW_AUTO },
|
|
|
|
{ eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE },
|
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN },
|
|
|
|
{ eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL },
|
2004-09-05 04:04:04 +04:00
|
|
|
// Deprecated:
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_scrollbars_none, NS_STYLE_OVERFLOW_HIDDEN },
|
|
|
|
{ eCSSKeyword__moz_scrollbars_horizontal, NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL },
|
|
|
|
{ eCSSKeyword__moz_scrollbars_vertical, NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL },
|
|
|
|
{ eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOverflowClipBoxKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_padding_box, NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX },
|
|
|
|
{ eCSSKeyword_content_box, NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-02-22 05:18:23 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kOverflowSubKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_OVERFLOW_AUTO },
|
|
|
|
{ eCSSKeyword_visible, NS_STYLE_OVERFLOW_VISIBLE },
|
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_OVERFLOW_HIDDEN },
|
|
|
|
{ eCSSKeyword_scroll, NS_STYLE_OVERFLOW_SCROLL },
|
2004-09-05 04:04:04 +04:00
|
|
|
// Deprecated:
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_hidden_unscrollable, NS_STYLE_OVERFLOW_CLIP },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2004-09-05 04:04:04 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kPageBreakKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_PAGE_BREAK_AUTO },
|
|
|
|
{ eCSSKeyword_always, NS_STYLE_PAGE_BREAK_ALWAYS },
|
|
|
|
{ eCSSKeyword_avoid, NS_STYLE_PAGE_BREAK_AVOID },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_PAGE_BREAK_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_PAGE_BREAK_RIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kPageBreakInsideKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_PAGE_BREAK_AUTO },
|
|
|
|
{ eCSSKeyword_avoid, NS_STYLE_PAGE_BREAK_AVOID },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kPageMarksKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_PAGE_MARKS_NONE },
|
|
|
|
{ eCSSKeyword_crop, NS_STYLE_PAGE_MARKS_CROP },
|
|
|
|
{ eCSSKeyword_cross, NS_STYLE_PAGE_MARKS_REGISTER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kPageSizeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_landscape, NS_STYLE_PAGE_SIZE_LANDSCAPE },
|
|
|
|
{ eCSSKeyword_portrait, NS_STYLE_PAGE_SIZE_PORTRAIT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kPointerEventsKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_POINTER_EVENTS_NONE },
|
|
|
|
{ eCSSKeyword_visiblepainted, NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED },
|
|
|
|
{ eCSSKeyword_visiblefill, NS_STYLE_POINTER_EVENTS_VISIBLEFILL },
|
|
|
|
{ eCSSKeyword_visiblestroke, NS_STYLE_POINTER_EVENTS_VISIBLESTROKE },
|
|
|
|
{ eCSSKeyword_visible, NS_STYLE_POINTER_EVENTS_VISIBLE },
|
|
|
|
{ eCSSKeyword_painted, NS_STYLE_POINTER_EVENTS_PAINTED },
|
|
|
|
{ eCSSKeyword_fill, NS_STYLE_POINTER_EVENTS_FILL },
|
|
|
|
{ eCSSKeyword_stroke, NS_STYLE_POINTER_EVENTS_STROKE },
|
|
|
|
{ eCSSKeyword_all, NS_STYLE_POINTER_EVENTS_ALL },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_POINTER_EVENTS_AUTO },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-08-27 07:53:35 +04:00
|
|
|
};
|
|
|
|
|
2016-03-21 09:06:53 +03:00
|
|
|
const KTableEntry nsCSSProps::kPositionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_static, NS_STYLE_POSITION_STATIC },
|
|
|
|
{ eCSSKeyword_relative, NS_STYLE_POSITION_RELATIVE },
|
|
|
|
{ eCSSKeyword_absolute, NS_STYLE_POSITION_ABSOLUTE },
|
|
|
|
{ eCSSKeyword_fixed, NS_STYLE_POSITION_FIXED },
|
|
|
|
{ eCSSKeyword_sticky, NS_STYLE_POSITION_STICKY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kRadialGradientShapeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_circle, NS_STYLE_GRADIENT_SHAPE_CIRCULAR },
|
|
|
|
{ eCSSKeyword_ellipse, NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-11-02 22:36:43 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kRadialGradientSizeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_closest_side, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE },
|
|
|
|
{ eCSSKeyword_closest_corner, NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER },
|
|
|
|
{ eCSSKeyword_farthest_side, NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE },
|
|
|
|
{ eCSSKeyword_farthest_corner, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-07-07 18:27:08 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kRadialGradientLegacySizeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_closest_side, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE },
|
|
|
|
{ eCSSKeyword_closest_corner, NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER },
|
|
|
|
{ eCSSKeyword_farthest_side, NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE },
|
|
|
|
{ eCSSKeyword_farthest_corner, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER },
|
2015-07-15 17:37:22 +03:00
|
|
|
// synonyms
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_contain, NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE },
|
|
|
|
{ eCSSKeyword_cover, NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-07-15 17:37:22 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kResizeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_RESIZE_NONE },
|
|
|
|
{ eCSSKeyword_both, NS_STYLE_RESIZE_BOTH },
|
|
|
|
{ eCSSKeyword_horizontal, NS_STYLE_RESIZE_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_vertical, NS_STYLE_RESIZE_VERTICAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2010-03-19 14:49:33 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kRubyAlignKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_RUBY_ALIGN_START },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_RUBY_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_space_between, NS_STYLE_RUBY_ALIGN_SPACE_BETWEEN },
|
|
|
|
{ eCSSKeyword_space_around, NS_STYLE_RUBY_ALIGN_SPACE_AROUND },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-02-17 08:01:49 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kRubyPositionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_over, NS_STYLE_RUBY_POSITION_OVER },
|
|
|
|
{ eCSSKeyword_under, NS_STYLE_RUBY_POSITION_UNDER },
|
2014-12-09 09:47:18 +03:00
|
|
|
// bug 1055672 for 'inter-character' support
|
2015-11-20 05:08:57 +03:00
|
|
|
// { eCSSKeyword_inter_character, NS_STYLE_RUBY_POSITION_INTER_CHARACTER },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-12-09 09:47:18 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kScrollBehaviorKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_SCROLL_BEHAVIOR_AUTO },
|
|
|
|
{ eCSSKeyword_smooth, NS_STYLE_SCROLL_BEHAVIOR_SMOOTH },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-09-15 23:29:58 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kScrollSnapTypeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_SCROLL_SNAP_TYPE_NONE },
|
|
|
|
{ eCSSKeyword_mandatory, NS_STYLE_SCROLL_SNAP_TYPE_MANDATORY },
|
|
|
|
{ eCSSKeyword_proximity, NS_STYLE_SCROLL_SNAP_TYPE_PROXIMITY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-02-04 05:54:22 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kStackSizingKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_ignore, NS_STYLE_STACK_SIZING_IGNORE },
|
|
|
|
{ eCSSKeyword_stretch_to_fit, NS_STYLE_STACK_SIZING_STRETCH_TO_FIT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2008-06-05 10:46:24 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTableLayoutKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_TABLE_LAYOUT_AUTO },
|
|
|
|
{ eCSSKeyword_fixed, NS_STYLE_TABLE_LAYOUT_FIXED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
KTableEntry nsCSSProps::kTextAlignKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_TEXT_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_justify, NS_STYLE_TEXT_ALIGN_JUSTIFY },
|
|
|
|
{ eCSSKeyword__moz_center, NS_STYLE_TEXT_ALIGN_MOZ_CENTER },
|
|
|
|
{ eCSSKeyword__moz_right, NS_STYLE_TEXT_ALIGN_MOZ_RIGHT },
|
|
|
|
{ eCSSKeyword__moz_left, NS_STYLE_TEXT_ALIGN_MOZ_LEFT },
|
2016-05-11 07:03:34 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_START },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END },
|
2016-02-24 21:40:30 +03:00
|
|
|
{ eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_UNSAFE },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_match_parent, NS_STYLE_TEXT_ALIGN_MATCH_PARENT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
KTableEntry nsCSSProps::kTextAlignLastKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_TEXT_ALIGN_AUTO },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_TEXT_ALIGN_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_TEXT_ALIGN_RIGHT },
|
|
|
|
{ eCSSKeyword_center, NS_STYLE_TEXT_ALIGN_CENTER },
|
|
|
|
{ eCSSKeyword_justify, NS_STYLE_TEXT_ALIGN_JUSTIFY },
|
2016-05-11 07:03:34 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_TEXT_ALIGN_START },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_end, NS_STYLE_TEXT_ALIGN_END },
|
2016-02-24 21:40:30 +03:00
|
|
|
{ eCSSKeyword_unsafe, NS_STYLE_TEXT_ALIGN_UNSAFE },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-01-12 21:52:21 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextCombineUprightKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE },
|
|
|
|
{ eCSSKeyword_all, NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL },
|
|
|
|
{ eCSSKeyword_digits, NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2 }, // w/o number ==> 2
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-19 14:26:44 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextDecorationLineKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_TEXT_DECORATION_LINE_NONE },
|
|
|
|
{ eCSSKeyword_underline, NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE },
|
|
|
|
{ eCSSKeyword_overline, NS_STYLE_TEXT_DECORATION_LINE_OVERLINE },
|
|
|
|
{ eCSSKeyword_line_through, NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH },
|
|
|
|
{ eCSSKeyword_blink, NS_STYLE_TEXT_DECORATION_LINE_BLINK },
|
|
|
|
{ eCSSKeyword__moz_anchor_decoration, NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextDecorationStyleKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_none, NS_STYLE_TEXT_DECORATION_STYLE_NONE },
|
|
|
|
{ eCSSKeyword_solid, NS_STYLE_TEXT_DECORATION_STYLE_SOLID },
|
|
|
|
{ eCSSKeyword_double, NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE },
|
|
|
|
{ eCSSKeyword_dotted, NS_STYLE_TEXT_DECORATION_STYLE_DOTTED },
|
|
|
|
{ eCSSKeyword_dashed, NS_STYLE_TEXT_DECORATION_STYLE_DASHED },
|
|
|
|
{ eCSSKeyword_wavy, NS_STYLE_TEXT_DECORATION_STYLE_WAVY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-03-31 16:26:35 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextOrientationKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_mixed, NS_STYLE_TEXT_ORIENTATION_MIXED },
|
|
|
|
{ eCSSKeyword_upright, NS_STYLE_TEXT_ORIENTATION_UPRIGHT },
|
|
|
|
{ eCSSKeyword_sideways, NS_STYLE_TEXT_ORIENTATION_SIDEWAYS },
|
|
|
|
{ eCSSKeyword_sideways_right, NS_STYLE_TEXT_ORIENTATION_SIDEWAYS },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-19 14:26:44 +04:00
|
|
|
};
|
|
|
|
|
2015-11-28 03:56:33 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextEmphasisPositionKTable[] = {
|
|
|
|
{ eCSSKeyword_over, NS_STYLE_TEXT_EMPHASIS_POSITION_OVER },
|
|
|
|
{ eCSSKeyword_under, NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER },
|
|
|
|
{ eCSSKeyword_left, NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT },
|
|
|
|
{ eCSSKeyword_right, NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kTextEmphasisStyleFillKTable[] = {
|
|
|
|
{ eCSSKeyword_filled, NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED },
|
|
|
|
{ eCSSKeyword_open, NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
|
|
|
const KTableEntry nsCSSProps::kTextEmphasisStyleShapeKTable[] = {
|
|
|
|
{ eCSSKeyword_dot, NS_STYLE_TEXT_EMPHASIS_STYLE_DOT },
|
|
|
|
{ eCSSKeyword_circle, NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE },
|
|
|
|
{ eCSSKeyword_double_circle, NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE },
|
|
|
|
{ eCSSKeyword_triangle, NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE },
|
|
|
|
{ eCSSKeyword_sesame, NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME} ,
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextOverflowKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_clip, NS_STYLE_TEXT_OVERFLOW_CLIP },
|
|
|
|
{ eCSSKeyword_ellipsis, NS_STYLE_TEXT_OVERFLOW_ELLIPSIS },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2011-06-22 22:11:47 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextTransformKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_TEXT_TRANSFORM_NONE },
|
|
|
|
{ eCSSKeyword_capitalize, NS_STYLE_TEXT_TRANSFORM_CAPITALIZE },
|
|
|
|
{ eCSSKeyword_lowercase, NS_STYLE_TEXT_TRANSFORM_LOWERCASE },
|
|
|
|
{ eCSSKeyword_uppercase, NS_STYLE_TEXT_TRANSFORM_UPPERCASE },
|
2016-05-04 00:32:00 +03:00
|
|
|
{ eCSSKeyword_full_width, NS_STYLE_TEXT_TRANSFORM_FULL_WIDTH },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTouchActionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_TOUCH_ACTION_NONE },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_TOUCH_ACTION_AUTO },
|
|
|
|
{ eCSSKeyword_pan_x, NS_STYLE_TOUCH_ACTION_PAN_X },
|
|
|
|
{ eCSSKeyword_pan_y, NS_STYLE_TOUCH_ACTION_PAN_Y },
|
|
|
|
{ eCSSKeyword_manipulation, NS_STYLE_TOUCH_ACTION_MANIPULATION },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-01-15 19:03:15 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTopLayerKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_TOP_LAYER_NONE },
|
|
|
|
{ eCSSKeyword_top, NS_STYLE_TOP_LAYER_TOP },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-10-07 06:04:32 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTransformBoxKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_border_box, NS_STYLE_TRANSFORM_BOX_BORDER_BOX },
|
|
|
|
{ eCSSKeyword_fill_box, NS_STYLE_TRANSFORM_BOX_FILL_BOX },
|
|
|
|
{ eCSSKeyword_view_box, NS_STYLE_TRANSFORM_BOX_VIEW_BOX },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2015-05-16 00:43:25 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTransitionTimingFunctionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_ease, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE },
|
|
|
|
{ eCSSKeyword_linear, NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR },
|
|
|
|
{ eCSSKeyword_ease_in, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN },
|
|
|
|
{ eCSSKeyword_ease_out, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT },
|
|
|
|
{ eCSSKeyword_ease_in_out, NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT },
|
|
|
|
{ eCSSKeyword_step_start, NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START },
|
|
|
|
{ eCSSKeyword_step_end, NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-08-21 01:52:47 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kUnicodeBidiKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_UNICODE_BIDI_NORMAL },
|
|
|
|
{ eCSSKeyword_embed, NS_STYLE_UNICODE_BIDI_EMBED },
|
2016-04-22 03:37:21 +03:00
|
|
|
{ eCSSKeyword_bidi_override, NS_STYLE_UNICODE_BIDI_BIDI_OVERRIDE },
|
2015-08-28 10:50:04 +03:00
|
|
|
{ eCSSKeyword_isolate, NS_STYLE_UNICODE_BIDI_ISOLATE },
|
|
|
|
{ eCSSKeyword_isolate_override, NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE },
|
|
|
|
{ eCSSKeyword_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_isolate, NS_STYLE_UNICODE_BIDI_ISOLATE },
|
|
|
|
{ eCSSKeyword__moz_isolate_override, NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE },
|
|
|
|
{ eCSSKeyword__moz_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kUserFocusKTable[] = {
|
2016-07-25 09:26:40 +03:00
|
|
|
{ eCSSKeyword_none, uint8_t(StyleUserFocus::None_) },
|
|
|
|
{ eCSSKeyword_normal, uint8_t(StyleUserFocus::Normal) },
|
|
|
|
{ eCSSKeyword_ignore, uint8_t(StyleUserFocus::Ignore) },
|
|
|
|
{ eCSSKeyword_select_all, uint8_t(StyleUserFocus::SelectAll) },
|
|
|
|
{ eCSSKeyword_select_before, uint8_t(StyleUserFocus::SelectBefore) },
|
|
|
|
{ eCSSKeyword_select_after, uint8_t(StyleUserFocus::SelectAfter) },
|
|
|
|
{ eCSSKeyword_select_same, uint8_t(StyleUserFocus::SelectSame) },
|
|
|
|
{ eCSSKeyword_select_menu, uint8_t(StyleUserFocus::SelectMenu) },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-09-04 03:40:35 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kUserInputKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_USER_INPUT_NONE },
|
|
|
|
{ eCSSKeyword_auto, NS_STYLE_USER_INPUT_AUTO },
|
|
|
|
{ eCSSKeyword_enabled, NS_STYLE_USER_INPUT_ENABLED },
|
|
|
|
{ eCSSKeyword_disabled, NS_STYLE_USER_INPUT_DISABLED },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kUserModifyKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_read_only, NS_STYLE_USER_MODIFY_READ_ONLY },
|
|
|
|
{ eCSSKeyword_read_write, NS_STYLE_USER_MODIFY_READ_WRITE },
|
|
|
|
{ eCSSKeyword_write_only, NS_STYLE_USER_MODIFY_WRITE_ONLY },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-09-04 03:40:35 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kUserSelectKTable[] = {
|
2016-08-10 19:12:21 +03:00
|
|
|
{ eCSSKeyword_none, StyleUserSelect::None_ },
|
|
|
|
{ eCSSKeyword_auto, StyleUserSelect::Auto },
|
|
|
|
{ eCSSKeyword_text, StyleUserSelect::Text },
|
|
|
|
{ eCSSKeyword_element, StyleUserSelect::Element },
|
|
|
|
{ eCSSKeyword_elements, StyleUserSelect::Elements },
|
|
|
|
{ eCSSKeyword_all, StyleUserSelect::All },
|
|
|
|
{ eCSSKeyword_toggle, StyleUserSelect::Toggle },
|
|
|
|
{ eCSSKeyword_tri_state, StyleUserSelect::TriState },
|
|
|
|
{ eCSSKeyword__moz_all, StyleUserSelect::MozAll },
|
|
|
|
{ eCSSKeyword__moz_none, StyleUserSelect::None_ },
|
|
|
|
{ eCSSKeyword__moz_text, StyleUserSelect::MozText },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-09-04 03:40:35 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kVerticalAlignKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_baseline, NS_STYLE_VERTICAL_ALIGN_BASELINE },
|
|
|
|
{ eCSSKeyword_sub, NS_STYLE_VERTICAL_ALIGN_SUB },
|
|
|
|
{ eCSSKeyword_super, NS_STYLE_VERTICAL_ALIGN_SUPER },
|
|
|
|
{ eCSSKeyword_top, NS_STYLE_VERTICAL_ALIGN_TOP },
|
|
|
|
{ eCSSKeyword_text_top, NS_STYLE_VERTICAL_ALIGN_TEXT_TOP },
|
|
|
|
{ eCSSKeyword_middle, NS_STYLE_VERTICAL_ALIGN_MIDDLE },
|
|
|
|
{ eCSSKeyword__moz_middle_with_baseline, NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE },
|
|
|
|
{ eCSSKeyword_bottom, NS_STYLE_VERTICAL_ALIGN_BOTTOM },
|
|
|
|
{ eCSSKeyword_text_bottom, NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kVisibilityKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_visible, NS_STYLE_VISIBILITY_VISIBLE },
|
|
|
|
{ eCSSKeyword_hidden, NS_STYLE_VISIBILITY_HIDDEN },
|
|
|
|
{ eCSSKeyword_collapse, NS_STYLE_VISIBILITY_COLLAPSE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWhitespaceKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_WHITESPACE_NORMAL },
|
|
|
|
{ eCSSKeyword_pre, NS_STYLE_WHITESPACE_PRE },
|
|
|
|
{ eCSSKeyword_nowrap, NS_STYLE_WHITESPACE_NOWRAP },
|
|
|
|
{ eCSSKeyword_pre_wrap, NS_STYLE_WHITESPACE_PRE_WRAP },
|
|
|
|
{ eCSSKeyword_pre_line, NS_STYLE_WHITESPACE_PRE_LINE },
|
|
|
|
{ eCSSKeyword__moz_pre_space, NS_STYLE_WHITESPACE_PRE_SPACE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWidthKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword__moz_max_content, NS_STYLE_WIDTH_MAX_CONTENT },
|
|
|
|
{ eCSSKeyword__moz_min_content, NS_STYLE_WIDTH_MIN_CONTENT },
|
|
|
|
{ eCSSKeyword__moz_fit_content, NS_STYLE_WIDTH_FIT_CONTENT },
|
|
|
|
{ eCSSKeyword__moz_available, NS_STYLE_WIDTH_AVAILABLE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2007-05-04 03:11:00 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWindowDraggingKTable[] = {
|
2016-01-27 13:58:33 +03:00
|
|
|
{ eCSSKeyword_default, NS_STYLE_WINDOW_DRAGGING_DEFAULT },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_drag, NS_STYLE_WINDOW_DRAGGING_DRAG },
|
|
|
|
{ eCSSKeyword_no_drag, NS_STYLE_WINDOW_DRAGGING_NO_DRAG },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-09-18 12:52:25 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWindowShadowKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_WINDOW_SHADOW_NONE },
|
|
|
|
{ eCSSKeyword_default, NS_STYLE_WINDOW_SHADOW_DEFAULT },
|
|
|
|
{ eCSSKeyword_menu, NS_STYLE_WINDOW_SHADOW_MENU },
|
|
|
|
{ eCSSKeyword_tooltip, NS_STYLE_WINDOW_SHADOW_TOOLTIP },
|
|
|
|
{ eCSSKeyword_sheet, NS_STYLE_WINDOW_SHADOW_SHEET },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2008-10-14 18:44:25 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWordBreakKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_normal, NS_STYLE_WORDBREAK_NORMAL },
|
|
|
|
{ eCSSKeyword_break_all, NS_STYLE_WORDBREAK_BREAK_ALL },
|
|
|
|
{ eCSSKeyword_keep_all, NS_STYLE_WORDBREAK_KEEP_ALL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-05-07 23:18:23 +04:00
|
|
|
};
|
|
|
|
|
2016-05-24 03:27:21 +03:00
|
|
|
const KTableEntry nsCSSProps::kOverflowWrapKTable[] = {
|
|
|
|
{ eCSSKeyword_normal, NS_STYLE_OVERFLOWWRAP_NORMAL },
|
|
|
|
{ eCSSKeyword_break_word, NS_STYLE_OVERFLOWWRAP_BREAK_WORD },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2008-07-24 11:16:18 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kWritingModeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_horizontal_tb, NS_STYLE_WRITING_MODE_HORIZONTAL_TB },
|
|
|
|
{ eCSSKeyword_vertical_lr, NS_STYLE_WRITING_MODE_VERTICAL_LR },
|
|
|
|
{ eCSSKeyword_vertical_rl, NS_STYLE_WRITING_MODE_VERTICAL_RL },
|
|
|
|
{ eCSSKeyword_sideways_lr, NS_STYLE_WRITING_MODE_SIDEWAYS_LR },
|
|
|
|
{ eCSSKeyword_sideways_rl, NS_STYLE_WRITING_MODE_SIDEWAYS_RL },
|
|
|
|
{ eCSSKeyword_lr, NS_STYLE_WRITING_MODE_HORIZONTAL_TB },
|
|
|
|
{ eCSSKeyword_lr_tb, NS_STYLE_WRITING_MODE_HORIZONTAL_TB },
|
|
|
|
{ eCSSKeyword_rl, NS_STYLE_WRITING_MODE_HORIZONTAL_TB },
|
|
|
|
{ eCSSKeyword_rl_tb, NS_STYLE_WRITING_MODE_HORIZONTAL_TB },
|
|
|
|
{ eCSSKeyword_tb, NS_STYLE_WRITING_MODE_VERTICAL_RL },
|
|
|
|
{ eCSSKeyword_tb_rl, NS_STYLE_WRITING_MODE_VERTICAL_RL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-05-28 20:00:49 +04:00
|
|
|
};
|
|
|
|
|
2001-03-06 05:27:50 +03:00
|
|
|
// Specific keyword tables for XUL.properties
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxAlignKTable[] = {
|
2016-08-26 10:09:19 +03:00
|
|
|
{ eCSSKeyword_stretch, StyleBoxAlign::Stretch },
|
|
|
|
{ eCSSKeyword_start, StyleBoxAlign::Start },
|
|
|
|
{ eCSSKeyword_center, StyleBoxAlign::Center },
|
|
|
|
{ eCSSKeyword_baseline, StyleBoxAlign::Baseline },
|
|
|
|
{ eCSSKeyword_end, StyleBoxAlign::End },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-08-02 04:09:27 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxDirectionKTable[] = {
|
2016-08-26 10:17:09 +03:00
|
|
|
{ eCSSKeyword_normal, StyleBoxDirection::Normal },
|
|
|
|
{ eCSSKeyword_reverse, StyleBoxDirection::Reverse },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-08-02 04:09:27 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxOrientKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_horizontal, NS_STYLE_BOX_ORIENT_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_vertical, NS_STYLE_BOX_ORIENT_VERTICAL },
|
|
|
|
{ eCSSKeyword_inline_axis, NS_STYLE_BOX_ORIENT_HORIZONTAL },
|
|
|
|
{ eCSSKeyword_block_axis, NS_STYLE_BOX_ORIENT_VERTICAL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-03-06 05:27:50 +03:00
|
|
|
};
|
2001-08-02 04:09:27 +04:00
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kBoxPackKTable[] = {
|
2016-08-26 10:11:54 +03:00
|
|
|
{ eCSSKeyword_start, StyleBoxPack::Start },
|
|
|
|
{ eCSSKeyword_center, StyleBoxPack::Center },
|
|
|
|
{ eCSSKeyword_end, StyleBoxPack::End },
|
|
|
|
{ eCSSKeyword_justify, StyleBoxPack::Justify },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-08-02 04:09:27 +04:00
|
|
|
};
|
2001-03-06 05:27:50 +03:00
|
|
|
|
2001-12-12 10:59:31 +03:00
|
|
|
// keyword tables for SVG properties
|
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
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kDominantBaselineKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_DOMINANT_BASELINE_AUTO },
|
|
|
|
{ eCSSKeyword_use_script, NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT },
|
|
|
|
{ eCSSKeyword_no_change, NS_STYLE_DOMINANT_BASELINE_NO_CHANGE },
|
|
|
|
{ eCSSKeyword_reset_size, NS_STYLE_DOMINANT_BASELINE_RESET_SIZE },
|
|
|
|
{ eCSSKeyword_alphabetic, NS_STYLE_DOMINANT_BASELINE_ALPHABETIC },
|
|
|
|
{ eCSSKeyword_hanging, NS_STYLE_DOMINANT_BASELINE_HANGING },
|
|
|
|
{ eCSSKeyword_ideographic, NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC },
|
|
|
|
{ eCSSKeyword_mathematical, NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL },
|
|
|
|
{ eCSSKeyword_central, NS_STYLE_DOMINANT_BASELINE_CENTRAL },
|
|
|
|
{ eCSSKeyword_middle, NS_STYLE_DOMINANT_BASELINE_MIDDLE },
|
|
|
|
{ eCSSKeyword_text_after_edge, NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE },
|
|
|
|
{ eCSSKeyword_text_before_edge, NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
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
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFillRuleKTable[] = {
|
2016-08-17 09:43:26 +03:00
|
|
|
{ eCSSKeyword_nonzero, StyleFillRule::Nonzero },
|
|
|
|
{ eCSSKeyword_evenodd, StyleFillRule::Evenodd },
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-12-12 10:59:31 +03:00
|
|
|
};
|
|
|
|
|
2016-07-28 08:45:43 +03:00
|
|
|
const KTableEntry nsCSSProps::kClipPathGeometryBoxKTable[] = {
|
|
|
|
{ eCSSKeyword_content_box, StyleClipPathGeometryBox::Content },
|
|
|
|
{ eCSSKeyword_padding_box, StyleClipPathGeometryBox::Padding },
|
|
|
|
{ eCSSKeyword_border_box, StyleClipPathGeometryBox::Border },
|
|
|
|
{ eCSSKeyword_margin_box, StyleClipPathGeometryBox::Margin },
|
|
|
|
{ eCSSKeyword_fill_box, StyleClipPathGeometryBox::Fill },
|
|
|
|
{ eCSSKeyword_stroke_box, StyleClipPathGeometryBox::Stroke },
|
|
|
|
{ eCSSKeyword_view_box, StyleClipPathGeometryBox::View },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-09-28 03:56:00 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kShapeRadiusKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_closest_side, NS_RADIUS_CLOSEST_SIDE },
|
|
|
|
{ eCSSKeyword_farthest_side, NS_RADIUS_FARTHEST_SIDE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2014-10-15 02:03:00 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kFilterFunctionKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_blur, NS_STYLE_FILTER_BLUR },
|
|
|
|
{ eCSSKeyword_brightness, NS_STYLE_FILTER_BRIGHTNESS },
|
|
|
|
{ eCSSKeyword_contrast, NS_STYLE_FILTER_CONTRAST },
|
|
|
|
{ eCSSKeyword_grayscale, NS_STYLE_FILTER_GRAYSCALE },
|
|
|
|
{ eCSSKeyword_invert, NS_STYLE_FILTER_INVERT },
|
|
|
|
{ eCSSKeyword_opacity, NS_STYLE_FILTER_OPACITY },
|
|
|
|
{ eCSSKeyword_saturate, NS_STYLE_FILTER_SATURATE },
|
|
|
|
{ eCSSKeyword_sepia, NS_STYLE_FILTER_SEPIA },
|
|
|
|
{ eCSSKeyword_hue_rotate, NS_STYLE_FILTER_HUE_ROTATE },
|
|
|
|
{ eCSSKeyword_drop_shadow, NS_STYLE_FILTER_DROP_SHADOW },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2013-08-06 11:53:30 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kImageRenderingKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_IMAGE_RENDERING_AUTO },
|
|
|
|
{ eCSSKeyword_optimizespeed, NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED },
|
|
|
|
{ eCSSKeyword_optimizequality, NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY },
|
|
|
|
{ eCSSKeyword__moz_crisp_edges, NS_STYLE_IMAGE_RENDERING_CRISPEDGES },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2009-03-21 18:36:38 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kMaskTypeKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_luminance, NS_STYLE_MASK_TYPE_LUMINANCE },
|
|
|
|
{ eCSSKeyword_alpha, NS_STYLE_MASK_TYPE_ALPHA },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-12-21 04:15:22 +04:00
|
|
|
};
|
|
|
|
|
2016-07-22 10:40:01 +03:00
|
|
|
const KTableEntry nsCSSProps::kShapeOutsideShapeBoxKTable[] = {
|
|
|
|
{ eCSSKeyword_content_box, StyleShapeOutsideShapeBox::Content },
|
|
|
|
{ eCSSKeyword_padding_box, StyleShapeOutsideShapeBox::Padding },
|
|
|
|
{ eCSSKeyword_border_box, StyleShapeOutsideShapeBox::Border },
|
|
|
|
{ eCSSKeyword_margin_box, StyleShapeOutsideShapeBox::Margin },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kShapeRenderingKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_SHAPE_RENDERING_AUTO },
|
|
|
|
{ eCSSKeyword_optimizespeed, NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED },
|
|
|
|
{ eCSSKeyword_crispedges, NS_STYLE_SHAPE_RENDERING_CRISPEDGES },
|
|
|
|
{ eCSSKeyword_geometricprecision, NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
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
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kStrokeLinecapKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_butt, NS_STYLE_STROKE_LINECAP_BUTT },
|
|
|
|
{ eCSSKeyword_round, NS_STYLE_STROKE_LINECAP_ROUND },
|
|
|
|
{ eCSSKeyword_square, NS_STYLE_STROKE_LINECAP_SQUARE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-12-12 10:59:31 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kStrokeLinejoinKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_miter, NS_STYLE_STROKE_LINEJOIN_MITER },
|
|
|
|
{ eCSSKeyword_round, NS_STYLE_STROKE_LINEJOIN_ROUND },
|
|
|
|
{ eCSSKeyword_bevel, NS_STYLE_STROKE_LINEJOIN_BEVEL },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2001-12-12 10:59:31 +03:00
|
|
|
};
|
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
|
|
|
|
2012-09-06 08:58:47 +04:00
|
|
|
// Lookup table to store the sole objectValue keyword to let SVG glyphs inherit
|
|
|
|
// certain stroke-* properties from the outer text object
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kStrokeContextValueKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_context_value, NS_STYLE_STROKE_PROP_CONTEXT_VALUE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-09-06 08:58:47 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextAnchorKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_start, NS_STYLE_TEXT_ANCHOR_START },
|
|
|
|
{ eCSSKeyword_middle, NS_STYLE_TEXT_ANCHOR_MIDDLE },
|
|
|
|
{ eCSSKeyword_end, NS_STYLE_TEXT_ANCHOR_END },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
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
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kTextRenderingKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_TEXT_RENDERING_AUTO },
|
|
|
|
{ eCSSKeyword_optimizespeed, NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED },
|
|
|
|
{ eCSSKeyword_optimizelegibility, NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY },
|
|
|
|
{ eCSSKeyword_geometricprecision, NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
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
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kVectorEffectKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_none, NS_STYLE_VECTOR_EFFECT_NONE },
|
|
|
|
{ eCSSKeyword_non_scaling_stroke, NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-05-18 12:33:40 +04:00
|
|
|
};
|
|
|
|
|
2016-03-08 20:25:24 +03:00
|
|
|
const KTableEntry nsCSSProps::kColorAdjustKTable[] = {
|
|
|
|
{ eCSSKeyword_economy, NS_STYLE_COLOR_ADJUST_ECONOMY },
|
|
|
|
{ eCSSKeyword_exact, NS_STYLE_COLOR_ADJUST_EXACT },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kColorInterpolationKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_COLOR_INTERPOLATION_AUTO },
|
|
|
|
{ eCSSKeyword_srgb, NS_STYLE_COLOR_INTERPOLATION_SRGB },
|
|
|
|
{ eCSSKeyword_linearrgb, NS_STYLE_COLOR_INTERPOLATION_LINEARRGB },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2007-01-30 16:19:55 +03:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry nsCSSProps::kColumnFillKTable[] = {
|
2015-11-20 05:08:57 +03:00
|
|
|
{ eCSSKeyword_auto, NS_STYLE_COLUMN_FILL_AUTO },
|
|
|
|
{ eCSSKeyword_balance, NS_STYLE_COLUMN_FILL_BALANCE },
|
|
|
|
{ eCSSKeyword_UNKNOWN, -1 }
|
2012-07-31 20:21:19 +04:00
|
|
|
};
|
|
|
|
|
2015-11-20 05:08:57 +03:00
|
|
|
static inline bool
|
2015-11-20 05:09:07 +03:00
|
|
|
IsKeyValSentinel(const KTableEntry& aTableEntry)
|
2013-10-28 00:56:32 +04:00
|
|
|
{
|
2015-11-20 05:08:57 +03:00
|
|
|
return aTableEntry.mKeyword == eCSSKeyword_UNKNOWN &&
|
|
|
|
aTableEntry.mValue == -1;
|
2013-10-28 00:56:32 +04:00
|
|
|
}
|
|
|
|
|
2012-10-03 09:04:50 +04:00
|
|
|
int32_t
|
2014-02-05 15:10:44 +04:00
|
|
|
nsCSSProps::FindIndexOfKeyword(nsCSSKeyword aKeyword,
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry aTable[])
|
2004-10-01 21:15:15 +04:00
|
|
|
{
|
2013-10-28 00:56:32 +04:00
|
|
|
if (eCSSKeyword_UNKNOWN == aKeyword) {
|
|
|
|
// NOTE: we can have keyword tables where eCSSKeyword_UNKNOWN is used
|
|
|
|
// not only for the sentinel, but also in the middle of the table to
|
|
|
|
// knock out values that have been disabled by prefs, e.g. kDisplayKTable.
|
|
|
|
// So we deal with eCSSKeyword_UNKNOWN up front to avoid returning a valid
|
|
|
|
// index in the loop below.
|
|
|
|
return -1;
|
|
|
|
}
|
2015-11-20 05:08:57 +03:00
|
|
|
for (int32_t i = 0; ; ++i) {
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry& entry = aTable[i];
|
2015-11-20 05:08:57 +03:00
|
|
|
if (::IsKeyValSentinel(entry)) {
|
2013-10-28 00:56:32 +04:00
|
|
|
break;
|
2004-10-01 21:15:15 +04:00
|
|
|
}
|
2015-11-20 05:08:57 +03:00
|
|
|
if (aKeyword == entry.mKeyword) {
|
2013-10-28 00:56:32 +04:00
|
|
|
return i;
|
|
|
|
}
|
2004-10-01 21:15:15 +04:00
|
|
|
}
|
2012-10-03 09:04:50 +04:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
2015-11-20 05:09:07 +03:00
|
|
|
nsCSSProps::FindKeyword(nsCSSKeyword aKeyword, const KTableEntry aTable[],
|
2012-10-03 09:04:50 +04:00
|
|
|
int32_t& aResult)
|
|
|
|
{
|
|
|
|
int32_t index = FindIndexOfKeyword(aKeyword, aTable);
|
|
|
|
if (index >= 0) {
|
2015-11-20 05:08:57 +03:00
|
|
|
aResult = aTable[index].mValue;
|
2012-10-03 09:04:50 +04:00
|
|
|
return true;
|
|
|
|
}
|
2011-10-17 18:59:28 +04:00
|
|
|
return false;
|
2004-10-01 21:15:15 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
nsCSSKeyword
|
2015-11-20 05:09:07 +03:00
|
|
|
nsCSSProps::ValueToKeywordEnum(int32_t aValue, const KTableEntry aTable[])
|
1999-07-18 04:32:32 +04:00
|
|
|
{
|
2015-11-20 06:31:38 +03:00
|
|
|
#ifdef DEBUG
|
2015-11-20 05:08:57 +03:00
|
|
|
typedef decltype(aTable[0].mValue) table_value_type;
|
|
|
|
NS_ASSERTION(table_value_type(aValue) == aValue, "Value out of range");
|
2015-11-20 06:31:38 +03:00
|
|
|
#endif
|
2015-11-20 05:08:57 +03:00
|
|
|
for (int32_t i = 0; ; ++i) {
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry& entry = aTable[i];
|
2015-11-20 05:08:57 +03:00
|
|
|
if (::IsKeyValSentinel(entry)) {
|
1999-07-18 04:32:32 +04:00
|
|
|
break;
|
|
|
|
}
|
2015-11-20 05:08:57 +03:00
|
|
|
if (aValue == entry.mValue) {
|
|
|
|
return entry.mKeyword;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
}
|
2004-10-01 21:15:15 +04:00
|
|
|
return eCSSKeyword_UNKNOWN;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
|
2001-11-28 00:13:53 +03:00
|
|
|
const nsAFlatCString&
|
2015-11-20 05:09:07 +03:00
|
|
|
nsCSSProps::ValueToKeyword(int32_t aValue, const KTableEntry aTable[])
|
2000-03-31 11:08:36 +04:00
|
|
|
{
|
2004-10-01 21:15:15 +04:00
|
|
|
nsCSSKeyword keyword = ValueToKeywordEnum(aValue, aTable);
|
|
|
|
if (keyword == eCSSKeyword_UNKNOWN) {
|
2001-11-28 00:13:53 +03:00
|
|
|
static nsDependentCString sNullStr("");
|
2000-08-22 10:57:32 +04:00
|
|
|
return sNullStr;
|
2000-03-31 11:08:36 +04:00
|
|
|
} else {
|
2004-10-01 21:15:15 +04:00
|
|
|
return nsCSSKeywords::GetStringValue(keyword);
|
2000-03-31 11:08:36 +04:00
|
|
|
}
|
|
|
|
}
|
1999-07-18 04:32:32 +04:00
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
/* static */ const KTableEntry* const
|
2004-02-19 21:02:20 +03:00
|
|
|
nsCSSProps::kKeywordTableTable[eCSSProperty_COUNT_no_shorthands] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
kwtable_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2004-02-19 21:02:20 +03:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2004-02-19 21:02:20 +03:00
|
|
|
#undef CSS_PROP
|
|
|
|
};
|
|
|
|
|
2009-10-13 10:35:57 +04:00
|
|
|
const nsAFlatCString&
|
2016-08-17 04:37:48 +03:00
|
|
|
nsCSSProps::LookupPropertyValue(nsCSSPropertyID aProp, int32_t aValue)
|
1999-07-18 04:32:32 +04:00
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(aProp >= 0 && aProp < eCSSProperty_COUNT,
|
|
|
|
"property out of range");
|
2015-11-20 06:31:38 +03:00
|
|
|
#ifdef DEBUG
|
2015-11-20 05:09:07 +03:00
|
|
|
typedef decltype(KTableEntry::mValue) table_value_type;
|
2015-11-20 05:08:57 +03:00
|
|
|
NS_ASSERTION(table_value_type(aValue) == aValue, "Value out of range");
|
2015-11-20 06:31:38 +03:00
|
|
|
#endif
|
2004-02-19 21:02:20 +03:00
|
|
|
|
2015-11-20 05:09:07 +03:00
|
|
|
const KTableEntry* kwtable = nullptr;
|
2004-02-19 21:02:20 +03:00
|
|
|
if (aProp < eCSSProperty_COUNT_no_shorthands)
|
|
|
|
kwtable = kKeywordTableTable[aProp];
|
|
|
|
|
|
|
|
if (kwtable)
|
2004-10-01 21:15:15 +04:00
|
|
|
return ValueToKeyword(aValue, kwtable);
|
2001-03-06 05:27:50 +03:00
|
|
|
|
2001-11-28 00:13:53 +03:00
|
|
|
static nsDependentCString sNullStr("");
|
2000-08-22 10:57:32 +04:00
|
|
|
return sNullStr;
|
1999-07-18 04:32:32 +04:00
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
bool nsCSSProps::GetColorName(int32_t aPropValue, nsCString &aStr)
|
2000-03-31 11:08:36 +04:00
|
|
|
{
|
2011-09-29 10:19:26 +04:00
|
|
|
bool rv = false;
|
2000-03-31 11:08:36 +04:00
|
|
|
|
|
|
|
// first get the keyword corresponding to the property Value from the color table
|
2004-10-01 21:15:15 +04:00
|
|
|
nsCSSKeyword keyword = ValueToKeywordEnum(aPropValue, kColorKTable);
|
2000-03-31 11:08:36 +04:00
|
|
|
|
|
|
|
// next get the name as a string from the keywords table
|
2004-10-01 21:15:15 +04:00
|
|
|
if (keyword != eCSSKeyword_UNKNOWN) {
|
2000-03-31 11:08:36 +04:00
|
|
|
nsCSSKeywords::AddRefTable();
|
2004-10-01 21:15:15 +04:00
|
|
|
aStr = nsCSSKeywords::GetStringValue(keyword);
|
2000-03-31 11:08:36 +04:00
|
|
|
nsCSSKeywords::ReleaseTable();
|
2011-10-17 18:59:28 +04:00
|
|
|
rv = true;
|
2004-10-01 21:15:15 +04:00
|
|
|
}
|
2000-03-31 11:08:36 +04:00
|
|
|
return rv;
|
|
|
|
}
|
1999-07-18 04:32:32 +04:00
|
|
|
|
2003-06-08 02:14:42 +04:00
|
|
|
const nsStyleStructID nsCSSProps::kSIDTable[eCSSProperty_COUNT_no_shorthands] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
eStyleStruct_##stylestruct_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2003-06-08 02:14:42 +04:00
|
|
|
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#undef CSS_PROP
|
2003-06-08 02:14:42 +04:00
|
|
|
};
|
|
|
|
|
2009-09-11 14:46:36 +04:00
|
|
|
const nsStyleAnimType
|
|
|
|
nsCSSProps::kAnimTypeTable[eCSSProperty_COUNT_no_shorthands] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
|
|
|
stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
animtype_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#undef CSS_PROP
|
|
|
|
};
|
|
|
|
|
|
|
|
const ptrdiff_t
|
|
|
|
nsCSSProps::kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
|
|
|
stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
stylestructoffset_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#undef CSS_PROP
|
|
|
|
};
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
const uint32_t nsCSSProps::kFlagsTable[eCSSProperty_COUNT] = {
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
|
|
|
stylestruct_, stylestructoffset_, animtype_) \
|
2009-09-11 14:46:36 +04:00
|
|
|
flags_,
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2009-09-11 14:46:36 +04:00
|
|
|
#undef CSS_PROP
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) flags_,
|
2009-09-11 14:46:36 +04:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
2008-10-08 02:10:19 +04:00
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gAllSubpropTable[] = {
|
2013-10-03 22:49:19 +04:00
|
|
|
#define CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2013-10-03 22:49:19 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
|
|
|
stylestruct_, stylestructoffset_, animtype_) \
|
|
|
|
eCSSProperty_##id_,
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2013-10-03 22:49:19 +04:00
|
|
|
#undef CSS_PROP_LIST_ONLY_COMPONENTS_OF_ALL_SHORTHAND
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gAnimationSubpropTable[] = {
|
2011-04-12 10:18:42 +04:00
|
|
|
eCSSProperty_animation_duration,
|
|
|
|
eCSSProperty_animation_timing_function,
|
|
|
|
eCSSProperty_animation_delay,
|
|
|
|
eCSSProperty_animation_direction,
|
|
|
|
eCSSProperty_animation_fill_mode,
|
|
|
|
eCSSProperty_animation_iteration_count,
|
2014-07-17 05:04:56 +04:00
|
|
|
eCSSProperty_animation_play_state,
|
2011-04-12 10:18:42 +04:00
|
|
|
// List animation-name last so we serialize it last, in case it has
|
|
|
|
// a value that conflicts with one of the other properties. (See
|
|
|
|
// how Declaration::GetValue serializes 'animation'.
|
|
|
|
eCSSProperty_animation_name,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderRadiusSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in topleft-topright-bottomright-bottomleft
|
|
|
|
// order.
|
2010-09-09 19:21:47 +04:00
|
|
|
eCSSProperty_border_top_left_radius,
|
|
|
|
eCSSProperty_border_top_right_radius,
|
|
|
|
eCSSProperty_border_bottom_right_radius,
|
|
|
|
eCSSProperty_border_bottom_left_radius,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gOutlineRadiusSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in topleft-topright-bottomright-bottomleft
|
|
|
|
// order.
|
|
|
|
eCSSProperty__moz_outline_radius_topLeft,
|
|
|
|
eCSSProperty__moz_outline_radius_topRight,
|
|
|
|
eCSSProperty__moz_outline_radius_bottomRight,
|
|
|
|
eCSSProperty__moz_outline_radius_bottomLeft,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBackgroundSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_background_color,
|
|
|
|
eCSSProperty_background_image,
|
|
|
|
eCSSProperty_background_repeat,
|
|
|
|
eCSSProperty_background_attachment,
|
2010-06-09 05:44:33 +04:00
|
|
|
eCSSProperty_background_clip,
|
|
|
|
eCSSProperty_background_origin,
|
2016-04-29 21:12:10 +03:00
|
|
|
eCSSProperty_background_position_x,
|
|
|
|
eCSSProperty_background_position_y,
|
2010-06-09 05:44:33 +04:00
|
|
|
eCSSProperty_background_size,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBackgroundPositionSubpropTable[] = {
|
2016-04-29 21:12:10 +03:00
|
|
|
eCSSProperty_background_position_x,
|
|
|
|
eCSSProperty_background_position_y,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_top_width,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_width,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_width,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_width,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_top_style,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_style,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_style,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_style,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_top_color,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_color,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_color,
|
2010-02-26 21:35:09 +03:00
|
|
|
eCSSProperty_border_top_colors,
|
|
|
|
eCSSProperty_border_right_colors,
|
|
|
|
eCSSProperty_border_bottom_colors,
|
|
|
|
eCSSProperty_border_left_colors,
|
2011-12-23 03:34:45 +04:00
|
|
|
eCSSProperty_border_image_source,
|
|
|
|
eCSSProperty_border_image_slice,
|
|
|
|
eCSSProperty_border_image_width,
|
|
|
|
eCSSProperty_border_image_outset,
|
|
|
|
eCSSProperty_border_image_repeat,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderBlockEndSubpropTable[] = {
|
2015-01-17 07:22:52 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
|
|
|
// It also depends on the color being third.
|
|
|
|
eCSSProperty_border_block_end_width,
|
|
|
|
eCSSProperty_border_block_end_style,
|
|
|
|
eCSSProperty_border_block_end_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderBlockStartSubpropTable[] = {
|
2015-01-17 07:22:52 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
|
|
|
// It also depends on the color being third.
|
|
|
|
eCSSProperty_border_block_start_width,
|
|
|
|
eCSSProperty_border_block_start_style,
|
|
|
|
eCSSProperty_border_block_start_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderBottomSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_width,
|
|
|
|
eCSSProperty_border_bottom_style,
|
|
|
|
eCSSProperty_border_bottom_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2013-07-18 21:59:53 +04:00
|
|
|
static_assert(NS_SIDE_TOP == 0 && NS_SIDE_RIGHT == 1 &&
|
|
|
|
NS_SIDE_BOTTOM == 2 && NS_SIDE_LEFT == 3,
|
|
|
|
"box side constants not top/right/bottom/left == 0/1/2/3");
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderColorSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in top-right-bottom-left order.
|
2010-04-03 05:58:26 +04:00
|
|
|
// Code relies on these matching the NS_SIDE_* constants.
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_top_color,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_color,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_color,
|
2007-07-04 22:51:16 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderInlineEndSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp output the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2015-07-03 05:22:56 +03:00
|
|
|
eCSSProperty_border_inline_end_width,
|
|
|
|
eCSSProperty_border_inline_end_style,
|
|
|
|
eCSSProperty_border_inline_end_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderLeftSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_width,
|
|
|
|
eCSSProperty_border_left_style,
|
|
|
|
eCSSProperty_border_left_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderRightSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_width,
|
|
|
|
eCSSProperty_border_right_style,
|
|
|
|
eCSSProperty_border_right_color,
|
2007-07-04 22:51:16 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderInlineStartSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2015-07-03 05:22:56 +03:00
|
|
|
eCSSProperty_border_inline_start_width,
|
|
|
|
eCSSProperty_border_inline_start_style,
|
|
|
|
eCSSProperty_border_inline_start_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderStyleSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in top-right-bottom-left order.
|
|
|
|
eCSSProperty_border_top_style,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_style,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_style,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_style,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderTopSubpropTable[] = {
|
2015-01-17 07:16:02 +03:00
|
|
|
// Declaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_top_width,
|
|
|
|
eCSSProperty_border_top_style,
|
|
|
|
eCSSProperty_border_top_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderWidthSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in top-right-bottom-left order.
|
|
|
|
eCSSProperty_border_top_width,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_right_width,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_border_bottom_width,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_border_left_width,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gFontSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_font_family,
|
|
|
|
eCSSProperty_font_style,
|
|
|
|
eCSSProperty_font_weight,
|
|
|
|
eCSSProperty_font_size,
|
|
|
|
eCSSProperty_line_height,
|
2013-05-20 06:59:20 +04:00
|
|
|
eCSSProperty_font_size_adjust,
|
|
|
|
eCSSProperty_font_stretch,
|
2007-06-12 22:28:56 +04:00
|
|
|
eCSSProperty__x_system_font,
|
2010-07-14 00:30:42 +04:00
|
|
|
eCSSProperty_font_feature_settings,
|
|
|
|
eCSSProperty_font_language_override,
|
2013-05-20 06:59:20 +04:00
|
|
|
eCSSProperty_font_kerning,
|
|
|
|
eCSSProperty_font_synthesis,
|
|
|
|
eCSSProperty_font_variant_alternates,
|
|
|
|
eCSSProperty_font_variant_caps,
|
|
|
|
eCSSProperty_font_variant_east_asian,
|
|
|
|
eCSSProperty_font_variant_ligatures,
|
|
|
|
eCSSProperty_font_variant_numeric,
|
|
|
|
eCSSProperty_font_variant_position,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gFontVariantSubpropTable[] = {
|
2014-08-20 11:54:25 +04:00
|
|
|
eCSSProperty_font_variant_alternates,
|
|
|
|
eCSSProperty_font_variant_caps,
|
|
|
|
eCSSProperty_font_variant_east_asian,
|
|
|
|
eCSSProperty_font_variant_ligatures,
|
|
|
|
eCSSProperty_font_variant_numeric,
|
|
|
|
eCSSProperty_font_variant_position,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gListStyleSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_list_style_type,
|
|
|
|
eCSSProperty_list_style_image,
|
|
|
|
eCSSProperty_list_style_position,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMarginSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in top-right-bottom-left order.
|
|
|
|
eCSSProperty_margin_top,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_margin_right,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_margin_bottom,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_margin_left,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2004-02-04 09:10:56 +03:00
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gOutlineSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
2008-12-23 17:06:57 +03:00
|
|
|
// It also depends on the color being third.
|
2005-03-27 15:36:08 +04:00
|
|
|
eCSSProperty_outline_width,
|
2008-12-23 17:06:57 +03:00
|
|
|
eCSSProperty_outline_style,
|
|
|
|
eCSSProperty_outline_color,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
1999-07-18 04:32:32 +04:00
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gColumnsSubpropTable[] = {
|
2011-08-23 08:18:22 +04:00
|
|
|
eCSSProperty__moz_column_count,
|
|
|
|
eCSSProperty__moz_column_width,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gColumnRuleSubpropTable[] = {
|
2008-12-23 17:06:57 +03:00
|
|
|
// nsCSSDeclaration.cpp outputs the subproperties in this order.
|
|
|
|
// It also depends on the color being third.
|
2008-07-19 14:38:25 +04:00
|
|
|
eCSSProperty__moz_column_rule_width,
|
|
|
|
eCSSProperty__moz_column_rule_style,
|
|
|
|
eCSSProperty__moz_column_rule_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gFlexSubpropTable[] = {
|
2012-07-07 04:06:23 +04:00
|
|
|
eCSSProperty_flex_grow,
|
|
|
|
eCSSProperty_flex_shrink,
|
|
|
|
eCSSProperty_flex_basis,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gFlexFlowSubpropTable[] = {
|
2013-12-05 22:57:51 +04:00
|
|
|
eCSSProperty_flex_direction,
|
|
|
|
eCSSProperty_flex_wrap,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridTemplateSubpropTable[] = {
|
2016-04-21 17:18:34 +03:00
|
|
|
eCSSProperty_grid_template_areas,
|
|
|
|
eCSSProperty_grid_template_rows,
|
|
|
|
eCSSProperty_grid_template_columns,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridSubpropTable[] = {
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_grid_template_areas,
|
|
|
|
eCSSProperty_grid_template_rows,
|
2016-01-27 19:02:13 +03:00
|
|
|
eCSSProperty_grid_template_columns,
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_grid_auto_flow,
|
|
|
|
eCSSProperty_grid_auto_rows,
|
2016-01-27 19:02:13 +03:00
|
|
|
eCSSProperty_grid_auto_columns,
|
2015-11-18 21:52:27 +03:00
|
|
|
eCSSProperty_grid_row_gap, // can only be reset, not get/set
|
2016-01-27 19:02:13 +03:00
|
|
|
eCSSProperty_grid_column_gap, // can only be reset, not get/set
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridColumnSubpropTable[] = {
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_grid_column_start,
|
|
|
|
eCSSProperty_grid_column_end,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridRowSubpropTable[] = {
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_grid_row_start,
|
|
|
|
eCSSProperty_grid_row_end,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridAreaSubpropTable[] = {
|
2014-03-21 19:06:12 +04:00
|
|
|
eCSSProperty_grid_row_start,
|
|
|
|
eCSSProperty_grid_column_start,
|
|
|
|
eCSSProperty_grid_row_end,
|
|
|
|
eCSSProperty_grid_column_end,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gGridGapSubpropTable[] = {
|
2015-11-18 21:52:27 +03:00
|
|
|
eCSSProperty_grid_row_gap,
|
2016-01-27 19:02:13 +03:00
|
|
|
eCSSProperty_grid_column_gap,
|
2015-11-18 21:52:27 +03:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gOverflowSubpropTable[] = {
|
2004-09-05 04:04:04 +04:00
|
|
|
eCSSProperty_overflow_x,
|
|
|
|
eCSSProperty_overflow_y,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gPaddingSubpropTable[] = {
|
2003-06-08 02:14:42 +04:00
|
|
|
// Code relies on these being in top-right-bottom-left order.
|
|
|
|
eCSSProperty_padding_top,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_padding_right,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_padding_bottom,
|
2015-01-17 07:16:02 +03:00
|
|
|
eCSSProperty_padding_left,
|
2003-06-08 02:14:42 +04:00
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gTextDecorationSubpropTable[] = {
|
2011-04-23 09:16:41 +04:00
|
|
|
eCSSProperty_text_decoration_color,
|
|
|
|
eCSSProperty_text_decoration_line,
|
|
|
|
eCSSProperty_text_decoration_style,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gTextEmphasisSubpropTable[] = {
|
2015-11-28 03:56:33 +03:00
|
|
|
eCSSProperty_text_emphasis_style,
|
|
|
|
eCSSProperty_text_emphasis_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gWebkitTextStrokeSubpropTable[] = {
|
2016-04-22 20:40:39 +03:00
|
|
|
eCSSProperty__webkit_text_stroke_width,
|
|
|
|
eCSSProperty__webkit_text_stroke_color,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gTransitionSubpropTable[] = {
|
2009-08-21 01:52:47 +04:00
|
|
|
eCSSProperty_transition_property,
|
|
|
|
eCSSProperty_transition_duration,
|
|
|
|
eCSSProperty_transition_timing_function,
|
|
|
|
eCSSProperty_transition_delay,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gBorderImageSubpropTable[] = {
|
2011-12-23 03:34:45 +04:00
|
|
|
eCSSProperty_border_image_source,
|
|
|
|
eCSSProperty_border_image_slice,
|
|
|
|
eCSSProperty_border_image_width,
|
|
|
|
eCSSProperty_border_image_outset,
|
|
|
|
eCSSProperty_border_image_repeat,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMarkerSubpropTable[] = {
|
2004-12-09 06:16:15 +03:00
|
|
|
eCSSProperty_marker_start,
|
|
|
|
eCSSProperty_marker_mid,
|
|
|
|
eCSSProperty_marker_end,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2012-09-18 22:37:14 +04:00
|
|
|
// Subproperty tables for shorthands that are just aliases with
|
|
|
|
// different parsing rules.
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMozTransformSubpropTable[] = {
|
2012-09-18 22:37:14 +04:00
|
|
|
eCSSProperty_transform,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gScrollSnapTypeSubpropTable[] = {
|
2014-02-04 05:54:22 +04:00
|
|
|
eCSSProperty_scroll_snap_type_x,
|
|
|
|
eCSSProperty_scroll_snap_type_y,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
2016-03-01 14:52:17 +03:00
|
|
|
#ifdef MOZ_ENABLE_MASK_AS_SHORTHAND
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMaskSubpropTable[] = {
|
2016-01-28 08:28:00 +03:00
|
|
|
eCSSProperty_mask_image,
|
|
|
|
eCSSProperty_mask_repeat,
|
2016-04-29 21:12:10 +03:00
|
|
|
eCSSProperty_mask_position_x,
|
|
|
|
eCSSProperty_mask_position_y,
|
2016-01-28 08:28:00 +03:00
|
|
|
eCSSProperty_mask_clip,
|
|
|
|
eCSSProperty_mask_origin,
|
|
|
|
eCSSProperty_mask_size,
|
|
|
|
eCSSProperty_mask_composite,
|
|
|
|
eCSSProperty_mask_mode,
|
|
|
|
eCSSProperty_UNKNOWN
|
2016-04-29 21:12:10 +03:00
|
|
|
};
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMaskPositionSubpropTable[] = {
|
2016-04-29 21:12:10 +03:00
|
|
|
eCSSProperty_mask_position_x,
|
|
|
|
eCSSProperty_mask_position_y,
|
|
|
|
eCSSProperty_UNKNOWN
|
2016-01-28 08:28:00 +03:00
|
|
|
};
|
2016-03-01 14:52:17 +03:00
|
|
|
#endif
|
2016-01-28 08:28:00 +03:00
|
|
|
// FIXME: mask-border tables should be added when we implement
|
|
|
|
// mask-border properties.
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
const nsCSSPropertyID *const
|
2003-06-08 02:14:42 +04:00
|
|
|
nsCSSProps::kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands] = {
|
2013-03-25 20:24:21 +04:00
|
|
|
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
|
2011-03-18 06:14:30 +03:00
|
|
|
// Need an extra level of macro nesting to force expansion of method_
|
|
|
|
// params before they get pasted.
|
|
|
|
#define NSCSSPROPS_INNER_MACRO(method_) g##method_##SubpropTable,
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
|
|
|
|
NSCSSPROPS_INNER_MACRO(method_)
|
2009-09-11 14:46:36 +04:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
2011-03-18 06:14:30 +03:00
|
|
|
#undef NSCSSPROPS_INNER_MACRO
|
2013-03-25 20:24:21 +04:00
|
|
|
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
2003-06-08 02:14:42 +04:00
|
|
|
};
|
2011-03-18 06:14:31 +03:00
|
|
|
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gOffsetLogicalGroupTable[] = {
|
2015-01-17 07:53:27 +03:00
|
|
|
eCSSProperty_top,
|
|
|
|
eCSSProperty_right,
|
|
|
|
eCSSProperty_bottom,
|
|
|
|
eCSSProperty_left,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMaxSizeLogicalGroupTable[] = {
|
2015-01-17 07:50:09 +03:00
|
|
|
eCSSProperty_max_height,
|
|
|
|
eCSSProperty_max_width,
|
|
|
|
eCSSProperty_UNKNOWN
|
2015-01-17 07:50:09 +03:00
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gMinSizeLogicalGroupTable[] = {
|
2015-01-17 07:50:09 +03:00
|
|
|
eCSSProperty_min_height,
|
|
|
|
eCSSProperty_min_width,
|
|
|
|
eCSSProperty_UNKNOWN
|
2015-01-17 07:50:09 +03:00
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
static const nsCSSPropertyID gSizeLogicalGroupTable[] = {
|
2015-01-17 07:50:09 +03:00
|
|
|
eCSSProperty_height,
|
|
|
|
eCSSProperty_width,
|
|
|
|
eCSSProperty_UNKNOWN
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
const nsCSSPropertyID* const
|
2015-01-17 07:43:20 +03:00
|
|
|
nsCSSProps::kLogicalGroupTable[eCSSPropertyLogicalGroup_COUNT] = {
|
|
|
|
#define CSS_PROP_LOGICAL_GROUP_SHORTHAND(id_) g##id_##SubpropTable,
|
2015-01-17 07:43:20 +03:00
|
|
|
#define CSS_PROP_LOGICAL_GROUP_AXIS(name_) g##name_##LogicalGroupTable,
|
2015-01-17 07:43:20 +03:00
|
|
|
#define CSS_PROP_LOGICAL_GROUP_BOX(name_) g##name_##LogicalGroupTable,
|
2015-01-17 07:43:20 +03:00
|
|
|
#include "nsCSSPropLogicalGroupList.h"
|
2015-01-17 07:43:20 +03:00
|
|
|
#undef CSS_PROP_LOGICAL_GROUP_BOX
|
2015-01-17 07:43:20 +03:00
|
|
|
#undef CSS_PROP_LOGICAL_GROUP_AXIS
|
2015-01-17 07:43:20 +03:00
|
|
|
#undef CSS_PROP_LOGICAL_GROUP_SHORTHAND
|
|
|
|
};
|
|
|
|
|
|
|
|
// Mapping of logical longhand properties to their logical group (which
|
|
|
|
// represents the physical longhands the logical properties an correspond
|
|
|
|
// to). The format is pairs of values, where the first is the logical
|
2016-08-17 04:37:48 +03:00
|
|
|
// longhand property (an nsCSSPropertyID) and the second is the logical group
|
2015-11-20 05:09:07 +03:00
|
|
|
// (an nsCSSPropertyLogicalGroup), stored in a flat array (like KTableEntry
|
2015-01-17 07:43:20 +03:00
|
|
|
// arrays).
|
|
|
|
static const int gLogicalGroupMappingTable[] = {
|
2015-01-17 07:22:51 +03:00
|
|
|
#define CSS_PROP_LOGICAL(name_, id_, method_, flags_, pref_, parsevariant_, \
|
2015-01-17 07:43:20 +03:00
|
|
|
kwtable_, group_, stylestruct_, \
|
2015-01-17 07:22:51 +03:00
|
|
|
stylestructoffset_, animtype_) \
|
2015-01-17 07:43:20 +03:00
|
|
|
eCSSProperty_##id_, eCSSPropertyLogicalGroup_##group_,
|
2015-01-17 07:22:51 +03:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LOGICAL
|
|
|
|
};
|
|
|
|
|
2016-08-17 04:37:48 +03:00
|
|
|
/* static */ const nsCSSPropertyID*
|
|
|
|
nsCSSProps::LogicalGroup(nsCSSPropertyID aProperty)
|
2015-01-17 07:22:51 +03:00
|
|
|
{
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
|
|
|
|
"out of range");
|
|
|
|
MOZ_ASSERT(nsCSSProps::PropHasFlags(aProperty, CSS_PROPERTY_LOGICAL),
|
|
|
|
"aProperty must be a logical longhand property");
|
2015-01-17 07:22:51 +03:00
|
|
|
|
2015-01-17 07:43:20 +03:00
|
|
|
for (size_t i = 0; i < ArrayLength(gLogicalGroupMappingTable); i += 2) {
|
|
|
|
if (gLogicalGroupMappingTable[i] == aProperty) {
|
|
|
|
return kLogicalGroupTable[gLogicalGroupMappingTable[i + 1]];
|
2015-01-17 07:22:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-10 01:34:50 +03:00
|
|
|
MOZ_ASSERT(false, "missing gLogicalGroupMappingTable entry");
|
2015-01-17 07:43:20 +03:00
|
|
|
return nullptr;
|
2015-01-17 07:22:51 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-05-10 05:29:37 +04:00
|
|
|
#define ENUM_DATA_FOR_PROPERTY(name_, id_, method_, flags_, pref_, \
|
|
|
|
parsevariant_, kwtable_, stylestructoffset_, \
|
|
|
|
animtype_) \
|
2011-03-18 06:14:31 +03:00
|
|
|
ePropertyIndex_for_##id_,
|
|
|
|
|
2011-03-18 06:14:31 +03:00
|
|
|
// The order of these enums must match the g*Flags arrays in nsRuleNode.cpp.
|
|
|
|
|
2011-03-18 06:14:31 +03:00
|
|
|
enum FontCheckCounter {
|
|
|
|
#define CSS_PROP_FONT ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_FONT
|
|
|
|
ePropertyCount_for_Font
|
|
|
|
};
|
|
|
|
|
|
|
|
enum DisplayCheckCounter {
|
|
|
|
#define CSS_PROP_DISPLAY ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_DISPLAY
|
|
|
|
ePropertyCount_for_Display
|
|
|
|
};
|
|
|
|
|
|
|
|
enum VisibilityCheckCounter {
|
|
|
|
#define CSS_PROP_VISIBILITY ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_VISIBILITY
|
|
|
|
ePropertyCount_for_Visibility
|
|
|
|
};
|
|
|
|
|
|
|
|
enum MarginCheckCounter {
|
|
|
|
#define CSS_PROP_MARGIN ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_MARGIN
|
|
|
|
ePropertyCount_for_Margin
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BorderCheckCounter {
|
|
|
|
#define CSS_PROP_BORDER ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_BORDER
|
|
|
|
ePropertyCount_for_Border
|
|
|
|
};
|
|
|
|
|
|
|
|
enum PaddingCheckCounter {
|
|
|
|
#define CSS_PROP_PADDING ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_PADDING
|
|
|
|
ePropertyCount_for_Padding
|
|
|
|
};
|
|
|
|
|
|
|
|
enum OutlineCheckCounter {
|
|
|
|
#define CSS_PROP_OUTLINE ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_OUTLINE
|
|
|
|
ePropertyCount_for_Outline
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ListCheckCounter {
|
|
|
|
#define CSS_PROP_LIST ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LIST
|
|
|
|
ePropertyCount_for_List
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ColorCheckCounter {
|
|
|
|
#define CSS_PROP_COLOR ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_COLOR
|
|
|
|
ePropertyCount_for_Color
|
|
|
|
};
|
|
|
|
|
|
|
|
enum BackgroundCheckCounter {
|
|
|
|
#define CSS_PROP_BACKGROUND ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_BACKGROUND
|
|
|
|
ePropertyCount_for_Background
|
|
|
|
};
|
|
|
|
|
|
|
|
enum PositionCheckCounter {
|
|
|
|
#define CSS_PROP_POSITION ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_POSITION
|
|
|
|
ePropertyCount_for_Position
|
|
|
|
};
|
|
|
|
|
|
|
|
enum TableCheckCounter {
|
|
|
|
#define CSS_PROP_TABLE ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_TABLE
|
|
|
|
ePropertyCount_for_Table
|
|
|
|
};
|
|
|
|
|
|
|
|
enum TableBorderCheckCounter {
|
|
|
|
#define CSS_PROP_TABLEBORDER ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_TABLEBORDER
|
|
|
|
ePropertyCount_for_TableBorder
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ContentCheckCounter {
|
|
|
|
#define CSS_PROP_CONTENT ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_CONTENT
|
|
|
|
ePropertyCount_for_Content
|
|
|
|
};
|
|
|
|
|
|
|
|
enum TextCheckCounter {
|
|
|
|
#define CSS_PROP_TEXT ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_TEXT
|
|
|
|
ePropertyCount_for_Text
|
|
|
|
};
|
|
|
|
|
|
|
|
enum TextResetCheckCounter {
|
|
|
|
#define CSS_PROP_TEXTRESET ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_TEXTRESET
|
|
|
|
ePropertyCount_for_TextReset
|
|
|
|
};
|
|
|
|
|
|
|
|
enum UserInterfaceCheckCounter {
|
|
|
|
#define CSS_PROP_USERINTERFACE ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_USERINTERFACE
|
|
|
|
ePropertyCount_for_UserInterface
|
|
|
|
};
|
|
|
|
|
|
|
|
enum UIResetCheckCounter {
|
|
|
|
#define CSS_PROP_UIRESET ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_UIRESET
|
|
|
|
ePropertyCount_for_UIReset
|
|
|
|
};
|
|
|
|
|
|
|
|
enum XULCheckCounter {
|
|
|
|
#define CSS_PROP_XUL ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_XUL
|
|
|
|
ePropertyCount_for_XUL
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SVGCheckCounter {
|
|
|
|
#define CSS_PROP_SVG ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SVG
|
|
|
|
ePropertyCount_for_SVG
|
|
|
|
};
|
|
|
|
|
|
|
|
enum SVGResetCheckCounter {
|
|
|
|
#define CSS_PROP_SVGRESET ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SVGRESET
|
|
|
|
ePropertyCount_for_SVGReset
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ColumnCheckCounter {
|
|
|
|
#define CSS_PROP_COLUMN ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_COLUMN
|
|
|
|
ePropertyCount_for_Column
|
|
|
|
};
|
|
|
|
|
2013-12-12 06:09:40 +04:00
|
|
|
enum VariablesCheckCounter {
|
|
|
|
#define CSS_PROP_VARIABLES ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_VARIABLES
|
|
|
|
ePropertyCount_for_Variables
|
|
|
|
};
|
|
|
|
|
2016-04-12 08:52:42 +03:00
|
|
|
enum EffectsCheckCounter {
|
|
|
|
#define CSS_PROP_EFFECTS ENUM_DATA_FOR_PROPERTY
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_EFFECTS
|
|
|
|
ePropertyCount_for_Effects
|
|
|
|
};
|
|
|
|
|
2011-03-18 06:14:31 +03:00
|
|
|
#undef ENUM_DATA_FOR_PROPERTY
|
|
|
|
|
|
|
|
/* static */ const size_t
|
|
|
|
nsCSSProps::gPropertyCountInStruct[nsStyleStructID_Length] = {
|
2013-04-02 05:45:48 +04:00
|
|
|
#define STYLE_STRUCT(name, checkdata_cb) \
|
2011-03-18 06:14:31 +03:00
|
|
|
ePropertyCount_for_##name,
|
|
|
|
#include "nsStyleStructList.h"
|
|
|
|
#undef STYLE_STRUCT
|
|
|
|
};
|
|
|
|
|
|
|
|
/* static */ const size_t
|
|
|
|
nsCSSProps::gPropertyIndexInStruct[eCSSProperty_COUNT_no_shorthands] = {
|
|
|
|
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LOGICAL(name_, id_, method_, flags_, pref_, parsevariant_, \
|
2015-01-17 07:43:20 +03:00
|
|
|
kwtable_, group_, stylestruct_, \
|
2015-01-17 07:22:51 +03:00
|
|
|
stylestructoffset_, animtype_) \
|
2015-01-17 07:16:01 +03:00
|
|
|
size_t(-1),
|
2012-05-10 05:29:37 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
2011-03-18 06:14:31 +03:00
|
|
|
ePropertyIndex_for_##id_,
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LOGICAL
|
2011-03-18 06:14:31 +03:00
|
|
|
|
|
|
|
};
|
2012-07-14 03:59:05 +04:00
|
|
|
|
|
|
|
/* static */ bool
|
2013-03-13 20:58:39 +04:00
|
|
|
nsCSSProps::gPropertyEnabled[eCSSProperty_COUNT_with_aliases] = {
|
2015-10-03 04:12:09 +03:00
|
|
|
// If the property has any "ENABLED_IN" flag set, it is disabled by
|
|
|
|
// default. Note that, if a property has pref, whatever its default
|
|
|
|
// value is, it will later be changed in nsCSSProps::AddRefTable().
|
|
|
|
// If the property has "ENABLED_IN" flags but doesn't have a pref,
|
|
|
|
// it is an internal property which is disabled elsewhere.
|
|
|
|
#define IS_ENABLED_BY_DEFAULT(flags_) \
|
|
|
|
(!((flags_) & CSS_PROPERTY_ENABLED_MASK))
|
|
|
|
|
2012-07-14 03:59:05 +04:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
2015-10-03 04:12:09 +03:00
|
|
|
IS_ENABLED_BY_DEFAULT(flags_),
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropList.h"
|
2015-01-17 07:16:01 +03:00
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
2012-07-14 03:59:05 +04:00
|
|
|
#undef CSS_PROP
|
|
|
|
|
|
|
|
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
|
2015-10-03 04:12:09 +03:00
|
|
|
IS_ENABLED_BY_DEFAULT(flags_),
|
2012-07-14 03:59:05 +04:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_SHORTHAND
|
2013-03-13 20:58:39 +04:00
|
|
|
|
|
|
|
#define CSS_PROP_ALIAS(aliasname_, propid_, aliasmethod_, pref_) \
|
|
|
|
true,
|
|
|
|
#include "nsCSSPropAliasList.h"
|
|
|
|
#undef CSS_PROP_ALIAS
|
2015-10-03 04:12:09 +03:00
|
|
|
|
|
|
|
#undef IS_ENABLED_BY_DEFAULT
|
2012-07-14 03:59:05 +04:00
|
|
|
};
|
2015-01-17 07:16:01 +03:00
|
|
|
|
2015-06-03 22:21:24 +03:00
|
|
|
#include "../../dom/base/PropertyUseCounterMap.inc"
|
|
|
|
|
|
|
|
/* static */ const UseCounter
|
|
|
|
nsCSSProps::gPropertyUseCounter[eCSSProperty_COUNT_no_shorthands] = {
|
|
|
|
#define CSS_PROP_PUBLIC_OR_PRIVATE(publicname_, privatename_) privatename_
|
|
|
|
#define CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
|
|
|
static_cast<UseCounter>(USE_COUNTER_FOR_CSS_PROPERTY_##method_),
|
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP
|
|
|
|
#undef CSS_PROP_LIST_INCLUDE_LOGICAL
|
|
|
|
#undef CSS_PROP_PUBLIC_OR_PRIVATE
|
|
|
|
};
|
|
|
|
|
2015-01-17 07:43:20 +03:00
|
|
|
// Check that all logical property flags are used appropriately.
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, \
|
|
|
|
kwtable_, stylestruct_, stylestructoffset_, animtype_) \
|
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_LOGICAL), \
|
|
|
|
"only properties defined with CSS_PROP_LOGICAL can use " \
|
2015-01-17 07:22:51 +03:00
|
|
|
"the CSS_PROPERTY_LOGICAL flag"); \
|
2015-01-17 07:43:20 +03:00
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_LOGICAL_AXIS), \
|
|
|
|
"only properties defined with CSS_PROP_LOGICAL can use " \
|
|
|
|
"the CSS_PROPERTY_LOGICAL_AXIS flag"); \
|
2015-01-17 07:22:51 +03:00
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_LOGICAL_BLOCK_AXIS), \
|
|
|
|
"only properties defined with CSS_PROP_LOGICAL can use " \
|
|
|
|
"the CSS_PROPERTY_LOGICAL_BLOCK_AXIS flag"); \
|
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_LOGICAL_END_EDGE), \
|
|
|
|
"only properties defined with CSS_PROP_LOGICAL can use " \
|
2016-04-21 02:43:24 +03:00
|
|
|
"the CSS_PROPERTY_LOGICAL_END_EDGE flag");
|
2015-01-17 07:16:01 +03:00
|
|
|
#define CSS_PROP_LOGICAL(name_, id_, method_, flags_, pref_, parsevariant_, \
|
2015-01-17 07:43:20 +03:00
|
|
|
kwtable_, group_, stylestruct_, \
|
2015-01-17 07:22:51 +03:00
|
|
|
stylestructoffset_, animtype_) \
|
2015-01-17 07:16:01 +03:00
|
|
|
static_assert((flags_) & CSS_PROPERTY_LOGICAL, \
|
|
|
|
"properties defined with CSS_PROP_LOGICAL must also use " \
|
2015-01-17 07:16:01 +03:00
|
|
|
"the CSS_PROPERTY_LOGICAL flag"); \
|
|
|
|
static_assert(!((flags_) & CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED), \
|
|
|
|
"CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED has no effect " \
|
2015-01-17 07:43:20 +03:00
|
|
|
"on logical properties"); \
|
|
|
|
static_assert(!(((flags_) & CSS_PROPERTY_LOGICAL_AXIS) && \
|
|
|
|
((flags_) & CSS_PROPERTY_LOGICAL_END_EDGE)), \
|
|
|
|
"CSS_PROPERTY_LOGICAL_END_EDGE makes no sense when used " \
|
2016-04-21 02:43:24 +03:00
|
|
|
"with CSS_PROPERTY_LOGICAL_AXIS");
|
2015-01-17 07:16:01 +03:00
|
|
|
#include "nsCSSPropList.h"
|
|
|
|
#undef CSS_PROP_LOGICAL
|
|
|
|
#undef CSS_PROP
|
2015-09-22 08:58:20 +03:00
|
|
|
|
|
|
|
#include "nsCSSPropsGenerated.inc"
|