mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Positioning fixes for RTL floats
This commit is contained in:
parent
ec5c333347
commit
0048b4f2ab
6 changed files with 52 additions and 4 deletions
|
@ -919,6 +919,13 @@ impl<T: Copy + Add<T, Output=T> + Sub<T, Output=T>> LogicalRect<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn translate_by_size(&self, offset: LogicalSize<T>) -> LogicalRect<T> {
|
||||
LogicalRect {
|
||||
start: self.start + offset,
|
||||
..*self
|
||||
}
|
||||
}
|
||||
|
||||
pub fn translate(&self, offset: &LogicalPoint<T>) -> LogicalRect<T> {
|
||||
LogicalRect {
|
||||
start: self.start + LogicalSize {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue