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

13894 Use graphenes in text-emphasis-style #13914

Merged
merged 1 commit into from Oct 27, 2016

Conversation

@TooManyBees
Copy link
Contributor

TooManyBees commented Oct 25, 2016

Use unicode_segmentation crate to truncate strings on grapheme boundaries.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #13894 (github issue number if applicable).
  • There are tests for these changes

This change is Reviewable

@highfive
Copy link

highfive commented Oct 25, 2016

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @metajack (or someone else) soon.

@highfive
Copy link

highfive commented Oct 25, 2016

Heads up! This PR modifies the following files:

  • @bholley: components/style/Cargo.toml, components/style/properties/longhand/inherited_text.mako.rs, components/style/lib.rs
  • @emilio: components/style/Cargo.toml, components/style/properties/longhand/inherited_text.mako.rs, components/style/lib.rs
@highfive
Copy link

highfive commented Oct 25, 2016

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!
Copy link
Member

emilio left a comment

Looks good to me, but I have a question.

@@ -87,6 +87,8 @@ extern crate smallvec;
#[macro_use]
extern crate style_traits;
extern crate time;
#[allow(unused_extern_crates)]

This comment has been minimized.

Copy link
@emilio

emilio Oct 25, 2016

Member

hm? Can't this go away? Why does this generate a warning?

This comment has been minimized.

Copy link
@canova

canova Oct 25, 2016

Member

Probably it's because text-emphasis-style is stylo only property. And it generates error during ./mach build -d

This comment has been minimized.

Copy link
@emilio

emilio Oct 25, 2016

Member

Oh, right, can we use #[cfg(feature = "gecko")] instead?

This comment has been minimized.

Copy link
@canova

canova Oct 25, 2016

Member

Yeah, that makes sense.

This comment has been minimized.

Copy link
@canova

canova Oct 25, 2016

Member

Oops, ./mach test-unit generates error this time(It couldn't find unicode_segmentation crate). Maybe we need to set gecko flag in test-unit.

@canova
Copy link
Member

canova commented Oct 26, 2016

@emilio I think we can merge this pr like this and we can deal with test-unit later. What do you think?

@emilio
Copy link
Member

emilio commented Oct 26, 2016

Sounds good. Could you file an issue for that?

@bors-servo: r+

@bors-servo
Copy link
Contributor

bors-servo commented Oct 26, 2016

📌 Commit 17f672e has been approved by emilio

@highfive highfive assigned emilio and unassigned metajack Oct 26, 2016
@bors-servo
Copy link
Contributor

bors-servo commented Oct 26, 2016

Testing commit 17f672e with merge f36f09d...

bors-servo added a commit that referenced this pull request Oct 26, 2016
13894 Use graphenes in text-emphasis-style

<!-- Please describe your changes on the following line: -->
Use `unicode_segmentation` crate to truncate strings on grapheme boundaries.

---
<!-- 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 fix #13894 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/13914)
<!-- Reviewable:end -->
@canova
Copy link
Member

canova commented Oct 26, 2016

Sure!

@bors-servo
Copy link
Contributor

bors-servo commented Oct 26, 2016

💔 Test failed - linux-dev

@emilio
Copy link
Member

emilio commented Oct 26, 2016

You need to run ./mach cargo-update -p style so the new dependency ends up in cef's cargo.lock too.

@emilio
Copy link
Member

emilio commented Oct 26, 2016

Can you squash your commits please?

Add test with multi-character grapheme

Run cargo update
@TooManyBees TooManyBees force-pushed the TooManyBees:13894-use-graphemes branch from d65b285 to 06db231 Oct 26, 2016
@emilio
Copy link
Member

emilio commented Oct 27, 2016

@bors-servo r+

Awesome, thanks!

@bors-servo
Copy link
Contributor

bors-servo commented Oct 27, 2016

📌 Commit 06db231 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Oct 27, 2016

Testing commit 06db231 with merge b4a882f...

bors-servo added a commit that referenced this pull request Oct 27, 2016
13894 Use graphenes in text-emphasis-style

<!-- Please describe your changes on the following line: -->
Use `unicode_segmentation` crate to truncate strings on grapheme boundaries.

---
<!-- 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 fix #13894 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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/13914)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 27, 2016

@bors-servo bors-servo merged commit 06db231 into servo:master Oct 27, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

7 participants
You can’t perform that action at this time.