Make RestyleDamage an associated type and make embedder responsible for all damage computation#224
Draft
nicoburns wants to merge 26 commits intoservo:mainfrom
Draft
Make RestyleDamage an associated type and make embedder responsible for all damage computation#224nicoburns wants to merge 26 commits intoservo:mainfrom
RestyleDamage an associated type and make embedder responsible for all damage computation#224nicoburns wants to merge 26 commits intoservo:mainfrom
Conversation
0b1623f to
4fe9a9a
Compare
4fe9a9a to
ef96559
Compare
Any ancestors of this commit are from upstream mozilla-central, with some filtering and renaming. Our patches and sync tooling start here. The sync tooling has all been squashed into this commit, based on: https://github.com/servo/stylo/commits/64731e10dc8ef87ef52aa2fb9f988c3b2530f3a7
This is a rebase of ab75cec Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Oriol Brufau <obrufau@igalia.com>
- Bump stylo_* to 0.13.0 - Bump selectors to 0.36.0 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Required for firing events for contenteditable Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This way it can be shared among Gecko and Servo. Stylo PR: servo/servo#43085 Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=2021743 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
…holder` and `::marker` (servo#322) The `::placeholder` pseudo element should be a public pseudo element. And, both `::placeholder` and `::marker` should have a property restriction as defined in the spec. In stylo, the property restriction has been computed in `PropertyFlags`. Servo PR: servo/servo#43053 Signed-off-by: stevennovaryo <steven.novaryo@gmail.com>
This enables `jump-start`, `jump-end`, `jump-none`, `jump-both`. The feature is left here 7 years ago. As tested with examples, all `step-easing-function`s work as expected. Servo PR: servo/servo#43061 --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>>
This change does two things: 1. Restores Servo's original theme colors from before support for system color was added. 2. Eliminates the selection of default system color based on the color scheme of the system. This code was dead code since `is_dark_color_scheme` always returns `false`. Servo PR: servo/servo#43107 Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Adds a new file `style/device/mod.rs` with the `Device` logic that is common for Gecko and Servo. The Gecko-specific logic for `Device` is moved into `style/device/gecko.rs`, and the previous `style/gecko/media_queries.rs` is removed. The Servo-specific logic for `Device` is moved into `style/device/servo.rs`. The previous `servo/media_queries.rs` also had logic for media features, which is now moved into `style/servo/media_features.rs` for consistency with Gecko. Servo PR: servo/servo#43146 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This makes Servo use the same `ListStyleType` as Gecko. In particular: - `counter()` and `counters()` will no longer accept a `none` style. - `list-style-type` will now accept a string. - Both `list-style-type` and counters will now accept arbitrary keywords. However, Servo's flavor of Stylo will still reject `@counter-style` rules. So non-predefined keywords will just default to `decimal`. - Both `list-style-type` and counters will now accept `symbols()`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This PR enables parsing `first-letter` pseudo element for servo. An accompanying servo PR (servo/servo#43027) is open --------- Signed-off-by: Minghua Wu <michael.wu1107@gmail.com> Signed-off-by: minghuaw <michael.wu1107@gmail.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Alex Touchet <26315797+atouchet@users.noreply.github.com>
This isn't really used. Nowadays we always test incremental layout as it's considered an essential feature of the functioning of Servo. After servo/servo#43207, Servo will no longer use this feature. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
The independently versioned crates in this workspace haven't had any changes since the last release according to git.
Already landed upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=2023380 Servo PR: servo/servo#43368 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
servo#330 moved the module into `style/device` but forgot to remove the old declaration. That's why `cargo fmt` currently fails on `main`: ``` Error writing files: failed to resolve mod `media_queries`: /home/alaska/stylo/style/gecko/media_queries.rs does not exist ``` Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Signed-off-by: Nico Burns <nico@nicoburns.com>
ef96559 to
86e72d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft for design review: does the key idea here (pushing the top-level
compute_style_differenceup to the embedder) seem like a good idea?(includes the changes from #222 which is a much more surface-level change)
Servo PR: servo/servo#38479
Objective
restyle_damage_*functions) is exposed as public library functions that the embedded can call into).LayoutDamagetype.RestyleDamagetype more explicit (by making it a trait)Changes Made
TRestyleDamagetrait to represent restyle damageRestyleDamageassociated type toTElementtraitcompute_style_differencefunction from the (private)MatchMethodstrait to the (public)TElementtrait (so that the embedder can implement it).TElement::compute_layout_damagemethod (embedders should now usecompute_style_differenceinstead).ElementDatastruct generic overTElementRestyleDamage::reconstructto::set_rebuild_pseudos(because that is the scenario in which it's called, and pseudos having changed doesn't necessarily imply that the entire box needs to be reconstructed (although Servo will presumably continue to do that for now))
Notes
There are a few places where Servo does different things to Gecko around
RestyleDamage:A key one is that in Gecko
RestyleDamage::is_empty()will befalse(triggering aStyleChange::Changedto be returned to Stylo) if any style property has changed. Whereas in Servo this only happens if one of the properties we check for damage has changed.We should check what the correct semantics are here and whether Servo's implementation is correct/valid.