Auto merge of #16999 - bzbarsky:fix-text-overflow-handling, r=Manishearth

Fix stylo's text-overflow handling to match gecko.

A single value sets the text-overflow on the _end_ of the text, not both start and end.

<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/16999)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-05-23 20:39:24 -05:00 committed by GitHub
commit f3a694a7b4
3 changed files with 67 additions and 13 deletions

View file

@ -713,7 +713,7 @@ impl LineBreaker {
let available_inline_size = self.pending_line.green_zone.inline -
self.pending_line.bounds.size.inline - indentation;
let ellipsis = match (&fragment.style().get_text().text_overflow.first,
let ellipsis = match (&fragment.style().get_text().text_overflow.second,
fragment.style().get_box().overflow_x) {
(&longhands::text_overflow::Side::Clip, _) | (_, overflow_x::T::visible) => None,
(&longhands::text_overflow::Side::Ellipsis, _) => {