Skip to content

enable text-overflow property for Servo#270

Open
RichardTjokroutomo wants to merge 19 commits intoservo:mainfrom
RichardTjokroutomo:txt-overflow
Open

enable text-overflow property for Servo#270
RichardTjokroutomo wants to merge 19 commits intoservo:mainfrom
RichardTjokroutomo:txt-overflow

Conversation

@RichardTjokroutomo
Copy link
Copy Markdown
Contributor

@RichardTjokroutomo RichardTjokroutomo commented Nov 18, 2025

Enable text-overflow for Servo. Companion PR: #40526

Copy link
Copy Markdown
Collaborator

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said in the Servo review, since it's not handling strings or 2 values, this should alter the parser to reject these cases for Servo.

Alternatively, you can put this property behind a flag, and then in Servo make it an experimental web platform feature flag. Then it won't be enabled by default, but it will be used in tests.

Comment thread style/properties/longhands/text.mako.rs Outdated
Comment thread style/values/specified/text.rs
Comment thread style/values/specified/text.rs Outdated
Comment thread style/values/specified/text.rs Outdated
first,
second,
sides_are_logical: false,
if let Ok(second) = input.try_parse(|input| <TextOverflowSide as Parse>::parse(context, input)) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As with the other case, the compiler now can't resolve to the correct Parse.

error[E0061]: this function takes 1 argument but 2 arguments were supplied
   --> style\values\specified\text.rs:231:21
    |
231 |         let first = TextOverflowSide::parse(context, input)?;
    |                     ^^^^^^^^^^^^^^^^^^^^^^^ ------- unexpected argument #1 of type `&ParserContext<'_>`
    |
note: associated function defined here
   --> style\values\specified\text.rs:178:5
    |
178 |     Parse,
    |     ^^^^^
    = note: this error originates in the derive macro `Parse` (in Nightly builds, run with -Z macro-backtrace for more info)
help: remove the extra argument
    |
231 -         let first = TextOverflowSide::parse(context, input)?;
231 +         let first = TextOverflowSide::parse(input)?;

Comment thread style/values/specified/text.rs Outdated
@RichardTjokroutomo
Copy link
Copy Markdown
Contributor Author

@Loirooriol I noticed earlier today that a PR on Stylo has been merged (#271), so I tried to rebase. However, I got some compilation errors.

Copy link
Copy Markdown
Collaborator

@Loirooriol Loirooriol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since changing the struct affects things more than what I expected, maybe just do something like

        #[cfg(feature = "servo")]
        if matches!(first, TextOverflowSide::String(_)) {
            return Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError));
        }
        #[cfg(feature = "gecko")]
        if let Ok(second) = input.try_parse(|input| TextOverflowSide::parse(context, input)) {
            return Ok(Self {
                first,
                second,
                sides_are_logical: false,
            });
        }
        Ok(Self {
            first: TextOverflowSide::Clip,
            second: first,
            sides_are_logical: true,
        })

Or add support for strings as Nico says in servo/servo#40526 (comment)

delan and others added 11 commits March 5, 2026 04:42
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>
TimvdLippe and others added 4 commits March 8, 2026 16:16
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>>
mrobinson and others added 4 commits March 10, 2026 06:41
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 is a rebase of d99b4a5

Signed-off-by: Oriol Brufau <obrufau@igalia.com>

Sort static prefs by name (servo#303)

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants