Backed out changeset afa417babef9 (bug 1842478) for causing mochitests failures in test_transitions_per_property.html. CLOSED TREE

This commit is contained in:
Stanca Serban 2024-05-14 08:00:39 +03:00
parent 3442f7cbc9
commit dd6e430c1b
20 changed files with 221 additions and 168 deletions

View File

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

View File

@ -4,6 +4,7 @@ prefs = [
"gfx.omta.background-color=true",
"layout.css.basic-shape-rect.enabled=true",
"layout.css.basic-shape-xywh.enabled=true",
"layout.css.individual-transform.enabled=true",
]
support-files = [
"testcommon.js",

View File

@ -3,6 +3,7 @@ prefs = [
"dom.animations-api.compositing.enabled=true",
"dom.animations-api.timelines.enabled=true",
"gfx.omta.background-color=true",
"layout.css.individual-transform.enabled=true",
"layout.css.scroll-driven-animations.enabled=true",
"gfx.font_loader.delay=0",
]

View File

@ -180,9 +180,9 @@ load 1509123.html
load 1494062-blob-image-wraplist-clip.html
load texture-allocator-zero-region.html
load 1524418.html
load 1529149.html
pref(layout.css.individual-transform.enabled,true) load 1529149.html
load 1541113.html
load 1547169.html
pref(layout.css.individual-transform.enabled,true) load 1547169.html
load 1535657.html
load 1566206.html
load 1615141.html

View File

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

View File

@ -1,6 +1,7 @@
[DEFAULT]
prefs = [
"dom.window.sizeToContent.enabled=true",
"layout.css.individual-transform.enabled=true",
]
skip-if = ["os == 'android'"]
support-files = [

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
== animate-layer-scale-inherit-4.html animate-layer-scale-inherit-4-ref.html
pref(layout.css.individual-transform.enabled,true) == 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
== transform-anon-block-1.html transform-anon-block-1-ref.html

View File

@ -307,7 +307,7 @@ load 1580307.html
load 1581579.html
skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) load 1593766.html # bug 1581896
load 1594949.html
load 1594960.html
pref(layout.css.individual-transform.enabled,true) load 1594960.html
load 1586444.html
load 1599286.html
load 1609786.html
@ -317,4 +317,4 @@ load 1639533.html
pref(layout.accessiblecaret.enabled,true) load 1640040.html
load 1806189-1.html
pref(layout.css.scroll-driven-animations.enabled,true) load 1821416.html
pref(dom.animations-api.compositing.enabled,true) load 1872309.html
pref(layout.css.individual-transform.enabled,true) pref(dom.animations-api.compositing.enabled,true) load 1872309.html

View File

@ -0,0 +1,65 @@
<!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

@ -4,6 +4,7 @@ prefs = [
"dom.animations-api.timelines.enabled=true",
"gfx.omta.background-color=true",
"gfx.font_loader.delay=0",
"layout.css.individual-transform.enabled=true",
"layout.css.motion-path-url.enabled=true",
"layout.css.backdrop-filter.enabled=true",
"layout.css.fit-content-function.enabled=true",
@ -645,6 +646,7 @@ 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"]

View File

@ -11960,120 +11960,122 @@ function get_computed_value(cs, property) {
}
}
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%)",
],
};
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.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)",
],
};
}
if (
IsCSSPropertyPrefEnabled("layout.css.transform-box-content-stroke.enabled")

View File

@ -266,49 +266,14 @@
p.remove();
})();
(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 = "";
})();
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv(
{
set: [['layout.css.individual-transform.enabled', true]],
},
() =>
window.open('file_specified_value_serialization_individual_transforms.html')
);
</script>
</pre>

View File

@ -303,9 +303,6 @@ var supported_properties = {
"transform-origin": [ test_length_pair_transition,
test_length_percent_pair_transition,
test_length_percent_pair_unclamped ],
"rotate": [ test_rotate_transition ],
"scale": [ test_scale_transition ],
"translate": [ test_translate_transition ],
"vertical-align": [ test_length_transition, test_percent_transition,
test_length_unclamped, test_percent_unclamped ],
"visibility": [ test_visibility_transition ],
@ -364,6 +361,12 @@ 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

@ -8766,6 +8766,12 @@
mirror: always
rust: true
# 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

@ -187,6 +187,7 @@ ${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",
affects="overflow",
@ -200,6 +201,7 @@ ${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",
affects="overflow",
@ -213,6 +215,7 @@ ${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",
affects="overflow",

View File

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

View File

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

View File

@ -1 +1 @@
prefs: [layout.css.basic-shape-rect.enabled:true, layout.css.basic-shape-shape.enabled:true, layout.css.basic-shape-xywh.enabled:true, layout.css.motion-path-url.enabled:true]
prefs: [layout.css.individual-transform.enabled:true, layout.css.basic-shape-rect.enabled:true, layout.css.basic-shape-shape.enabled:true, layout.css.basic-shape-xywh.enabled:true, layout.css.motion-path-url.enabled:true]

View File

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

View File

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