mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Explicitly thread border box dimensions and relative offsets
through display list building. The old `flow_origin` concept was ill-defined (sometimes the border box plus the flow origin, sometimes including horizontal margins and sometimes not, sometimes including relative position and sometimes not), leading to brittleness and test failures. This commit reworks the logic to always pass border box origins in during display list building.
This commit is contained in:
parent
5ea2c6dcfd
commit
bf540d590a
20 changed files with 591 additions and 456 deletions
|
@ -9,13 +9,13 @@
|
|||
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
||||
use context::LayoutContext;
|
||||
use flow::{Flow, FlowClass};
|
||||
use fragment::{Fragment, FragmentOverflowIterator};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator};
|
||||
use model::{MaybeAuto};
|
||||
use layout_debug;
|
||||
use table::InternalTable;
|
||||
use wrapper::ThreadSafeLayoutNode;
|
||||
|
||||
use geom::Rect;
|
||||
use geom::{Point2D, Rect};
|
||||
use servo_util::geometry::Au;
|
||||
use std::fmt;
|
||||
use style::{UnsignedIntegerAttribute, ComputedValues};
|
||||
|
@ -167,8 +167,10 @@ impl Flow for TableCellFlow {
|
|||
self.block_flow.compute_overflow()
|
||||
}
|
||||
|
||||
fn iterate_through_fragment_overflow(&self, iterator: &mut FragmentOverflowIterator) {
|
||||
self.block_flow.iterate_through_fragment_overflow(iterator);
|
||||
fn iterate_through_fragment_border_boxes(&self,
|
||||
iterator: &mut FragmentBorderBoxIterator,
|
||||
stacking_context_position: &Point2D<Au>) {
|
||||
self.block_flow.iterate_through_fragment_border_boxes(iterator, stacking_context_position)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue