This is only used to emit a single error, which can be done using `syn`.
Removing the use of this feature brings us close to being to able to
compile with stable rust.
This Servo-specific extension is unused by any code in the repository
and removing it allows us to remove use of nightly only reliance on
rust intrinsics. This is a step toward supporting stable rust.
* update init as we initialize media in the background now
With [#405](https://github.com/servo/media/pull/405) changes in
servo/media we move initialization of the media engine to a
background thread. This PR updates the init function in libservo
to adapt that behaviour.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* review fix: simplify code
* Update media
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
Layout asserts that it never creates stacking contexts that have a zero
scale, yet it doesn't prevent the creation of those stacking contexts.
This change stops their creation at an earlier stage.
Fixes#30118.
* convert border and padding to app units in flexbox
* convert margin to app units in flexbox
* cleanup, fmt
* add todo comment
* fmt
* add comment
* use Length instead of CSSPixelLength: they are same
Per the spec update, the new syntax is:
`ray() = ray( <angle> && <ray-size>? && contain? )`
And for `<ray-size>`:
"If no <ray-size> is specified it defaults to closest-side."
So `<ray-size>` is optional and we omit it if it's default value, for
serialization.
By the way, offset=* properties are supported only in Gecko, so we don't
need a servo function to check the preference.
Differential Revision: https://phabricator.services.mozilla.com/D171625
Make display: -moz-box's visibility: collapse handling switchable by its
own CSS property.
Longer term maybe we should switch the front-end away from visibility:
collapse altogether (there are some alternatives), but for now this will
allow to move the front-end to switch to modern `display: flex` while
keeping `visibility: collapse` work as in -moz-box.
Differential Revision: https://phabricator.services.mozilla.com/D171472
Also, we make it animatable but don't apply it to the motion transform and
don't run it on the compositor for now (so it works for getComputedStyle but
doesn't have rendering result).
Per spec: https://w3c.github.io/csswg-drafts/css-values/#calc-serialize,
we tweak the WPT to let calc() serialize the percentage first, and maintain
zero-valued terms, i.e. 0%. (We are doing the same thing as
offset-anchor, so it should be fine with other browsers.)
Besides, I tweak the serialization of shorthand a little bit so we match
the implementation of WebKit.
Differential Revision: https://phabricator.services.mozilla.com/D170972
* Remove some legacy appearance aliases that other engines don't
implement.
* Allow to pass with unimplemented <compat-auto> values, since per the
spec the idea of these is to get them removed, see
https://github.com/w3c/csswg-drafts/issues/8506 for the ones we don't
implement.
* Also allow the `-moz-` prefix to be implemented, because we can't
quite get rid of it (people use it to remove the <input type=number>
buttons with -moz-appearance: textfield and so on), and the
alternative is to implement a bunch of non-standard ::-webkit-
pseudo-elements.
Differential Revision: https://phabricator.services.mozilla.com/D171243
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.
Differential Revision: https://phabricator.services.mozilla.com/D170944
In stead of having the css parser construct a color in it's own format
and then converting it to what Gecko needs to perform operations, we now
construct a Gecko friendly color type directly.
Differential Revision: https://phabricator.services.mozilla.com/D170187
This unveils an issue with image-set() tests, which expect 0x to not
parse (inconsistently with media queries).
Fix the test, since the spec doesn't restrict the range of <resolution>
values (and more importantly, it shouldn't allow open ranges).
Differential Revision: https://phabricator.services.mozilla.com/D170762
Adds the forced-color-adjust property and ForcedColorAdjust keywords.
Updates tweak_when_ignoring_colors to check for `none` value of that property when determining if a color adjustment in needed.
Adds a check for `none` when styling selections to make sure they can be styled in forced color modes.
Differential Revision: https://phabricator.services.mozilla.com/D169000
The color mixing is npw using AbsoluteColor and it's conversion
functions. The result is still being converted back to sRGB for now.
Differential Revision: https://phabricator.services.mozilla.com/D169930
Mixing is now using the new color space for specifying the interpolation
color space. For that reason hsl and hwb is added to the color space
and also converting to/from them.
Differential Revision: https://phabricator.services.mozilla.com/D169929
No functional changes, just moving the code to the shared library in
preperation for replacing it with the new AbsoluteColor.
Differential Revision: https://phabricator.services.mozilla.com/D169928
For ToResolvedValue implementation purposes we wouldn't need to split
out the vertical / font / line-height arguments and we could just pass
around the ComputedStyle, but the lh unit would need that distinction,
(because computing lh on font properties should use the parent style).
Differential Revision: https://phabricator.services.mozilla.com/D168705
This makes the serialization of the 'font' shorthand on computed style return the line-height
as an absolute length rather than a number (font-size multiplier), which is consistent with
what the line-height longhand already returns, and with other browsers.
(See also https://github.com/w3c/csswg-drafts/issues/8385.)
Differential Revision: https://phabricator.services.mozilla.com/D168542
Generated by running
find servo/components/style -name "*.rs" -exec perl -p -i -e "s/write_str\(\"(.)\"\)/write_char('\1')/g" {} \;
(and then added `use std::fmt::Write;` in a couple of places to fix build errors that arose).
Differential Revision: https://phabricator.services.mozilla.com/D168217