style: Make zoom: 0 mean the same as zoom: 1.

This matches the WebKit implementation, and is clearly a violation of the rules
we generally use for ranges in CSS.

But it seems to be depended-on legacy behavior, see the linked WebKit bug, this
bug, and bug 1593317.

Differential Revision: https://phabricator.services.mozilla.com/D51539
This commit is contained in:
Emilio Cobos Álvarez 2019-11-06 05:54:17 +00:00
parent d797b0e475
commit 9c1dd4b3ea
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A

View file

@ -464,11 +464,13 @@ ${helpers.two_properties_shorthand(
};
// Make sure that the initial value matches the values for the
// longhands, just for general sanity.
// longhands, just for general sanity. `zoom: 1` and `zoom: 0` are
// ignored, see [1][2]. They are just hack for the "has layout" mode on
// IE.
//
// FIXME: Should we just do this for the "normal" case? Seems weird
// either way, so maybe not?
Ok(if zoom.get() == 1.0 {
// [1]: https://bugs.webkit.org/show_bug.cgi?id=18467
// [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1593009
Ok(if zoom.get() == 1.0 || zoom.get() == 0.0 {
expanded! {
transform: Transform::none(),
transform_origin: TransformOrigin::initial_value(),