| 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* script: Do not run layout in a thread
Instead of spawning a thread for layout that almost always runs
synchronously with script, simply run layout in the script thread.
This is a resurrection of #28708, taking just the bits that remove the
layout thread. It's a complex change and thus is just a first step
toward cleaning up the interface between script and layout. Messages are
still passed from script to layout via a `process()` method and script
proxies some messages to layout from other threads as well.
Big changes:
1. Layout is created in the script thread on Document load, thus every
live document is guaranteed to have a layout. This isn't completely
hidden in the interface, but we can safely `unwrap()` on a Document's
layout.
2. Layout configuration is abstracted away into a LayoutConfig struct
and the LayoutFactory is a struct passed around by the Constellation.
This is to avoid having to monomorphize the entire script thread
for each layout.
3. Instead of having the Constellation block on the layout thread to
figure out the current epoch and whether there are pending web fonts
loading, updates are sent synchronously to the Constellation when
rendering to a screenshot. This practically only used by the WPT.
A couple tests start to fail, which is probably inevitable since removing
the layout thread has introduced timing changes in "exit after load" and
screenshot behavior.
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Update test expectations
* Fix some issues found during review
* Clarify some comments
* Address review comments
---------
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 should fix issues that we have with Float16 support on newer LLVM.
This also updates style, in order to remove the duplicate version of
bindgen. We will soon be able to manage updates to style more
consistently.
|
|
|
|
|
|
| |
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 adds support for fixing up tables so that internal table elements
that are not properly parented in the DOM have the correct box tree
structure according to the CSS Table specification [1]. Note that this
only comes into play when building the DOM via script, as HTML 5 has its
own table fixups that mean that the box tree construction fixups here
are not necessary.
There are no tests for this change. In general, it's hard to write tests
against the shape of the box tree, because it depends on the DOM. We
plan to test this via WPT tests once layout is complete.
1. https://drafts.csswg.org/css-tables/#table-internal-element
Co-authored-by: Oriol Brufau <obrufau@igalia.com>
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
* Generalize LengthPercentageOrAuto impl to Generic Type
* review fix
|
|
|
|
|
|
|
|
|
|
| |
* Add initial support for sticky positioning for non-legacy layout
Many tests still fail for a variety of reasons. One of the primary ones
is that CSSOM currently does not return correct values for elements
positioned by sticky nodes. This requires changes to WebRender to work
properly.
* Fix an assertion failure in the legacy layout sticky code
|
| |
|
|
|
|
|
|
| |
rightmost compound
Differential Revision: https://phabricator.services.mozilla.com/D180553
|
|
|
|
|
|
|
| |
Inline the attribute lookup code, and only branch on the attribute selector
type if we have found an attribute.
Differential Revision: https://phabricator.services.mozilla.com/D180531
|
| |
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D180530
|
|
|
|
|
|
|
| |
It's an extra branch which in practice we almost never take, plus extra
checks during parsing.
Differential Revision: https://phabricator.services.mozilla.com/D180529
|
|
|
|
|
|
|
| |
The only reason we pass the quirks mode around is to compute the case
sensitivity, but we can just pass the later.
Differential Revision: https://phabricator.services.mozilla.com/D180527
|
|
|
|
|
|
|
|
|
|
| |
Layer insertion may change the order of styles, so we may need to fully
invalidate.
Without this change, bug 1838045 makes
layer-statement-before-import.html fail.
Differential Revision: https://phabricator.services.mozilla.com/D180929
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
(Regardless of visitedness)
Differential Revision: https://phabricator.services.mozilla.com/D180353
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Differential Revision: https://phabricator.services.mozilla.com/D180270
|
|
|
|
|
|
|
| |
Turns out Servo doesn't need this either, see
https://github.com/servo/servo/pull/29850.
Differential Revision: https://phabricator.services.mozilla.com/D180264
|
| |
|
|
|
|
|
|
|
| |
Use in_place_scope_fifo to spawn work into the thread pool while doing
work in the main thread.
Differential Revision: https://phabricator.services.mozilla.com/D179492
|
|
|
|
|
|
| |
We ship this, and the front-end uses it by default, so remove the pref.
Differential Revision: https://phabricator.services.mozilla.com/D180222
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
It's unnecessary to implement ToAnimatedZero for this property and so we
return Err(()), just like other properties which also use basic shapes,
e.g. clip-path, shape-outside.
Differential Revision: https://phabricator.services.mozilla.com/D179859
|
|
|
|
|
|
|
|
| |
Even tho https://github.com/rust-lang/rust/issues/112337 is IMO a rust
bug, it's easy to work around in our code and it doesn't really affect
expressiveness.
Differential Revision: https://phabricator.services.mozilla.com/D180065
|
| |
|