mirror of
https://github.com/servo/servo.git
synced 2025-08-17 19:35:33 +01:00
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:
commit
f3a694a7b4
3 changed files with 67 additions and 13 deletions
|
@ -3769,7 +3769,7 @@ fn static_assert() {
|
|||
}
|
||||
pub fn set_text_overflow(&mut self, v: longhands::text_overflow::computed_value::T) {
|
||||
use gecko_bindings::structs::nsStyleTextOverflowSide;
|
||||
use properties::longhands::text_overflow::{SpecifiedValue, Side};
|
||||
use properties::longhands::text_overflow::Side;
|
||||
|
||||
fn set(side: &mut nsStyleTextOverflowSide, value: &Side) {
|
||||
let ty = match *value {
|
||||
|
@ -3784,13 +3784,10 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
self.clear_overflow_sides_if_string();
|
||||
self.gecko.mTextOverflow.mLogicalDirections = v.second.is_none();
|
||||
self.gecko.mTextOverflow.mLogicalDirections = v.sides_are_logical;
|
||||
|
||||
let SpecifiedValue { ref first, ref second } = v;
|
||||
let second = second.as_ref().unwrap_or(&first);
|
||||
|
||||
set(&mut self.gecko.mTextOverflow.mLeft, first);
|
||||
set(&mut self.gecko.mTextOverflow.mRight, second);
|
||||
set(&mut self.gecko.mTextOverflow.mLeft, &v.first);
|
||||
set(&mut self.gecko.mTextOverflow.mRight, &v.second);
|
||||
}
|
||||
|
||||
pub fn copy_text_overflow_from(&mut self, other: &Self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue