| 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
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
Turns out Servo doesn't need this either, see
https://github.com/servo/servo/pull/29850.
Differential Revision: https://phabricator.services.mozilla.com/D180264
|
|
|
|
|
|
|
|
| |
$ find servo -name '*.rs' | xargs rustup run nightly rustfmt
Depends on D179380
Differential Revision: https://phabricator.services.mozilla.com/D179381
|
| |
|
|
|
|
|
|
|
|
|
| |
Anything that doesn't need interior mutability doesn't need Locked<>
around it.
Depends on D179059
Differential Revision: https://phabricator.services.mozilla.com/D179060
|
|
|
|
|
|
| |
Depends on D179038
Differential Revision: https://phabricator.services.mozilla.com/D179039
|
|
|
|
|
|
| |
CssRule::Property
Differential Revision: https://phabricator.services.mozilla.com/D178892
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
@property at-rule
Implemented behind the new properties-and-values pref.
Support for the CSSPropertyRule WebIDL interface is also added in this
patch, because until it's added, any attempt to access the rule using
the CSSOM would crash the browser.
Depends on D178268
Differential Revision: https://phabricator.services.mozilla.com/D178270
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
declarations
Plumb everything up. This factors out declaration and rule parsing so
we share the code with the regular declaration parser.
This could be made a bit nicer in the future. We need to decide what to
do for @page and @keyframe (it seems conditional rules inside ought to
work, but that's not so easy because per spec we create a nested style
rule).
But this is a first pass that passes a good chunk of the tests. There
are other fixups to cssom, and I think some of the tests we fail are
actually wrong...
Differential Revision: https://phabricator.services.mozilla.com/D178266
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a relatively small code size regression (130k on windows and
macOS, 180k on Linux), for a few high confidence improvements in
speedometer 3. See link in the bug.
If this sticks, we can actually clean up a bunch of code, and eventually
unify RefPtr and nsCOMPtr. But I want this to be on the tree for a while
before doing more aggressive refactorings / actually removing the code.
Differential Revision: https://phabricator.services.mozilla.com/D178267
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D175438
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Use the actual Locked<T> types around (via a typedef, just for
convenience).
Differential Revision: https://phabricator.services.mozilla.com/D177824
|
|
|
|
|
|
|
| |
Refactored ImportLayer into an enum instead of a struct and using
Option everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D176793
|
|
|
|
|
|
|
|
|
|
| |
with declaration
No implementation just yet (the default QualifiedRuleParser
implementation just rejects stuff), but this is plumbing that I'd rather
get reviewed separately.
Differential Revision: https://phabricator.services.mozilla.com/D176686
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
More nesting plumbing. Still does nothing because we don't parse the
nested rules.
Should be trivial to prove this patch doesn't change any behavior so
far, but I want to land it on its own because it can have performance
implications.
This follows the pattern of what we do with other rules like layers and
container conditions, that is, keep the ancestor selectors in a stack,
and poke at the last one in order to replace the ancestor.
This changes the behavior of replace_parent_selector as with the newer
version of the spec, stuff like:
div {
.foo {
stuff
}
}
Should work as `div .foo`. A test is added for this case.
Differential Revision: https://phabricator.services.mozilla.com/D176560
|
|
|
|
|
|
|
|
|
| |
Allow to have a CssRules list inside a StyleRule.
This only introduces the storage and serialization code for them, but we
still don't parse it.
Differential Revision: https://phabricator.services.mozilla.com/D176550
|
| |
|
|
|
|
|
|
| |
The duplication was slightly annoying me :)
Differential Revision: https://phabricator.services.mozilla.com/D176564
|
|
|
|
|
|
|
|
| |
Fixed @import supports() being parsed in the incorrect position as per spec.
Also added more WPT tests for layer and supports in one @import.
Differential Revision: https://phabricator.services.mozilla.com/D176193
|
|
|
|
|
|
|
|
| |
Fixed @import serialization being out of (spec) order.
Also added some more WPT tests.
Differential Revision: https://phabricator.services.mozilla.com/D176182
|
|
|
|
|
|
| |
These have been enabled by default for quite a while.
Differential Revision: https://phabricator.services.mozilla.com/D175513
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented supports conditions using supports() in @import rules as per
CSS Cascading and Inheritance Level 4.
Locked behind new pref, layout.css.import-supports.enabled,
only enabled in nightlies in this patch.
Also added new WPT tests for @import supports() generally.
Spec: https://drafts.csswg.org/css-cascade-4/#conditional-import
WPT tests: https://wpt.fyi/results/css/css-cascade/import-conditions.html
Differential Revision: https://phabricator.services.mozilla.com/D172622
|
|
|
|
|
|
|
|
|
|
| |
You can use this as:
input.try_parse(SupportsCondition::parse_for_import).ok()
Or so.
Differential Revision: https://phabricator.services.mozilla.com/D172668
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Allow keyword evaluators to return unknown.
Do you know of a good test to extend here? Otherwise I can add a new
one, though I gotta run atm.
Differential Revision: https://phabricator.services.mozilla.com/D165630
|
|
|
|
|
|
| |
This makes me a bit happier about the previous patch :)
Differential Revision: https://phabricator.services.mozilla.com/D165236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When apply_declarations is used for a pseudo-element, make it pass the
parent_style as the originating_element_style for container queries.
This requires changing some parameters from Option<&Arc<ComputedValues>>
to Option<&ComputedValues>.
It's not a complete solution, since e.g. parent_style is not the style
of the originating element of a ::backdrop. But here it's not as simple
as in D164908, so leaving these details for later.
Differential Revision: https://phabricator.services.mozilla.com/D164977
|
|
|
|
|
|
| |
originate. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D164807
|
|
|
|
|
|
|
| |
Just using 'rustup run nightly rustfmt'.
No change in behavior.
Differential Revision: https://phabricator.services.mozilla.com/D164805
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D164234
|
|
|
|
|
|
|
| |
For example, inline elements may have container-type:size but they don't
support size containment, so @container(width >= 0) shouldn't match.
Differential Revision: https://phabricator.services.mozilla.com/D163936
|
|
|
|
|
|
| |
Depends on D163879
Differential Revision: https://phabricator.services.mozilla.com/D163844
|
|
|
|
|
|
|
|
| |
They were checking the border-box size (with paddings and borders), but
https://drafts.csswg.org/css-contain-3/#size-container says it should
be the content-box size.
Differential Revision: https://phabricator.services.mozilla.com/D163784
|
|
|
|
|
|
| |
See https://drafts.csswg.org/mediaqueries-5/#typedef-general-enclosed
Differential Revision: https://phabricator.services.mozilla.com/D158662
|
|
|
|
|
|
| |
We were falling back to viewport size, which is not what the spec says.
Differential Revision: https://phabricator.services.mozilla.com/D161132
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D158775
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was made a bitfield so that we could include style. But then style
containment was removed and the bitfield keeps causing us to do wrong
check (since INLINE_SIZE intersects SIZE).
So just make it an enum. This causes a progression and a test that
failed now times out (which is a pre-existing issue, just like the
pseudo-elements test that times out).
Differential Revision: https://phabricator.services.mozilla.com/D160371
|
|
|
|
|
|
| |
when viewport fallback is actually used
Differential Revision: https://phabricator.services.mozilla.com/D159866
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to propagate flags from the container query styles all the
way to the computed style of the element.
The flag for viewport units in container queries has to be different
because it requires rematching, see comments.
Depends on D159851
Differential Revision: https://phabricator.services.mozilla.com/D159852
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D158057
|
|
|
|
|
|
| |
For controlled construction and access of upcoming, lazily-evaluated container query size.
Differential Revision: https://phabricator.services.mozilla.com/D158055
|