| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds basic support for `text-transform` in a way that is more
complete than legacy layout. There are still many missing elements of
proper `text-transform` support such as:
1. Support for `full-width` and `full-size-kana`
2. Support for grapheme based uppercasing, lowercasing, and
capitalization. These are all done per-code point right now.
3. Support for the language-specific `SpecialCasing.txt` cases for case
mapping such as the ones for Irish and Turkish.
Co-authored-by: Rakhi Sharma <atbrakhi@igalia.com>
|
|
|
|
|
| |
* Revert remaining changes from Stylo split-into-commits branch
* Do the minimum amount of formatting to appease mach test-tidy
|
|
|
|
| |
This will eventually be part of the stylo crate and reduces the diff
between our verson of style and upstream's.
|
|
|
|
|
|
|
| |
In layout2020, 'list-style-position' is disabled behind a pref, so the
list_style_position field is an Option.
The serialization of the 'list-style' shorthand wasn't correctly
handling the case of it being None.
|
|
|
|
|
|
| |
This adds support for table `border-spacing` property. Note that we do
not yet support the collapsed border model.
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* layout: Implement support for `line-height` and `vertical-align`
This is an initial implementation of proper `line-height` and
`vertical-align` support. While this change includes the bulk of the
work there are still many missing pieces for full support. In particular
some big missing things are:
- Flex containers do not properly compute their baselines. The idea is
to tackle this in a followup change. This causes various flex tests
to start failing because everything used to be top aligned.
- The implementation of the line-height quirks (only active in quirks
mode) are incomplete. While the quirk works in many cases, there are
still some cases where it is handled incorrectly. This requires more
redesign and refinement, better suited for a followup.
- Most of the features are CSS 3 such as precision control of the
baseline and first and last baselines are not implemented. This
change gets us close to CSS 2.x support.
While there are many new test passes with this change some tests are
starting to fail. An accounting of new failures:
Tests failing also in Layout 2013:
- /css/css2/positioning/toogle-abspos-on-relpos-inline-child.html (only passes in Chrome)
- /css/CSS2/fonts/font-applies-to-001.xht (potentially an issue with font size)
Invalid tests:
- /css/CSS2/visudet/inline-block-baseline-003.xht
- /css/CSS2/visudet/inline-block-baseline-004.xht
- These are are failing in all browsers. See https://bugs.chromium.org/p/chromium/issues/detail?id=1222151.
Missing table support:
- /_mozilla/mozilla/table_valign_middle.html
Missing `font-size-adjust` support :
- /css/css-fonts/font-size-adjust-zero-2.html (also failing in 2013)
Incomplete form field support :
- /html/rendering/widgets/the-select-element/option-add-label-quirks.html (label isn't rendered so button isn't the right size in quirks mode due to line height quirk)
Need support for calculating flexbox baseline:
- /css/css-flexbox/fieldset-baseline-alignment.html
- /css/css-flexbox/flex-inline.html
- /css/css-flexbox/flexbox-baseline-multi-line-horiz-001.html
- /css/css-flexbox/flexbox-baseline-single-item-001a.html
- /css/css-flexbox/flexbox-baseline-single-item-001b.html
Failing because we don't create anonymous inline boxes for text children of blocks:
- /css/CSS2/linebox/anonymous-inline-inherit-001.html
Passes locally (potentially related to fonts):
- /css/CSS2/css1/c414-flt-fit-004.xht
- /css/css-transforms/transform-input-017.html
- /html/obsolete/requirements-for-implementations/the-marquee-element-0/marquee-min-intrinsic-size.html
- /css/css-fonts/first-available-font-005.html
- /css/css-fonts/first-available-font-006.html
* Some cleanups after live review with @mukilan
Also update results.
|
|
|
|
|
|
|
|
| |
This change adds support for `text-align-last` as well as ensuring that
it also applies to lines before forced line breaks. Two tests start to
fail because they rely on right-to-left text to pass:
- /css/css-text/text-align/text-align-last-010.html.ini
- /css/css-text/text-align/text-align-last-011.html.ini
|
|
|
|
| |
This also enables parsing of `text-justify` for non-legacy layout,
though only None is supported (disabling justification).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
The CSS properties in the list are all shipped. Since we still don't support use
counter for developing CSS properties since this bug opens, I assume this
feature is not critical. Hence the removal of the comment.
Differential Revision: https://phabricator.services.mozilla.com/D180771
|
|
|
|
|
|
| |
Move the flag to ComputedValueFlags, like `CONSIDERED_RELATIVE_SELECTOR`.
Differential Revision: https://phabricator.services.mozilla.com/D180726
|
|
|
|
|
|
|
| |
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 doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D180465
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D180270
|
|
|
|
|
|
|
|
|
|
| |
We send offset-position to the compositor, just like other similar
properties, e.g. offset-rotate, offset-anchor. This includes extracting
this animation value, doing serialization and sending it via IPC.
So now we can run the animation of ray() on the compositor properly.
Differential Revision: https://phabricator.services.mozilla.com/D179862
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`:has()` in selector matching
For any element that anchors a `:has()` selector (i.e. Matches a selector that
contains a `:has()` on its rightmost side), we prevent style sharing altogether,
as evaluation of the `:has()` selector is required in the first place to
determine style sharing.
On the other hand, any element matching a rule containing `:has()` without
anchoring it can do style sharing for siblings, but not cousins.
Differential Revision: https://phabricator.services.mozilla.com/D176836
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D173884
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
So that they aren't imported via #[path]. This allows cargo to see them
even before building.
Differential Revision: https://phabricator.services.mozilla.com/D178105
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
(non-standard) -webkit-text-security property
Differential Revision: https://phabricator.services.mozilla.com/D174951
|
|
|
|
|
|
|
| |
The test-case in the next patch from 10s to a couple hundred
milliseconds on my machine. No behavior change other than that.
Differential Revision: https://phabricator.services.mozilla.com/D175612
|
|
|
|
|
|
| |
These have been enabled by default for quite a while.
Differential Revision: https://phabricator.services.mozilla.com/D175513
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This feature was shipped in Fx97, and it seems we don't need this pref
anymore.
Differential Revision: https://phabricator.services.mozilla.com/D173591
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Ideally we'd only update the attributes that actually changed. That's a
bit more work I can try to look into, but this and bug 1823686 should
improve things here.
Differential Revision: https://phabricator.services.mozilla.com/D173162
|
| |
|
|
|
|
|
|
| |
And so we can lookup the timeline from TimelineCollection.
Differential Revision: https://phabricator.services.mozilla.com/D169273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
There are no users of non-auto values, so we can just simplify some code and
remove the property.
Differential Revision: https://phabricator.services.mozilla.com/D170010
|
| |
|
|
|
|
|
|
|
|
| |
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
|