Skip to content
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

Merged
merged 1 commit into from
Oct 30, 2017

Conversation

cbrewster
Copy link
Contributor

@cbrewster cbrewster commented Oct 27, 2017


  • There are tests for these changes OR
  • These changes do not require tests because refactoring.

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @bholley: components/style/values/generics/text.rs, components/style/values/computed/text.rs, components/style/values/specified/mod.rs, components/style/properties/gecko.mako.rs, components/style/properties/longhand/text.mako.rs and 2 more
  • @canaltinova: components/style/values/generics/text.rs, components/style/values/computed/text.rs, components/style/values/specified/mod.rs, components/style/properties/gecko.mako.rs, components/style/properties/longhand/text.mako.rs and 2 more
  • @emilio: components/style/values/generics/text.rs, components/style/values/computed/text.rs, components/style/values/specified/mod.rs, components/style/properties/gecko.mako.rs, components/style/properties/longhand/text.mako.rs and 3 more

@highfive
Copy link

warning Warning warning

  • These commits modify style and layout code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 27, 2017
@cbrewster
Copy link
Contributor Author

r? @emilio
I'm not sure I am doing the right thing here with Side.

@highfive highfive assigned emilio and unassigned jdm Oct 27, 2017
@emilio emilio mentioned this pull request Oct 27, 2017
49 tasks
Copy link
Member

@emilio emilio left a 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);
Copy link
Member

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(),
Copy link
Member

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 {
Copy link
Member

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.

@cbrewster
Copy link
Contributor Author

@bors-servo r=emilio

@bors-servo
Copy link
Contributor

📌 Commit b0ac6d9 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 28, 2017

/// A generic value for the `text-overflow` property.
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, ToCss)]
pub enum TextOverflowSide {
Copy link
Member

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!

Copy link
Contributor Author

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?

@bors-servo
Copy link
Contributor

⌛ Testing commit b0ac6d9 with merge 955bbea...

bors-servo pushed a commit that referenced this pull request Oct 28, 2017
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 -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt3

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 28, 2017
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 28, 2017
@emilio
Copy link
Member

emilio commented Oct 28, 2017

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit deb9327 has been approved by emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 28, 2017
@emilio
Copy link
Member

emilio commented Oct 28, 2017

(You could have just landed yourself, no need to ask for re-review for a trivial change like that IMO :P)

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 28, 2017
@cbrewster
Copy link
Contributor Author

cbrewster commented Oct 28, 2017

@bors-servo retry

  • time-out in css blur test

@bors-servo
Copy link
Contributor

⚡ 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...

@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt3

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 28, 2017
@cbrewster
Copy link
Contributor Author

@bors-servo retry

  • Timeout in CSS blur test

@bors-servo
Copy link
Contributor

⚡ 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...

@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt3

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Oct 28, 2017
@cbrewster
Copy link
Contributor Author

@bors-servo retry

  • time-out in css blur test

@bors-servo
Copy link
Contributor

⌛ Testing commit deb9327 with merge 4078927...

bors-servo pushed a commit that referenced this pull request Oct 29, 2017
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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 29, 2017
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt3

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 29, 2017
@jdm
Copy link
Member

jdm commented Oct 29, 2017

It should be clear to everyone by now that retrying will not change the result.

@emilio
Copy link
Member

emilio commented Oct 30, 2017

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 :)

@jdm
Copy link
Member

jdm commented Oct 30, 2017

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.

@emilio
Copy link
Member

emilio commented Oct 30, 2017

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 servo.css uses text-overflow: inherit, which doesn't even use the paths this patch is moving.

@emilio
Copy link
Member

emilio commented Oct 30, 2017

@bors-servo retry #19064

@bors-servo
Copy link
Contributor

⌛ Testing commit deb9327 with merge 7f8842f...

bors-servo pushed a commit that referenced this pull request Oct 30, 2017
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 -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Oct 30, 2017
@bors-servo
Copy link
Contributor

☀️ 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
Approved by: emilio
Pushing 7f8842f to master...

@bors-servo bors-servo merged commit deb9327 into servo:master Oct 30, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 30, 2017
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.

5 participants