| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove packages that were moved to external repo
* Add workspace dependencies pointing to 2023-06-14 branch
* Fix servo-tidy.toml errors
* Update commit to include #31346
* Update commit to include servo/stylo#2
* Move css-properties.json lookup to target/doc/stylo
* Remove dependency on vendored mako in favour of pypi dependency
This also removes etc/ci/generate_workflow.py, which has been unused
since at least 9e71bd6a7010d6e5723831696ae0ebe26b47682f.
* Add temporary code to debug Windows test failures
* Fix failures on Windows due to custom target dir
* Update commit to include servo/stylo#3
* Fix license in tests/unit/style/build.rs
* Document how to build with local Stylo in Cargo.toml
|
|
|
|
| |
This will eventually be part of the stylo crate and reduces the diff
between our verson of style and upstream's.
|
|
|
|
|
|
|
| |
We don't ever check the particular property, so it can just be a
boolean.
Differential Revision: https://phabricator.services.mozilla.com/D180680
|
|
|
|
|
|
|
| |
Introduce LineWidth (which doesn't snap) and let BorderSideWidth
wrap it and actually do the snapping.
Differential Revision: https://phabricator.services.mozilla.com/D180688
|
|
|
|
|
|
|
| |
Fairly straight-forward. This fixes the two tests mentioned in comment 0
which aren't still in the repo.
Differential Revision: https://phabricator.services.mozilla.com/D180414
|
|
|
|
|
|
|
|
|
|
| |
Apply some clang-tidy suggestions while I was going through the
ServoStyleConstsInlines while at it.
Remove one 0x test because it's tested on the same test and causes a
harness error.
Differential Revision: https://phabricator.services.mozilla.com/D180331
|
|
|
|
|
|
|
|
|
|
|
|
| |
We reuse PositionOrAuto here, and let "auto" represent the situation when the
author omits "at <position>" because it has a special meaning.
https://drafts.fxtf.org/motion-1/#valdef-ray-at-position
Note: No need to update css/motion/parsing/offset-path-parsing-valid.html
because Blink added some to the upstream repo already.
Differential Revision: https://phabricator.services.mozilla.com/D179860
|
|
|
|
|
|
|
|
|
|
| |
an auto value
When the content having `content-visibility: auto` and the specific value for `contain-intrinsic-size` is slightly out of the viewport,
its computed value keeps changing.
This patch makes `content-visibilty: auto` forces `contain-intrinsic-size` to gain an auto value to solve this issue.
Differential Revision: https://phabricator.services.mozilla.com/D174583
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now it supports "normal" keyword. Also, offset-position doesn't create
stacking context and it doesn't have offset transform, so we can
simplify CompareMotionValues() a little bit.
Note: We don't have to add test in [1] because Blink added one to WPT
upstream repo already.
[1] css/motion/parsing/offset-position-parsing-valid.html
Note: the usage of offset-position is in other bugs.
Differential Revision: https://phabricator.services.mozilla.com/D179623
|
|
|
|
|
|
|
|
| |
Make the computed value of border-like properties app units (which is
effectively what happens in Gecko already), and clamp at computed value
time.
Differential Revision: https://phabricator.services.mozilla.com/D179481
|
|
|
|
|
|
|
|
| |
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt
Depends on D179380
Differential Revision: https://phabricator.services.mozilla.com/D179381
|
|
|
|
|
|
|
|
|
|
|
| |
syntax descriptor
Based off of @emilio's syntax parser at
<https://github.com/emilio/css-typed-om-syntax>.
Co-authored-by: Emilio Cobos Álvarez <emilio@crisal.io>
Differential Revision: https://phabricator.services.mozilla.com/D178268
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D173884
|
|
|
|
|
|
|
| |
No behavior change, but using Self is shorter and while I'm touching
this code might as well clean it up a little bit.
Differential Revision: https://phabricator.services.mozilla.com/D177732
|
|
|
|
|
|
|
| |
Avoid trying to resolve a currentcolor when a foreground color is not
available.
Differential Revision: https://phabricator.services.mozilla.com/D177368
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separately
And use it instead of explicit document checks. This centralizes where
we check for it.
IsChromeDoc is relatively cheap, but this bug wants to also check for
PDF.js which is a bit more expensive.
No behavior change.
Differential Revision: https://phabricator.services.mozilla.com/D176940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support view() notation for animation-timeline:
`<view()> = view( [ <axis> || <'view-timeline-inset'> ]? )`
We move AnimationTimeline and its related types into the generics folder,
and define two new structs for scroll() and view().
Note:
1. The syntax of scroll() doesn't match the current version of the spec.
I will update it in Bug 1814444.
2. We will handle the creation/usage of the Anonymous View Progress Timelines
in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D173904
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although we store animation and transition style values in StyleUIReset and
define their properties in longhands/ui.mako.rs, but we may move them in
the future if this style struct becomes too large. So let's move the
definition of their values to an independent module, animation, so we
don't have to worry about this again.
This patch doesn't change any other things. Only move code.
Differential Revision: https://phabricator.services.mozilla.com/D173903
|
|
|
|
|
|
|
|
|
| |
NaN and infinity percentages are now serialized as expected.
Also added some new WPT tests as percentages were previously untested
and added some spec comments to previous NaN/inf serialization code.
Differential Revision: https://phabricator.services.mozilla.com/D176726
|
|
|
|
|
|
|
| |
Refactor the mul_by function on leafs into a more generic map function
that can be used for more operations like abs, signum and mul.
Differential Revision: https://phabricator.services.mozilla.com/D172936
|
|
|
|
|
|
|
| |
Per the proposal in https://github.com/w3c/csswg-drafts/issues/7747,
we change view-timeline-inset to have an initial value of auto.
Differential Revision: https://phabricator.services.mozilla.com/D173487
|
|
|
|
|
|
|
| |
Having unused imports and undocumented functions trigger warnings that
don't build in automation.
Differential Revision: https://phabricator.services.mozilla.com/D172429
|
|
|
|
|
|
|
|
|
|
| |
Lengths using NaN and infinity are now serialized properly with some
improvements to computed values as well.
Also added a few minor new relevant WPT tests.
35 WPT tests newly pass :tada:
Differential Revision: https://phabricator.services.mozilla.com/D172183
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D172338
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D172341
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Computed color values will not be in the correct format, closer to the
one specified by the author. This also means that colors accross the
code are stored now as AbsoluteColor or StyleAbsoluteColor. This allows
color space/gamut information to be available for use.
Some animation related test failures had to be changed, because colors
now has greater precision. Animated a color now causes a lot more
animation updates, which was not initially expected. See the bug for
discussion.
Differential Revision: https://phabricator.services.mozilla.com/D171021
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D168555
|
|
|
|
|
|
|
|
|
|
|
|
| |
single-character literals
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
|
|
|
|
|
|
| |
properties, and make font-synthesis into a shorthand
Differential Revision: https://phabricator.services.mozilla.com/D167480
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when use_document_fonts=0, overriding the browser's font prefs
Some widely-used icon fonts use ligature rules to replace icon names such as "volume_up"
or "down_arrow" with icon glyphs. If the site is designed to use such a font, but the user
disables document fonts and we use our default Latin font instead, the underlying text will
be rendered instead of the intended icon.
To enable such fonts to continue to work, we provide a list of known ligature-icon fonts
and allow them to be used even when the document-fonts setting is disabled.
Differential Revision: https://phabricator.services.mozilla.com/D167923
|
|
|
|
|
|
|
| |
Support view-timeline-inset: `[ [ auto | <length-percentage> ]{1,2} ]#`.
And its initial value is 0.
Differential Revision: https://phabricator.services.mozilla.com/D166243
|
|
|
|
|
|
|
|
|
|
|
| |
The output progress of easing functions could be inf or -inf, per spec,
https://drafts.csswg.org/css-easing-2/#output-progress-value.
But we should avoid using infinity to calculate interpolation or use
the infinite progress in Web Animations API, per the spec issue comments:
https://github.com/w3c/csswg-drafts/issues/8344#issuecomment-1399033481
Differential Revision: https://phabricator.services.mozilla.com/D167342
|
|
|
|
|
|
|
|
|
|
|
| |
Use new changes from cssparser and use the new lab/lch/oklab/oklch color
formats.
Introduced a new color type AbsoluteColor. It represents any kind of
color that has absolute numerical values. It is also tied to a color
space and therefore can be trivially converted to another color space.
Differential Revision: https://phabricator.services.mozilla.com/D163579
|
|
|
|
|
|
| |
font-feature-settings and font-variation-settings
Differential Revision: https://phabricator.services.mozilla.com/D167012
|
|
|
|
|
|
| |
Same as above.
Differential Revision: https://phabricator.services.mozilla.com/D167126
|
|
|
|
|
|
|
|
|
| |
and Gecko
This removes the special AnimationIterationCount -> f32 conversion from
gecko.mako.rs which will be useful to simplify coordinated properties.
Differential Revision: https://phabricator.services.mozilla.com/D167123
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D161800
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches what the spec[1] says for font-style:
> Animation type: by computed value type; normal animates as oblique 0deg
A bunch of WPT tests for font-style animation are landing in https://github.com/web-platform-tests/wpt/pull/37570.
Current Gecko passes 66/129 of the testcases there; with this patch applied it passes all the tests.
[1] https://drafts.csswg.org/css-fonts-4/#font-style-prop
Differential Revision: https://phabricator.services.mozilla.com/D166128
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D165737
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D162853
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D161844
|
|
|
|
|
|
| |
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>
Differential Revision: https://phabricator.services.mozilla.com/D156742
|
|
|
|
|
|
|
|
|
|
| |
The @page rule may contain both 'page-orientation' and 'size' properties. The
'size' property can contain an orientation component which was being
represented as 'PageOrientation' prior to this patch. This patch changes that
to 'PageSizeOrientation' so that 'PageOrientation' can be used for
'page-orientation' in a subsequent patch.
Differential Revision: https://phabricator.services.mozilla.com/D160790
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't use them[1], and these are generally not properties that
authors would be able to set via the font shorthand anyways.
Let's simplify the code. This fixes the font-variant bug and also
unblocks further clean-ups of these properties in the future.
[1]: https://searchfox.org/mozilla-central/rev/59f0bf3c13dd455d9f5415b89178de701ea6b850/widget/LookAndFeelTypes.ipdlh#12-18
Differential Revision: https://phabricator.services.mozilla.com/D160352
|
|
|
|
|
|
| |
when viewport fallback is actually used
Differential Revision: https://phabricator.services.mozilla.com/D159866
|