mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 842772 - Don't test for mask-type when the pref is disabled. r=dbaron
This commit is contained in:
parent
c248494ae8
commit
b78d8bd4ff
@ -12,6 +12,7 @@
|
||||
struct PropertyInfo {
|
||||
const char *propName;
|
||||
const char *domName;
|
||||
const char *pref;
|
||||
};
|
||||
|
||||
const PropertyInfo gLonghandProperties[] = {
|
||||
@ -19,7 +20,7 @@ const PropertyInfo gLonghandProperties[] = {
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
#define CSS_PROP(name_, id_, method_, flags_, pref_, parsevariant_, kwtable_, \
|
||||
stylestruct_, stylestructoffset_, animtype_) \
|
||||
{ #name_, #method_ },
|
||||
{ #name_, #method_, pref_ },
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
@ -52,9 +53,9 @@ const PropertyInfo gShorthandProperties[] = {
|
||||
#define CSS_PROP_DOMPROP_PREFIXED(prop_) Moz ## prop_
|
||||
// Need an extra level of macro nesting to force expansion of method_
|
||||
// params before they get pasted.
|
||||
#define LISTCSSPROPERTIES_INNER_MACRO(method_) #method_,
|
||||
#define LISTCSSPROPERTIES_INNER_MACRO(method_) #method_
|
||||
#define CSS_PROP_SHORTHAND(name_, id_, method_, flags_, pref_) \
|
||||
{ #name_, LISTCSSPROPERTIES_INNER_MACRO(method_) },
|
||||
{ #name_, LISTCSSPROPERTIES_INNER_MACRO(method_), pref_ },
|
||||
|
||||
#include "nsCSSPropList.h"
|
||||
|
||||
@ -63,7 +64,7 @@ const PropertyInfo gShorthandProperties[] = {
|
||||
#undef CSS_PROP_DOMPROP_PREFIXED
|
||||
|
||||
#define CSS_PROP_ALIAS(name_, id_, method_, pref_) \
|
||||
{ #name_, #method_ },
|
||||
{ #name_, #method_, #pref_ },
|
||||
|
||||
#include "nsCSSPropAliasList.h"
|
||||
|
||||
@ -191,7 +192,15 @@ print_array(const char *aName,
|
||||
// lowercase the first letter
|
||||
printf("\"%c%s\"", p->domName[0] + 32, p->domName + 1);
|
||||
}
|
||||
printf("}");
|
||||
if (p->pref && p->pref[0]) {
|
||||
printf(", pref: ");
|
||||
if (p->pref[0] == '\"') {
|
||||
printf("%s", p->pref);
|
||||
} else {
|
||||
printf("\"%s\"", p->pref);
|
||||
}
|
||||
}
|
||||
printf(" }");
|
||||
}
|
||||
|
||||
if (j != aDOMPropsLength) {
|
||||
|
@ -3583,14 +3583,6 @@ var gCSSProperties = {
|
||||
other_values: [ "url(#mymask)" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"mask-type": {
|
||||
domProp: "maskType",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "luminance" ],
|
||||
other_values: [ "alpha" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"shape-rendering": {
|
||||
domProp: "shapeRendering",
|
||||
inherited: true,
|
||||
@ -4257,6 +4249,17 @@ if (SpecialPowers.getBoolPref("layout.css.flexbox.enabled")) {
|
||||
gCSSProperties["display"].other_values.push("inline-flex");
|
||||
}
|
||||
|
||||
if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) {
|
||||
gCSSProperties["mask-type"] = {
|
||||
domProp: "maskType",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "luminance" ],
|
||||
other_values: [ "alpha" ],
|
||||
invalid_values: []
|
||||
};
|
||||
}
|
||||
|
||||
if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) {
|
||||
gCSSProperties["paint-order"] = {
|
||||
domProp: "paintOrder",
|
||||
|
@ -33,6 +33,9 @@
|
||||
|
||||
for (var idx in gLonghandProperties) {
|
||||
var prop = gLonghandProperties[idx];
|
||||
if (prop.pref && !SpecialPowers.getBoolPref(prop.pref)) {
|
||||
continue;
|
||||
}
|
||||
var present = prop.name in gCSSProperties;
|
||||
ok(present,
|
||||
"'" + prop.name + "' listed in gCSSProperties");
|
||||
@ -45,6 +48,9 @@ for (var idx in gLonghandProperties) {
|
||||
}
|
||||
for (var idx in gShorthandProperties) {
|
||||
var prop = gShorthandProperties[idx];
|
||||
if (prop.pref && !SpecialPowers.getBoolPref(prop.pref)) {
|
||||
continue;
|
||||
}
|
||||
var present = prop.name in gCSSProperties;
|
||||
ok(present,
|
||||
"'" + prop.name + "' listed in gCSSProperties");
|
||||
@ -58,6 +64,9 @@ for (var idx in gShorthandProperties) {
|
||||
}
|
||||
for (var idx in gShorthandPropertiesLikeLonghand) {
|
||||
var prop = gShorthandPropertiesLikeLonghand[idx];
|
||||
if (prop.pref && !SpecialPowers.getBoolPref(prop.pref)) {
|
||||
continue;
|
||||
}
|
||||
var present = prop.name in gCSSProperties;
|
||||
ok(present,
|
||||
"'" + prop.name + "' listed in gCSSProperties");
|
||||
@ -75,6 +84,9 @@ for (var idx in gShorthandPropertiesLikeLonghand) {
|
||||
*/
|
||||
for (var prop in gCSSProperties) {
|
||||
var info = gCSSProperties[prop];
|
||||
if (info.pref && !SpecialPowers.getBoolPref(info.pref)) {
|
||||
continue;
|
||||
}
|
||||
if (info.type == CSS_TYPE_LONGHAND) {
|
||||
ok(!("subproperties" in info),
|
||||
"longhand property '" + prop + "' must not have subproperty list");
|
||||
|
Loading…
Reference in New Issue
Block a user