Bug 1842478 - Remove layout.css.individual-transform.enabled pref r=boris,devtools-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D184176
This commit is contained in:
Gregory Pappas 2023-07-23 14:24:59 +00:00
parent 290f09f319
commit ba080b120a
21 changed files with 173 additions and 224 deletions

View File

@ -9,7 +9,6 @@ const {
add_task(async function () {
await pushPref("layout.css.backdrop-filter.enabled", true);
await pushPref("layout.css.individual-transform.enabled", true);
await pushPref("layout.css.color-mix.enabled", true);
await addTab("about:blank");
await performTest();

View File

@ -5,7 +5,6 @@ prefs =
dom.animations.mainthread-synchronization-with-geometric-animations=true
gfx.omta.background-color=true
layout.css.basic-shape-xywh.enabled=true
layout.css.individual-transform.enabled=true
layout.css.motion-path.enabled=true
layout.css.motion-path-basic-shapes.enabled=true
layout.css.motion-path-coord-box.enabled=true

View File

@ -7,7 +7,6 @@ prefs =
dom.animations-api.timelines.enabled=true
gfx.omta.background-color=true
layout.css.motion-path.enabled=true
layout.css.individual-transform.enabled=true
layout.css.scroll-driven-animations.enabled=true
gfx.font_loader.delay=0
# Support files for chrome tests that we want to load over HTTP need

View File

@ -952,11 +952,7 @@ void AnimationInfo::AddAnimationsForDisplayItem(
? AnimationDataType::WithMotionPath
: AnimationDataType::WithoutMotionPath,
aPosition);
// Bug 1424900: Drop this pref check after shipping individual transforms.
// Bug 1582554: Drop this pref check after shipping motion path.
const bool hasMultipleTransformLikeProperties =
(StaticPrefs::layout_css_individual_transform_enabled() ||
StaticPrefs::layout_css_motion_path_enabled()) &&
aType == DisplayItemType::TYPE_TRANSFORM;
nsCSSPropertyIDSet nonAnimatingProperties =
nsCSSPropertyIDSet::TransformLikeProperties();

View File

@ -183,9 +183,9 @@ load 1509123.html
pref(widget.windows.window_occlusion_tracking.enabled,false) load 1494062-blob-image-wraplist-clip.html # Bug 1819154
load texture-allocator-zero-region.html
load 1524418.html
pref(layout.css.individual-transform.enabled,true) load 1529149.html
load 1529149.html
load 1541113.html
pref(layout.css.individual-transform.enabled,true) load 1547169.html
load 1547169.html
load 1535657.html
load 1566206.html
load 1615141.html

View File

@ -517,7 +517,7 @@ load 1506314.html
load 1507244.html
load 1510080.html
load 1510485.html
pref(layout.css.individual-transform.enabled,true) load 1511442.html
load 1511442.html
load 1511535.html
load 1511563.html
load 1516286-empty-mask.html

View File

@ -1,7 +1,6 @@
[DEFAULT]
prefs =
dom.window.sizeToContent.enabled=true
layout.css.individual-transform.enabled=true
layout.css.motion-path.enabled=true
layout.css.page-size.enabled=true
skip-if = os == 'android'

View File

@ -149,7 +149,7 @@ fails == translate-rounding-3.html translate-rounding-viewport-ref.html # bug 13
== invalidate-transform-1.html invalidate-transform-1-ref.html
== invalidate-svg-scale-1.html invalidate-svg-scale-1-ref.html
# Bug 1526847
pref(layout.css.individual-transform.enabled,true) == animate-layer-scale-inherit-4.html animate-layer-scale-inherit-4-ref.html
== animate-layer-scale-inherit-4.html animate-layer-scale-inherit-4-ref.html
fuzzy-if(winWidget,0-1,0-1000) == 1569215-1.html 1569215-1-ref.html
test-pref(layout.css.zoom-transform-hack.enabled,true) == zoom-hack-1.html zoom-hack-ref.html

View File

@ -312,7 +312,7 @@ load 1580307.html
load 1581579.html
skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) load 1593766.html # bug 1581896
pref(layout.css.motion-path.enabled,true) load 1594949.html
pref(layout.css.motion-path.enabled,true) pref(layout.css.individual-transform.enabled,true) load 1594960.html
pref(layout.css.motion-path.enabled,true) load 1594960.html
load 1586444.html
load 1599286.html
pref(layout.css.motion-path.enabled,true) load 1609786.html

View File

@ -1,65 +0,0 @@
<!doctype html>
<meta charset=utf-8>
<title>Test for Bug 1207734 (individual transforms)</title>
<!--
FIXME: This is only here in a separate file since it needs the
layout.css.individual-transform.enabled pref to be set when it runs and the
pref= annotation in mochitest.ini doesn't work on Android (bug 1393326).
Once we turn on that pref by default or fix bug 1393326 we can move this back
into test_specified_value_serialization.html.
-->
<script>
const is = opener.is.bind(opener);
function finish() {
const o = opener;
self.close();
o.SimpleTest.finish();
}
function runTest() {
// Test for rotate property serialization.
[
[" 90deg ", "90deg"],
[" 100grad ", "100grad"],
[" 100gRaD ", "100grad"],
[" 0.25turn ", "0.25turn"],
[" 0.25tUrN ", "0.25turn"],
[" 1.57RaD ", "1.57rad"],
].forEach(function(arr) {
document.documentElement.style.rotate = arr[0];
is(document.documentElement.style.rotate, arr[1],
"bug-1207734: incorrect rotate serialization");
});
document.documentElement.style.rotate = "";
// Test for translate property serialization.
[
[" 50% 5px 6px ", "50% 5px 6px"],
[" 50% 10px 100px ", "50% 10px 100px"],
[" 4px 5px ", "4px 5px"],
[" 10% 10% 99px ", "10% 10% 99px"],
[" 50px ", "50px"],
].forEach(function(arr) {
document.documentElement.style.translate = arr[0];
is(document.documentElement.style.translate, arr[1],
"bug-1207734: incorrect translate serialization");
});
document.documentElement.style.translate = "";
// Test for scale property serialization.
[
[" 10 ", "10"],
[" 10 20.5 ", "10 20.5"],
[" 10 20 30 ", "10 20 30"],
].forEach(function(arr) {
document.documentElement.style.scale = arr[0];
is(document.documentElement.style.scale, arr[1],
"bug-1207734: incorrect scale serialization");
});
document.documentElement.style.scale = "";
}
runTest();
finish();
</script>

View File

@ -9,7 +9,6 @@ prefs =
gfx.omta.background-color=true
gfx.font_loader.delay=0
layout.css.container-queries.enabled=true
layout.css.individual-transform.enabled=true
layout.css.motion-path.enabled=true
layout.css.motion-path-ray.enabled=true
layout.css.motion-path-basic-shapes.enabled=true
@ -375,7 +374,6 @@ support-files = file_shared_sheet_caching.css file_shared_sheet_caching.html
fail-if = xorigin
[test_shorthand_property_getters.html]
[test_specified_value_serialization.html]
support-files = file_specified_value_serialization_individual_transforms.html
[test_style_attr_listener.html]
[test_style_attribute_quirks.html]
[test_style_attribute_standards.html]

View File

@ -11817,122 +11817,120 @@ function get_computed_value(cs, property) {
}
}
if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
gCSSProperties.rotate = {
domProp: "rotate",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: ["none"],
other_values: [
"45deg",
"45grad",
"72rad",
"0.25turn",
".57rad",
"0 0 0 0rad",
"0 0 1 45deg",
"0 0 1 0rad",
"0rad 0 0 1",
"10rad 10 20 30",
"x 10rad",
"y 10rad",
"z 10rad",
"10rad x",
"10rad y",
"10rad z",
/* valid calc() values */
"calc(1) 0 0 calc(45deg + 5rad)",
"0 1 0 calc(400grad + 1rad)",
"calc(0.5turn + 10deg)",
],
invalid_values: [
"0",
"7",
"0, 0, 1, 45deg",
"0 0 45deg",
"0 0 20rad",
"0 0 0 0",
"x x 10rad",
"x y 10rad",
"0 0 1 10rad z",
"0 0 1 z 10rad",
"z 0 0 1 10rad",
"0 0 z 1 10rad",
/* invalid calc() values */
"0.5 1 0 calc(45deg + 10)",
"calc(0.5turn + 10%)",
],
};
gCSSProperties.rotate = {
domProp: "rotate",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: ["none"],
other_values: [
"45deg",
"45grad",
"72rad",
"0.25turn",
".57rad",
"0 0 0 0rad",
"0 0 1 45deg",
"0 0 1 0rad",
"0rad 0 0 1",
"10rad 10 20 30",
"x 10rad",
"y 10rad",
"z 10rad",
"10rad x",
"10rad y",
"10rad z",
/* valid calc() values */
"calc(1) 0 0 calc(45deg + 5rad)",
"0 1 0 calc(400grad + 1rad)",
"calc(0.5turn + 10deg)",
],
invalid_values: [
"0",
"7",
"0, 0, 1, 45deg",
"0 0 45deg",
"0 0 20rad",
"0 0 0 0",
"x x 10rad",
"x y 10rad",
"0 0 1 10rad z",
"0 0 1 z 10rad",
"z 0 0 1 10rad",
"0 0 z 1 10rad",
/* invalid calc() values */
"0.5 1 0 calc(45deg + 10)",
"calc(0.5turn + 10%)",
],
};
gCSSProperties.translate = {
domProp: "translate",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { width: "10px", height: "10px", display: "block" },
initial_values: ["none"],
other_values: [
"-4px",
"3px",
"4em",
"50%",
"4px 5px 6px",
"4px 5px",
"50% 5px 6px",
"50% 10% 6em",
/* valid calc() values */
"calc(5px + 10%)",
"calc(0.25 * 5px + 10% / 3)",
"calc(5px - 10% * 3)",
"calc(5px - 3 * 10%) 50px",
"-50px calc(5px - 10% * 3)",
"10px calc(min(5px,10%))",
],
invalid_values: [
"1",
"-moz-min(5px,10%)",
"4px, 5px, 6px",
"3px 4px 1px 7px",
"4px 5px 10%",
/* invalid calc() values */
"calc(max(5px,10%) 10%)",
"calc(nonsense)",
],
};
gCSSProperties.scale = {
domProp: "scale",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: ["none"],
other_values: [
"10",
"10%",
"10 20",
"10% 20%",
"10 20 30",
"10% 20% 30%",
"10 20% 30",
"-10",
"-10%",
"-10 20",
"-10% 20%",
"-10 20 -30",
"-10% 20% -30%",
"-10 20% -30",
"0 2.0",
/* valid calc() values */
"calc(1 + 2)",
"calc(10) calc(20) 30",
],
invalid_values: [
"10px",
"10deg",
"10, 20, 30",
/* invalid calc() values */
"calc(1 + 20%)",
"10 calc(1 + 10px)",
],
};
}
gCSSProperties.translate = {
domProp: "translate",
inherited: false,
type: CSS_TYPE_LONGHAND,
prerequisites: { width: "10px", height: "10px", display: "block" },
initial_values: ["none"],
other_values: [
"-4px",
"3px",
"4em",
"50%",
"4px 5px 6px",
"4px 5px",
"50% 5px 6px",
"50% 10% 6em",
/* valid calc() values */
"calc(5px + 10%)",
"calc(0.25 * 5px + 10% / 3)",
"calc(5px - 10% * 3)",
"calc(5px - 3 * 10%) 50px",
"-50px calc(5px - 10% * 3)",
"10px calc(min(5px,10%))",
],
invalid_values: [
"1",
"-moz-min(5px,10%)",
"4px, 5px, 6px",
"3px 4px 1px 7px",
"4px 5px 10%",
/* invalid calc() values */
"calc(max(5px,10%) 10%)",
"calc(nonsense)",
],
};
gCSSProperties.scale = {
domProp: "scale",
inherited: false,
type: CSS_TYPE_LONGHAND,
initial_values: ["none"],
other_values: [
"10",
"10%",
"10 20",
"10% 20%",
"10 20 30",
"10% 20% 30%",
"10 20% 30",
"-10",
"-10%",
"-10 20",
"-10% 20%",
"-10 20 -30",
"-10% 20% -30%",
"-10 20% -30",
"0 2.0",
/* valid calc() values */
"calc(1 + 2)",
"calc(10) calc(20) 30",
],
invalid_values: [
"10px",
"10deg",
"10, 20, 30",
/* invalid calc() values */
"calc(1 + 20%)",
"10 calc(1 + 10px)",
],
};
gCSSProperties["touch-action"] = {
domProp: "touchAction",

View File

@ -266,15 +266,49 @@
p.remove();
})();
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv(
{
set: [['layout.css.individual-transform.enabled', true]],
},
() =>
window.open('file_specified_value_serialization_individual_transforms.html')
);
(function test_bug_1207734 () {
// Test for rotate property serialization.
[
[" 90deg ", "90deg"],
[" 100grad ", "100grad"],
[" 100gRaD ", "100grad"],
[" 0.25turn ", "0.25turn"],
[" 0.25tUrN ", "0.25turn"],
[" 1.57RaD ", "1.57rad"],
].forEach(function(arr) {
document.documentElement.style.rotate = arr[0];
is(document.documentElement.style.rotate, arr[1],
"bug-1207734: incorrect rotate serialization");
});
document.documentElement.style.rotate = "";
// Test for translate property serialization.
[
[" 50% 5px 6px ", "50% 5px 6px"],
[" 50% 10px 100px ", "50% 10px 100px"],
[" 4px 5px ", "4px 5px"],
[" 10% 10% 99px ", "10% 10% 99px"],
[" 50px ", "50px"],
].forEach(function(arr) {
document.documentElement.style.translate = arr[0];
is(document.documentElement.style.translate, arr[1],
"bug-1207734: incorrect translate serialization");
});
document.documentElement.style.translate = "";
// Test for scale property serialization.
[
[" 10 ", "10"],
[" 10 20.5 ", "10 20.5"],
[" 10 20 30 ", "10 20 30"],
].forEach(function(arr) {
document.documentElement.style.scale = arr[0];
is(document.documentElement.style.scale, arr[1],
"bug-1207734: incorrect scale serialization");
});
document.documentElement.style.scale = "";
})()
</script>
</pre>
</body>

