-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
style: Move text-overflow outside of mako #19044
Conversation
Heads up! This PR modifies the following files:
|
r? @emilio |
a4693d0
to
9fdcc06
Compare
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.
r=me
impl ToCss for TextOverflow { | ||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write { | ||
if self.sides_are_logical { | ||
assert!(self.first == TextOverflowSide::Clip); |
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.
nit: if you want you can change this to assert_eq!
or debug_assert_eq!
.
#[inline] | ||
fn to_computed_value(&self, _context: &Context) -> Self::ComputedValue { | ||
if let Some(ref second) = self.second { | ||
Self::ComputedValue { first: self.first.clone(), |
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.
nit: Feel free to fixup the indentation while you're touching this :)
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<TextOverflow, ParseError<'i>> { | ||
let first = TextOverflowSide::parse(context, input)?; | ||
let second = input.try(|input| TextOverflowSide::parse(context, input)).ok(); | ||
Ok(TextOverflow { |
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.
nit: This can use TextOverflow { first, second }
, if you want.
9fdcc06
to
b0ac6d9
Compare
@bors-servo r=emilio |
📌 Commit b0ac6d9 has been approved by |
|
||
/// A generic value for the `text-overflow` property. | ||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, ToCss)] | ||
pub enum TextOverflowSide { |
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.
Hmm, though now that I realize of this, this is not a generic
value per se (those are supposed to actually have generic arguments and such). Usually when the computed and specified values are the same, we just define it in the specified
module and re-export it if needed from the computed
one.
Of course this can be fixed in a followup if you want. Thanks for working on this btw!
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.
No problem! I moved TextOverflowSide
to the specified
module, is that all that is needed?
style: Move text-overflow outside of mako <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are apart of #19015 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19044) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt3 |
b0ac6d9
to
deb9327
Compare
@bors-servo r+ |
📌 Commit deb9327 has been approved by |
(You could have just landed yourself, no need to ask for re-review for a trivial change like that IMO :P) |
@bors-servo retry
|
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only mac-rel-wpt3... |
💔 Test failed - mac-rel-wpt3 |
@bors-servo retry
|
⚡ Previous build results for android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt4, windows-msvc-dev are reusable. Rebuilding only mac-rel-wpt3... |
💔 Test failed - mac-rel-wpt3 |
@bors-servo retry
|
style: Move text-overflow outside of mako <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are apart of #19015 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19044) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt3 |
It should be clear to everyone by now that retrying will not change the result. |
Well, a WR update landed in the meantime, and given this didn't timeout locally, it seemed reasonable to retry :) |
That being said, the same timeout was observed in #18882 earlier today. It's still weird how it's not hitting any other PRs at anywhere near the same pervasive failure rate. |
I'm 99.9% sure that this PR isn't to blame for that failure, that test doesn't even use text-overflow, and the only occurrence of it in |
@bors-servo retry #19064 |
style: Move text-overflow outside of mako <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes are apart of #19015 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because refactoring. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19044) <!-- Reviewable:end -->
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is