Skip to content

style: Move text-overflow outside of mako - #19044

Merged
bors-servo merged 1 commit into
servo:masterfrom
cbrewster:text_overflow_nomako
Oct 30, 2017
Merged

bors-servo merged 1 commit into
servo:masterfrom
cbrewster:text_overflow_nomako

Conversation

@cbrewster

@cbrewster cbrewster commented Oct 27, 2017 •

Copy link
Copy Markdown
Contributor

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

This change is Reviewable

@highfive

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
48 of 49 tasks
@cbrewster
cbrewster force-pushed the text_overflow_nomako branch from a4693d0 to 9fdcc06 Compare October 27, 2017 22:58

@emilio emilio left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
cbrewster force-pushed the text_overflow_nomako branch from 9fdcc06 to b0ac6d9 Compare October 28, 2017 01:08
@cbrewster

Copy link
Copy Markdown
Contributor Author

@bors-servo r=emilio

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@cbrewster
cbrewster force-pushed the text_overflow_nomako branch from b0ac6d9 to deb9327 Compare October 28, 2017 04:09
@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

emilio commented Oct 28, 2017

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
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

emilio commented Oct 28, 2017

Copy link
Copy Markdown
Member

(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

cbrewster commented Oct 28, 2017 •

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

  • time-out in css blur test

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@bors-servo retry

  • Timeout in CSS blur test

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@bors-servo retry

  • time-out in css blur test

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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

jdm commented Oct 29, 2017 •

Copy link
Copy Markdown
Member

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

@emilio

emilio commented Oct 30, 2017

Copy link
Copy Markdown
Member

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

jdm commented Oct 30, 2017

Copy link
Copy Markdown
Member

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

emilio commented Oct 30, 2017 •

Copy link
Copy Markdown
Member

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

emilio commented Oct 30, 2017 •

Copy link
Copy Markdown
Member

@bors-servo retry #19064

@bors-servo

Copy link
Copy Markdown
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
Copy Markdown
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