-
Notifications
You must be signed in to change notification settings - Fork 57
enable text-overflow property for Servo #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Loirooriol
left a comment
There was a problem hiding this 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.
ebdcfa5 to
1f40f82
Compare
|
@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.
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)
1f40f82 to
0017e21
Compare
Signed-off-by: Richard Tjokroutomo <[email protected]> Co-authored-by: Oriol Brufau <[email protected]>
6bdf687 to
cb461f6
Compare
Signed-off-by: Richard Tjokroutomo <[email protected]>
cb461f6 to
5c4f381
Compare
Enable
text-overflowfor Servo. Companion PR: #40526