diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2014-08-27 01:07:45 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2014-08-27 01:07:45 +0100 |
commit | a0d70c4cfd57f3bdea6e150cc3d6e4ece7ead1dd (patch) | |
tree | 67a6c483062e6c3a2edd3c5f586b4a1556d40a56 /src/components/layout/inline.rs | |
parent | c1ec0b11e92f395d0748955dcf25800ccacfd623 (diff) | |
parent | a29ab0e47cd0c4ce71a3b6f61f441c42e5b4f8be (diff) | |
download | servo-a0d70c4cfd57f3bdea6e150cc3d6e4ece7ead1dd.tar.gz servo-a0d70c4cfd57f3bdea6e150cc3d6e4ece7ead1dd.zip |
Merge pull request #3110 from SimonSapin/writing-modes-reftest
Add a basic CSS Writing Modes reftest
Diffstat (limited to 'src/components/layout/inline.rs')
-rw-r--r-- | src/components/layout/inline.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/layout/inline.rs b/src/components/layout/inline.rs index 1a427f79c0b..9b6b0af28d7 100644 --- a/src/components/layout/inline.rs +++ b/src/components/layout/inline.rs @@ -16,7 +16,7 @@ use text; use wrapper::ThreadSafeLayoutNode; use collections::{Deque, RingBuf}; -use geom::Size2D; +use geom::Rect; use gfx::display_list::ContentLevel; use gfx::font::FontMetrics; use gfx::font_context::FontContext; @@ -927,12 +927,8 @@ impl InlineFlow { } pub fn build_display_list_inline(&mut self, layout_context: &LayoutContext) { - let abs_rect = LogicalRect::from_point_size( - self.base.writing_mode, self.base.abs_position, self.base.position.size); - // FIXME(#2795): Get the real container size - let container_size = Size2D::zero(); - if !abs_rect.to_physical(self.base.writing_mode, container_size) - .intersects(&layout_context.shared.dirty) { + let size = self.base.position.size.to_physical(self.base.writing_mode); + if !Rect(self.base.abs_position, size).intersects(&layout_context.shared.dirty) { return } @@ -947,7 +943,8 @@ impl InlineFlow { Some(context)); drop(fragment.build_display_list(&mut self.base.display_list, layout_context, - self.base.abs_position + rel_offset, + self.base.abs_position.add_size( + &rel_offset.to_physical(self.base.writing_mode)), ContentLevel, Some(context))); } |