mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -4,7 +4,7 @@
|
|||
|
||||
use util::geometry::Au;
|
||||
use util::logical_geometry::WritingMode;
|
||||
use util::logical_geometry::{LogicalPoint, LogicalRect, LogicalSize};
|
||||
use util::logical_geometry::{LogicalRect, LogicalSize};
|
||||
use util::persistent_list::PersistentList;
|
||||
use std::cmp::{max, min};
|
||||
use std::i32;
|
||||
|
@ -146,10 +146,10 @@ impl Floats {
|
|||
}
|
||||
|
||||
/// Returns the position of the last float in flow coordinates.
|
||||
pub fn last_float_pos(&self) -> Option<LogicalPoint<Au>> {
|
||||
pub fn last_float_pos(&self) -> Option<LogicalRect<Au>> {
|
||||
match self.list.floats.front() {
|
||||
None => None,
|
||||
Some(float) => Some(float.bounds.start + self.offset),
|
||||
Some(float) => Some(float.bounds.translate_by_size(self.offset)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue