| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Initial style_config crate
* Remove servo_config from style
* Remove servo_config from tests/unit/style
* Plumb servo prefs into stylo
* Clean up dependencies
* Fix formatting
* Add unit tests
* Add comment about avoiding clone
* Fix bug where getters acquire unnecessary write lock
* Remove stray dbg!()
* Plumb default prefs into Stylo as well
* Add comments about logging and mapping new pref types
|
|
|
|
|
| |
* Revert remaining changes from Stylo split-into-commits branch
* Do the minimum amount of formatting to appease mach test-tidy
|
|
|
|
|
| |
In order for stylo to be a separate crate, it needs to depend on less
things from Servo. This change makes it so that stylo no longer depends
on servo_url.
|
|
|
|
| |
This will eventually be part of the stylo crate and reduces the diff
between our verson of style and upstream's.
|
|
|
|
|
|
|
|
|
|
|
|
| |
At least when the containers are different.
For now check that by doing a somewhat simplified test (checking
sibling-ness).
The new flag can be useful to optimize container query restyles on
resizes too, in the future.
Differential Revision: https://phabricator.services.mozilla.com/D179268
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix some bugs caught by css/cssom/shorthand-values. In particular:
* Make the shorthand order match the spec.
* Omit values when we can.
Fix a subtest that wasn't correct. Shorthands can be serialized as long
as !important matches in all components.
Differential Revision: https://phabricator.services.mozilla.com/D180466
|
| |
|
|
|
|
|
|
|
|
| |
This patch adds the ability to parse most CSS filters without a context.
OffscreenCanvas can use this on worker threads to provide support for
filter operations.
Differential Revision: https://phabricator.services.mozilla.com/D179994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added NaN/inf serialization of <number> and changed calc() code to not
remove NaN/infinity in code using it.
This change is unfortunately imperfect as some things using <number>
still refuse to serialize NaN/infinity for some reason (scale()?), but
this bug/patch is just for <number> so leaving that out of scope for
this.
Also added new WPT test file for number NaN/inf serialization based
on existing serialization tests (all pass already!).
5 other WPT subtests now newly pass.
Differential Revision: https://phabricator.services.mozilla.com/D178587
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was looking into simplifying our scrollbar styles:
* StyleAppearance::Resizer is not used in content, and some of the
values were only for <xul:window> which are not supported anymore.
* Statusbarpanel and Resizerpanel aren't used. Statusbar is only used
once on macOS so we only need to keep it there.
Differential Revision: https://phabricator.services.mozilla.com/D178374
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Per CSS shape spec, the empty path string is invalid. However, for SVG
d property, the EBNF allows the path data string in the d property to be
empty. We just disable the rendering of the path.
Note: only offset-path and clip-path are affected.
Differential Revision: https://phabricator.services.mozilla.com/D178123
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D173884
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the cssparser setup to:
* Avoid having to do copies of the ParsingContext all over the place,
which is useful because I plan to stash more nesting state in there.
* Use the new RuleBodyParser which allows parsing qualified rules,
declarations, and so on. Though we still don't use this anywhere.
The next step is to join NestedRuleParser and PropertyDeclarationParser,
so that we can parse declarations in a lot of the nested rules as well.
Differential Revision: https://phabricator.services.mozilla.com/D178053
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies a tiny bit our bindings in some places, and complicates
it in others, but over all I think it's better.
It requires a bit more manual code in the rust side to drop and cast the
relevant pointers (which was done implicitly before), but it's a lot
less magic than it used to be, and that's all autogenerated so consumers
don't need to care about it.
The set up is still not ideal. I don't like that we rely on destructors
running in both sides of the FFI boundary, but that's for another day.
This is the last usage of RawOffsetArc, so remove that. We now support
proper Arc<> in structs (GridTemplateAreas uses it), so I don't think
we'll need it any time soon.
Differential Revision: https://phabricator.services.mozilla.com/D177905
|
|
|
|
|
|
|
|
|
|
|
|
| |
Much like with font-relative units, when they're used for a
non-inherited property we need to avoid using the rule cache.
This is because two elements matching the same rules won't get
guaranteed-equal non-inherited style structs.
Depends on D177732
Differential Revision: https://phabricator.services.mozilla.com/D177733
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This should allow making these work on canvas.
Differential Revision: https://phabricator.services.mozilla.com/D177074
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So the line break suppression flags should be propagated through it.
Otherwise ruby invariants might break, leading to a nullptr crash in
this case.
On debug builds the assertion was this one:
https://searchfox.org/mozilla-central/rev/e6cb503ac22402421186e7488d4250cc1c5fecab/layout/generic/nsRubyBaseContainerFrame.cpp#631
Differential Revision: https://phabricator.services.mozilla.com/D177093
|
|
|
|
|
|
|
| |
Avoid trying to resolve a currentcolor when a foreground color is not
available.
Differential Revision: https://phabricator.services.mozilla.com/D177368
|
|
|
|
|
|
|
|
|
|
| |
HasBoxFFI and HasArcFFI aren't great, see bug 1831242 as for examples of
why.
HasArcFFI requires a bit more care, but HasBoxFFI doesn't give us much
benefit. Instead use the same type in the FFI boundary.
Differential Revision: https://phabricator.services.mozilla.com/D177252
|
|
|
|
|
|
|
|
| |
`self` keyword specifies to use the element’s own principal box as the
scroll container. If the principal box is not a scroll container, then the
scroll progress timeline is inactive.
Differential Revision: https://phabricator.services.mozilla.com/D175707
|
|
|
|
|
|
|
|
|
| |
order
The order of <scroller> and <axis> doesn't matter in the parser.
However, we serialize <scroller> first, if it is not the initial value.
Differential Revision: https://phabricator.services.mozilla.com/D173906
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Sum nodes would use mul_by to negate nodes to do subtraction, but some
nodes are not distributive. This patch adds a negate node, so that the
operations inside these negate nodes can be resolved first and then the
"subtraction" can be applied.
Differential Revision: https://phabricator.services.mozilla.com/D172941
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
They should be stable.
Not sure this is worth writing a test for since the idea is that this
code goes away eventually.
Differential Revision: https://phabricator.services.mozilla.com/D176680
|
|
|
|
|
|
|
|
|
| |
And some related tests.
A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.
Differential Revision: https://phabricator.services.mozilla.com/D173819
|
|
|
|
|
|
|
| |
Remove now dead Mul implementations. Use Self rather than the whole type
to shrink a bit the code.
Differential Revision: https://phabricator.services.mozilla.com/D173143
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Now that the none keyword is available, we can take it into account when
interpolating colors following the rules from the spec here:
https://drafts.csswg.org/css-color-4/#interpolation-missing
Differential Revision: https://phabricator.services.mozilla.com/D172666
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make use of the new changes in the cssparser that allows 'none' keywords
in color components where allowed. We store the none values as 0.0 (as
per the spec) and mark the components with the flags. This way we don't
have to check anything on the components before doing calculations.
As this is the last part intended to be released for the new [color-4]
changes, I've also enabled the changes on nightly.
Differential Revision: https://phabricator.services.mozilla.com/D170208
|
|
|
|
|
|
| |
We implemented support for list-style-image anyways.
Differential Revision: https://phabricator.services.mozilla.com/D172343
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D172430
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Also adjusted WPT tests to always expect deg like similar past changes.
WPT tests: https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-infinity-nan-computed.html#L57-L71
Differential Revision: https://phabricator.services.mozilla.com/D172401
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D172339
|