diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-02-05 10:58:50 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-02-05 10:58:50 +0530 |
commit | fb3fe3d784c24cdfd8040af0282e5c2182ee2051 (patch) | |
tree | 5c9526e286505884288f3ed2fa5353bdbe8c9b85 /components/layout/inline.rs | |
parent | b3bbea8be81f949e2af6e31cf67bcaaaeb8bd84b (diff) | |
parent | 7c5b2d6cb3ee4f934e529162be368c36a7f590a4 (diff) | |
download | servo-fb3fe3d784c24cdfd8040af0282e5c2182ee2051.tar.gz servo-fb3fe3d784c24cdfd8040af0282e5c2182ee2051.zip |
Auto merge of #9522 - pcwalton:two-overflows, r=mbrubeck
layout: Separate out overflow-for-scrolling from overflow-for-paint.
Closes #9484.
r? @mbrubeck
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9522)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r-- | components/layout/inline.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 9f77ecfcb9e..d20fb2224a1 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -8,12 +8,13 @@ use app_units::Au; use block::AbsoluteAssignBSizesTraversal; use context::LayoutContext; use display_list_builder::{FragmentDisplayListBuilding, InlineFlowDisplayListBuilding}; -use euclid::{Point2D, Rect, Size2D}; +use euclid::{Point2D, Size2D}; use floats::{FloatKind, Floats, PlacementInfo}; use flow::{EarlyAbsolutePositionInfo, MutableFlowUtils, OpaqueFlow}; use flow::{self, BaseFlow, Flow, FlowClass, ForceNonfloatedFlag, IS_ABSOLUTELY_POSITIONED}; use flow_ref; -use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo}; +use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, Overflow}; +use fragment::{SpecificFragmentInfo}; use gfx::display_list::OpaqueNode; use gfx::font::FontMetrics; use gfx::font_context::FontContext; @@ -1756,14 +1757,13 @@ impl Flow for InlineFlow { fn repair_style(&mut self, _: &Arc<ComputedValues>) {} - fn compute_overflow(&self) -> Rect<Au> { - let mut overflow = Rect::zero(); + fn compute_overflow(&self) -> Overflow { + let mut overflow = Overflow::new(); let flow_size = self.base.position.size.to_physical(self.base.writing_mode); let relative_containing_block_size = &self.base.early_absolute_position_info.relative_containing_block_size; for fragment in &self.fragments.fragments { - overflow = overflow.union(&fragment.compute_overflow(&flow_size, - &relative_containing_block_size)) + overflow.union(&fragment.compute_overflow(&flow_size, &relative_containing_block_size)) } overflow } |