enable text-overflow property for Servo#270
enable text-overflow property for Servo#270RichardTjokroutomo wants to merge 19 commits intoservo:mainfrom
Conversation
Loirooriol
left a comment
There was a problem hiding this comment.
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.
ebdcfa5 to
1f40f82
Compare
| first, | ||
| second, | ||
| sides_are_logical: false, | ||
| if let Ok(second) = input.try_parse(|input| <TextOverflowSide as Parse>::parse(context, input)) { |
There was a problem hiding this comment.
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)?;
|
@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. |
Loirooriol
left a comment
There was a problem hiding this comment.
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)
cb461f6 to
5c4f381
Compare
5c4f381 to
61c9280
Compare
18765f5 to
f075d49
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>>
f075d49 to
080adb2
Compare
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>
Signed-off-by: Richard Tjokroutomo <richard.tjokro2@gmail.com>
080adb2 to
cddd2c4
Compare
Enable
text-overflowfor Servo. Companion PR: #40526