View File

@ -350,6 +350,15 @@ var supported_properties = {
test_length_transition, test_percent_transition,
test_length_clamped, test_percent_clamped,
],
"rotate": [
test_rotate_transition
],
"scale": [
test_scale_transition
],
"translate": [
test_translate_transition
],
};
if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
@ -360,12 +369,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
supported_properties["font-variation-settings"] = [ test_font_variations_transition ];
}
if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
supported_properties["rotate"] = [ test_rotate_transition ];
supported_properties["scale"] = [ test_scale_transition ];
supported_properties["translate"] = [ test_translate_transition ];
}
if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
supported_properties["contain-intrinsic-width"] = [ test_length_transition, test_auto_with_length_transition ];
supported_properties["contain-intrinsic-height"] = supported_properties["contain-intrinsic-width"];

View File

@ -8545,12 +8545,6 @@
value: true
mirror: always
# Is support for CSS individual transform enabled?
- name: layout.css.individual-transform.enabled
type: bool
value: true
mirror: always
# Is support for CSS initial-letter property enabled?
- name: layout.css.initial-letter.enabled
type: bool

View File

@ -179,7 +179,6 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
servo_restyle_damage = "reflow_out_of_flow",
)}
@ -192,7 +191,6 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
servo_restyle_damage = "reflow_out_of_flow",
)}
@ -205,7 +203,6 @@ ${helpers.predefined_type(
animation_value_type="ComputedValue",
boxed=True,
flags="CAN_ANIMATE_ON_COMPOSITOR",
gecko_pref="layout.css.individual-transform.enabled",
spec="https://drafts.csswg.org/css-transforms-2/#individual-transforms",
servo_restyle_damage="reflow_out_of_flow",
)}

View File

@ -1,2 +0,0 @@
[position-absolute-dynamic-static-position-table-cell.html]
prefs: [layout.css.individual-transform.enabled:true]

View File

@ -1,2 +1,2 @@
prefs: [layout.css.individual-transform.enabled:true, dom.animations-api.compositing.enabled:true, layout.css.backdrop-filter.enabled:true]
prefs: [dom.animations-api.compositing.enabled:true, layout.css.backdrop-filter.enabled:true]
leak-threshold: [default:51200]

View File

@ -1 +1 @@
prefs: [layout.css.motion-path.enabled:true, layout.css.individual-transform.enabled:true, dom.animations-api.core.enabled:true, layout.css.motion-path-ray.enabled:true, layout.css.motion-path-offset-position.enabled:true, layout.css.motion-path-basic-shapes.enabled:true, layout.css.motion-path-coord-box.enabled:true, layout.css.basic-shape-xywh.enabled:true]
prefs: [layout.css.motion-path.enabled:true, dom.animations-api.core.enabled:true, layout.css.motion-path-ray.enabled:true, layout.css.motion-path-offset-position.enabled:true, layout.css.motion-path-basic-shapes.enabled:true, layout.css.motion-path-coord-box.enabled:true, layout.css.basic-shape-xywh.enabled:true]

View File

@ -1 +1 @@
prefs: [layout.css.individual-transform.enabled:true, layout.css.motion-path.enabled:true]
prefs: [layout.css.motion-path.enabled:true]

View File

@ -1 +1 @@
prefs: [layout.css.scroll-driven-animations.enabled:true, layout.css.individual-transform.enabled:true]
prefs: [layout.css.scroll-driven-animations.enabled:true]