Use static slice for supported media features. - #405
Open
jdm wants to merge 25 commits into
Open
Conversation
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 2453c41 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>
The unit of (1 / 2px) is definitely not a px. Right now we disallow dividing by non-numbers, so enforce it. Once we implement unit math we could start tracking exponents (and support something like squared pixels etc). Differential Revision: https://phabricator.services.mozilla.com/D304694
Servo PR: servo/servo#44978 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
We were previously using a mix of f32 and f64. Then it could happen that we would first check that `a < b` in f64, but when converting to f32, they might become equal due to the precision loss. Thus this could break invariants in the logic, making a `debug_unreachable!()` reachable. Servo PR: servo/servo#45682 Signed-off-by: Oriol Brufau <obrufau@igalia.com> Co-authored-by: Martin Robinson <mrobinson@abandonedwig.info>
Reverts #368 More work is required in Servo to integrate this.
Fixes #390 This feature is quite impactful as it is required for Tailwind's hover styles to work. Servo PR: servo/servo#45681 Signed-off-by: Nico Burns <nico@nicoburns.com>
…#388) It's not possible to properly calculate these only looking at style, because the results depends on the used `overflow` value. Servo PR: servo/servo#45629 Signed-off-by: Martin Robinson <martin@abandonedwig.info>
Fixes a compile warning from #388. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Performs some changes so that Servo will be able to use these: - `ComputedFontWeightRange` - `ComputedFontStretchRange` - `ComputedFontStyleDescriptor` Servo PR: servo/servo#45821 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
The implementation does the same as what gecko does (except that I didn't add support for `device-aspect-ratio`, hence slightly simpler / inlined. Servo PR: servo/servo#45490 --------- Signed-off-by: Martin Robinson <martin@abandonedwig.info> Co-authored-by: Martin Robinson <martin@abandonedwig.info>
This method was performing a single iteration. But most callers want to perform multiple iterations, so they were calling it in a loop. So this patch replaces `iterate()` with `iterate_by()`, which takes the desired number of iterations as a parameter, and returns the actual number of iterations that were performed. Servo PR: servo/servo#45978 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
#401) It was only incremented for finite animations, but infinite animations need to be incremented too. Servo PR: servo/servo#45990 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Needed for servo/servo#45901 The servo PR is already approved, feel free to merge this immediately. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
Servo PR: servo/servo#44978 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Transitions can sometimes have 0 duration when the transition reversing shortening factor is also calculated to be 0. When that happens, we should always use 1.0 for the progress when calculating the value for the transition. This avoid division by zero. Servo PR: servo/servo#46016 Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
It's fine to subtract `n` when the value is `n`, we just don't want to get negative. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
Loirooriol
reviewed
Jun 28, 2026
Loirooriol
left a comment
Collaborator
There was a problem hiding this comment.
Interesting. I guess while you are at it, could do it for Gecko's MEDIA_FEATURES. And for CONTAINER_FEATURES. And FeatureType::features() does no longer need to use & for them.
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.
This reduces the risk of merge conflicts when adding new media features.