aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/layout_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r--components/layout/layout_task.rs42
1 files changed, 21 insertions, 21 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs
index 22e00904c75..3309ff9c28b 100644
--- a/components/layout/layout_task.rs
+++ b/components/layout/layout_task.rs
@@ -10,7 +10,7 @@ use construct::ConstructionResult;
use context::SharedLayoutContext;
use flow::{mod, Flow, ImmutableFlowUtils, MutableFlowUtils, MutableOwnedFlowUtils};
use flow_ref::FlowRef;
-use fragment::{Fragment, FragmentOverflowIterator};
+use fragment::{Fragment, FragmentBorderBoxIterator};
use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT};
use layout_debug;
use parallel::{mod, UnsafeFlow};
@@ -604,8 +604,8 @@ impl LayoutTask {
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
// stuff. So the position is wrong in most cases.
let requested_node: OpaqueNode = OpaqueNodeMethods::from_script_node(requested_node);
- let mut iterator = UnioningFragmentOverflowIterator::new(requested_node);
- sequential::iterate_through_flow_tree_fragment_bounds(layout_root, &mut iterator);
+ let mut iterator = UnioningFragmentBorderBoxIterator::new(requested_node);
+ sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
rw_data.content_box_response = iterator.rect;
}
@@ -616,8 +616,8 @@ impl LayoutTask {
// FIXME(pcwalton): This has not been updated to handle the stacking context relative
// stuff. So the position is wrong in most cases.
let requested_node: OpaqueNode = OpaqueNodeMethods::from_script_node(requested_node);
- let mut iterator = CollectingFragmentOverflowIterator::new(requested_node);
- sequential::iterate_through_flow_tree_fragment_bounds(layout_root, &mut iterator);
+ let mut iterator = CollectingFragmentBorderBoxIterator::new(requested_node);
+ sequential::iterate_through_flow_tree_fragment_border_boxes(layout_root, &mut iterator);
rw_data.content_boxes_response = iterator.rects;
}
@@ -1017,26 +1017,26 @@ impl LayoutRPC for LayoutRPCImpl {
}
}
-struct UnioningFragmentOverflowIterator {
+struct UnioningFragmentBorderBoxIterator {
node_address: OpaqueNode,
rect: Rect<Au>,
}
-impl UnioningFragmentOverflowIterator {
- fn new(node_address: OpaqueNode) -> UnioningFragmentOverflowIterator {
- UnioningFragmentOverflowIterator {
+impl UnioningFragmentBorderBoxIterator {
+ fn new(node_address: OpaqueNode) -> UnioningFragmentBorderBoxIterator {
+ UnioningFragmentBorderBoxIterator {
node_address: node_address,
rect: Rect::zero(),
}
}
}
-impl FragmentOverflowIterator for UnioningFragmentOverflowIterator {
- fn process(&mut self, _: &Fragment, bounds: Rect<Au>) {
- if self.rect.is_empty() {
- self.rect = bounds;
+impl FragmentBorderBoxIterator for UnioningFragmentBorderBoxIterator {
+ fn process(&mut self, _: &Fragment, border_box: &Rect<Au>) {
+ self.rect = if self.rect.is_empty() {
+ *border_box
} else {
- self.rect = self.rect.union(&bounds);
+ self.rect.union(border_box)
}
}
@@ -1045,23 +1045,23 @@ impl FragmentOverflowIterator for UnioningFragmentOverflowIterator {
}
}
-struct CollectingFragmentOverflowIterator {
+struct CollectingFragmentBorderBoxIterator {
node_address: OpaqueNode,
rects: Vec<Rect<Au>>,
}
-impl CollectingFragmentOverflowIterator {
- fn new(node_address: OpaqueNode) -> CollectingFragmentOverflowIterator {
- CollectingFragmentOverflowIterator {
+impl CollectingFragmentBorderBoxIterator {
+ fn new(node_address: OpaqueNode) -> CollectingFragmentBorderBoxIterator {
+ CollectingFragmentBorderBoxIterator {
node_address: node_address,
rects: Vec::new(),
}
}
}
-impl FragmentOverflowIterator for CollectingFragmentOverflowIterator {
- fn process(&mut self, _: &Fragment, bounds: Rect<Au>) {
- self.rects.push(bounds);
+impl FragmentBorderBoxIterator for CollectingFragmentBorderBoxIterator {
+ fn process(&mut self, _: &Fragment, border_box: &Rect<Au>) {
+ self.rects.push(*border_box);
}
fn should_process(&mut self, fragment: &Fragment) -> bool {