aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/layout/inline.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2014-08-19 00:56:28 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-08-26 21:24:46 +0100
commit353b1a17d5fe66097755517dec8cda0dc38f99d5 (patch)
tree6006abe21bc957cf312f6de092f40586a975c72d /src/components/layout/inline.rs
parent36ed8d4212c979bca4c4ea54644e6048c1852c23 (diff)
downloadservo-353b1a17d5fe66097755517dec8cda0dc38f99d5.tar.gz
servo-353b1a17d5fe66097755517dec8cda0dc38f99d5.zip
Convert back to physical some layout coordinates.
Diffstat (limited to 'src/components/layout/inline.rs')
-rw-r--r--src/components/layout/inline.rs13
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)));
}