зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1665638 - Remove layout.css.clip-path-path.enabled.r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D120235
This commit is contained in:
Родитель
4175e07109
Коммит
05e2031f5f
|
@ -8569,13 +8569,19 @@ var gCSSProperties = {
|
|||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["none"],
|
||||
other_values: [
|
||||
"path(evenodd, '')",
|
||||
"path(nonzero, 'M 10 10 h 100 v 100 h-100 v-100 z')",
|
||||
"path(evenodd, 'M 10 10 h 100 v 100 h-100 v-100 z')",
|
||||
"path('M10,30A20,20 0,0,1 50,30A20,20 0,0,1 90,30Q90,60 50,90Q10,60 10,30z')",
|
||||
"url(#mypath)",
|
||||
"url('404.svg#mypath')",
|
||||
"url(#my-clip-path)",
|
||||
]
|
||||
.concat(basicShapeSVGBoxValues)
|
||||
.concat(basicShapeOtherValues),
|
||||
invalid_values: basicShapeInvalidValues,
|
||||
invalid_values: ["path(nonzero)", "path(abs, 'M 10 10 L 10 10 z')"].concat(
|
||||
basicShapeInvalidValues
|
||||
),
|
||||
unbalanced_values: basicShapeUnbalancedValues,
|
||||
},
|
||||
"clip-rule": {
|
||||
|
@ -13224,20 +13230,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) {
|
|||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.clip-path-path.enabled")) {
|
||||
gCSSProperties["clip-path"].other_values.push(
|
||||
"path(evenodd, '')",
|
||||
"path(nonzero, 'M 10 10 h 100 v 100 h-100 v-100 z')",
|
||||
"path(evenodd, 'M 10 10 h 100 v 100 h-100 v-100 z')",
|
||||
"path('M10,30A20,20 0,0,1 50,30A20,20 0,0,1 90,30Q90,60 50,90Q10,60 10,30z')"
|
||||
);
|
||||
|
||||
gCSSProperties["clip-path"].invalid_values.push(
|
||||
"path(nonzero)",
|
||||
"path(abs, 'M 10 10 L 10 10 z')"
|
||||
);
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.d-property.enabled")) {
|
||||
gCSSProperties["d"] = {
|
||||
domProp: "d",
|
||||
|
|
|
@ -134,7 +134,8 @@ var supported_properties = {
|
|||
test_currentcolor_transition,
|
||||
test_auto_color_transition ],
|
||||
"clip": [ test_rect_transition ],
|
||||
"clip-path": [ test_basic_shape_or_url_transition ],
|
||||
"clip-path": [ test_basic_shape_or_url_transition,
|
||||
test_path_function ],
|
||||
"color": [ test_color_transition,
|
||||
test_currentcolor_transition ],
|
||||
"fill": [ test_color_transition,
|
||||
|
@ -408,10 +409,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.motion-path.enabled")) {
|
|||
[ test_background_position_transition ];
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.clip-path-path.enabled")) {
|
||||
supported_properties["clip-path"].push(test_path_function);
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.d-property.enabled")) {
|
||||
supported_properties["d"] = [ test_path_function ];
|
||||
}
|
||||
|
|
|
@ -6833,13 +6833,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is path() supported in clip-path?
|
||||
- name: layout.css.clip-path-path.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Is the image-set() function enabled?
|
||||
- name: layout.css.image-set.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
|
|
@ -55,15 +55,6 @@ pub type ShapeRadius = generic::ShapeRadius<NonNegativeLengthPercentage>;
|
|||
/// The specified value of `Polygon`
|
||||
pub type Polygon = generic::GenericPolygon<LengthPercentage>;
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn is_clip_path_path_enabled(context: &ParserContext) -> bool {
|
||||
context.chrome_rules_enabled() || static_prefs::pref!("layout.css.clip-path-path.enabled")
|
||||
}
|
||||
#[cfg(feature = "servo")]
|
||||
fn is_clip_path_path_enabled(_: &ParserContext) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// A helper for both clip-path and shape-outside parsing of shapes.
|
||||
fn parse_shape_or_box<'i, 't, R, ReferenceBox>(
|
||||
context: &ParserContext,
|
||||
|
@ -116,10 +107,8 @@ impl Parse for ClipPath {
|
|||
return Ok(ClipPath::None);
|
||||
}
|
||||
|
||||
if is_clip_path_path_enabled(context) {
|
||||
if let Ok(p) = input.try_parse(|i| Path::parse(context, i)) {
|
||||
return Ok(ClipPath::Path(p));
|
||||
}
|
||||
if let Ok(p) = input.try_parse(|i| Path::parse(context, i)) {
|
||||
return Ok(ClipPath::Path(p));
|
||||
}
|
||||
|
||||
if let Ok(url) = input.try_parse(|i| SpecifiedUrl::parse(context, i)) {
|
||||
|
|
|
@ -28,5 +28,3 @@ user_pref("dom.gamepad.enabled", true);
|
|||
user_pref("dom.gamepad.non_standard_events.enabled", true);
|
||||
// Enable form autofill feature testing.
|
||||
user_pref("extensions.formautofill.available", "on");
|
||||
// Enable CSS clip-path `path()` for testing
|
||||
user_pref("layout.css.clip-path-path.enabled", true);
|
||||
|
|
Загрузка…
Ссылка в новой задаче