forked from mirrors/gecko-dev
Bug 1746528 - Remove aspect-ratio preference. r=emilio
We shipped this in Firefox 89, one year ago. It should be okay to drop this preference now. Differential Revision: https://phabricator.services.mozilla.com/D153680
This commit is contained in:
parent
d9eb91264a
commit
82bf45d69f
14 changed files with 54 additions and 82 deletions
|
|
@ -11708,10 +11708,6 @@ exports.PSEUDO_ELEMENTS = [
|
|||
* exposed for testing purposes.
|
||||
*/
|
||||
exports.PREFERENCES = [
|
||||
[
|
||||
"aspect-ratio",
|
||||
"layout.css.aspect-ratio.enabled"
|
||||
],
|
||||
[
|
||||
"container-type",
|
||||
"layout.css.container-queries.enabled"
|
||||
|
|
|
|||
|
|
@ -796,9 +796,9 @@ pref(layout.css.grid-item-baxis-measurement.enabled,true) load 1682686-2.html
|
|||
HTTP load 1682882.html
|
||||
load 1683126.html
|
||||
load 1697262-1.html
|
||||
pref(layout.css.aspect-ratio.enabled,true) load 1682032.html
|
||||
pref(layout.css.aspect-ratio.enabled,true) load 1699263.html
|
||||
pref(layout.css.aspect-ratio.enabled,true) load 1699468.html
|
||||
load 1682032.html
|
||||
load 1699263.html
|
||||
load 1699468.html
|
||||
load 1728319.html
|
||||
asserts(2-8) load 1730506.html # asserts from integer overflow & bogus sizes
|
||||
asserts(1-4) load 1730570.html # asserts from integer overflow & bogus sizes
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ prefs =
|
|||
gfx.omta.background-color=true
|
||||
gfx.font_loader.delay=0
|
||||
layout.css.accent-color.enabled=true
|
||||
layout.css.aspect-ratio.enabled=true
|
||||
layout.css.constructable-stylesheets.enabled=true
|
||||
layout.css.individual-transform.enabled=true
|
||||
layout.css.motion-path.enabled=true
|
||||
|
|
|
|||
|
|
@ -1685,6 +1685,25 @@ var gCSSProperties = {
|
|||
alias_for: "appearance",
|
||||
subproperties: ["appearance"],
|
||||
},
|
||||
"aspect-ratio": {
|
||||
domProp: "aspectRatio",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["auto"],
|
||||
other_values: [
|
||||
"1",
|
||||
"1.0",
|
||||
"1 / 2",
|
||||
"1/2",
|
||||
"16.2 / 9.5",
|
||||
"1/0",
|
||||
"0/1",
|
||||
"0 / 0",
|
||||
"auto 1",
|
||||
"0 auto",
|
||||
],
|
||||
invalid_values: ["none", "1 test", "1 / auto", "auto / 1"],
|
||||
},
|
||||
"border-inline": {
|
||||
domProp: "borderInline",
|
||||
inherited: false,
|
||||
|
|
@ -13492,28 +13511,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.zoom-transform-hack.enabled")) {
|
|||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.aspect-ratio.enabled")) {
|
||||
gCSSProperties["aspect-ratio"] = {
|
||||
domProp: "aspectRatio",
|
||||
inherited: false,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: ["auto"],
|
||||
other_values: [
|
||||
"1",
|
||||
"1.0",
|
||||
"1 / 2",
|
||||
"1/2",
|
||||
"16.2 / 9.5",
|
||||
"1/0",
|
||||
"0/1",
|
||||
"0 / 0",
|
||||
"auto 1",
|
||||
"0 auto",
|
||||
],
|
||||
invalid_values: ["none", "1 test", "1 / auto", "auto / 1"],
|
||||
};
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.math-depth.enabled")) {
|
||||
gCSSProperties["math-depth"] = {
|
||||
domProp: "mathDepth",
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ var FUNC_NEGATIVE = "cubic-bezier(0.25, -2, 0.75, 1)";
|
|||
var FUNC_OVERONE = "cubic-bezier(0.25, 0, 0.75, 3)";
|
||||
|
||||
var supported_properties = {
|
||||
"aspect-ratio" : [ test_aspect_ratio_transition ],
|
||||
"border-bottom-left-radius": [ test_radius_transition ],
|
||||
"border-bottom-right-radius": [ test_radius_transition ],
|
||||
"border-top-left-radius": [ test_radius_transition ],
|
||||
|
|
@ -424,40 +425,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
|
|||
supported_properties["translate"] = [ test_translate_transition ];
|
||||
}
|
||||
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.aspect-ratio.enabled")) {
|
||||
function test_aspect_ratio_transition(prop) {
|
||||
[
|
||||
// No transition between auto and <ratio>.
|
||||
{ start: "auto", end: "1 / 1",
|
||||
expected: "1 / 1" },
|
||||
// No transition between auto && <ratio> and <ratio>.
|
||||
{ start: "auto 1 / 1", end: "1 / 1",
|
||||
expected: "1 / 1" },
|
||||
// No transition between auto && <ratio> and auto.
|
||||
{ start: "auto 1 / 1", end: "auto",
|
||||
expected: "auto" },
|
||||
{ start: "1 / 2", end: "8 / 1",
|
||||
expected: "1 / 1" },
|
||||
{ start: "auto 1 / 2", end: "auto 8 / 1",
|
||||
expected: "auto 1 / 1" },
|
||||
].forEach(test => {
|
||||
div.style.transitionProperty = 'none';
|
||||
div.style[prop] = test.start;
|
||||
is(cs[prop], test.start,
|
||||
`aspect-ratio: computed value before transition`);
|
||||
div.style.transitionProperty = prop;
|
||||
div.style[prop] = test.end;
|
||||
is(cs[prop], test.expected,
|
||||
`aspect-ratio: interpolation of aspect-ratio`);
|
||||
// We check distance only if there is a transition.
|
||||
if (test.end != test.expected) {
|
||||
check_distance(prop, test.start, test.expected, test.end);
|
||||
}
|
||||
});
|
||||
}
|
||||
supported_properties["aspect-ratio"] = [ test_aspect_ratio_transition ];
|
||||
}
|
||||
|
||||
supported_properties["scrollbar-color"] = [
|
||||
test_scrollbar_color_transition,
|
||||
];
|
||||
|
|
@ -3099,6 +3066,37 @@ function test_font_variations_transition(prop) {
|
|||
check_distance(prop, "\"wght\" 2, \"wdth\" 0.5", "\"wght\" 1.5, \"wdth\" 0.75", "\"wght\" 0, \"wdth\" 1.5");
|
||||
}
|
||||
|
||||
function test_aspect_ratio_transition(prop) {
|
||||
[
|
||||
// No transition between auto and <ratio>.
|
||||
{ start: "auto", end: "1 / 1",
|
||||
expected: "1 / 1" },
|
||||
// No transition between auto && <ratio> and <ratio>.
|
||||
{ start: "auto 1 / 1", end: "1 / 1",
|
||||
expected: "1 / 1" },
|
||||
// No transition between auto && <ratio> and auto.
|
||||
{ start: "auto 1 / 1", end: "auto",
|
||||
expected: "auto" },
|
||||
{ start: "1 / 2", end: "8 / 1",
|
||||
expected: "1 / 1" },
|
||||
{ start: "auto 1 / 2", end: "auto 8 / 1",
|
||||
expected: "auto 1 / 1" },
|
||||
].forEach(test => {
|
||||
div.style.transitionProperty = 'none';
|
||||
div.style[prop] = test.start;
|
||||
is(cs[prop], test.start,
|
||||
`aspect-ratio: computed value before transition`);
|
||||
div.style.transitionProperty = prop;
|
||||
div.style[prop] = test.end;
|
||||
is(cs[prop], test.expected,
|
||||
`aspect-ratio: interpolation of aspect-ratio`);
|
||||
// We check distance only if there is a transition.
|
||||
if (test.end != test.expected) {
|
||||
check_distance(prop, test.start, test.expected, test.end);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var OMTAdiv;
|
||||
var OMTACs;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ const TESTS = [
|
|||
];
|
||||
|
||||
add_task(async function() {
|
||||
await SpecialPowers.pushPrefEnv({ "set": [["layout.css.aspect-ratio.enabled", true]] });
|
||||
|
||||
for (let test of TESTS) {
|
||||
for (let crossorigin of [false, true]) {
|
||||
let host = crossorigin ? "http://example.org" : "http://mochi.test:8888";
|
||||
|
|
|
|||
|
|
@ -7646,13 +7646,6 @@
|
|||
value: false
|
||||
mirror: always
|
||||
|
||||
# Whether the `aspect-ratio` in css-sizing-4 is enabled.
|
||||
- name: layout.css.aspect-ratio.enabled
|
||||
type: bool
|
||||
value: true
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Is the codepath for using cached scrollbar styles enabled?
|
||||
- name: layout.css.cached-scrollbar-styles.enabled
|
||||
type: bool
|
||||
|
|
|
|||
|
|
@ -457,7 +457,6 @@ ${helpers.predefined_type(
|
|||
engines="gecko servo-2013",
|
||||
animation_value_type="ComputedValue",
|
||||
spec="https://drafts.csswg.org/css-sizing-4/#aspect-ratio",
|
||||
gecko_pref="layout.css.aspect-ratio.enabled",
|
||||
servo_restyle_damage="reflow",
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
leak-threshold: [default:51200, tab:51200]
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
leak-threshold: [rdd:51200]
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
[canvas-aspect-ratio.html]
|
||||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
[img-aspect-ratio.html]
|
||||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
[picture-aspect-ratio.html]
|
||||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
[Computed style for width/height/aspect-ratio]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
[video-aspect-ratio.html]
|
||||
prefs: [layout.css.aspect-ratio.enabled:true]
|
||||
expected:
|
||||
if (os == "mac") and not debug: [OK, TIMEOUT]
|
||||
[Video width and height attributes are not used to infer aspect-ratio]
|
||||
|
|
|
|||
Loading…
Reference in a new issue