mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Revert "layout: Implement ordered lists, CSS counters, and quotes
per CSS 2.1"
This reverts commit 30fd28d107
.
This commit is contained in:
parent
7a218b3f08
commit
4c1d778ced
36 changed files with 496 additions and 1735 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#![deny(unsafe_blocks)]
|
||||
|
||||
use construct::FlowConstructor;
|
||||
use context::LayoutContext;
|
||||
use css::node_style::StyledNode;
|
||||
use display_list_builder::{BlockFlowDisplayListBuilding, FragmentDisplayListBuilding};
|
||||
|
@ -39,8 +40,7 @@ use flow::{IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS};
|
|||
use flow::{LAYERS_NEEDED_FOR_DESCENDANTS, NEEDS_LAYER};
|
||||
use flow::{IS_ABSOLUTELY_POSITIONED};
|
||||
use flow::{CLEARS_LEFT, CLEARS_RIGHT};
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, FragmentMutator};
|
||||
use fragment::{SpecificFragmentInfo};
|
||||
use fragment::{CoordinateSystem, Fragment, FragmentBorderBoxIterator, SpecificFragmentInfo};
|
||||
use incremental::{REFLOW, REFLOW_OUT_OF_FLOW};
|
||||
use layout_debug;
|
||||
use model::{IntrinsicISizes, MarginCollapseInfo};
|
||||
|
@ -569,6 +569,20 @@ impl Encodable for BlockFlowFlags {
|
|||
}
|
||||
|
||||
impl BlockFlow {
|
||||
pub fn from_node(constructor: &mut FlowConstructor, node: &ThreadSafeLayoutNode) -> BlockFlow {
|
||||
let writing_mode = node.style().writing_mode;
|
||||
BlockFlow {
|
||||
base: BaseFlow::new(Some((*node).clone()), writing_mode, ForceNonfloatedFlag::ForceNonfloated),
|
||||
fragment: Fragment::new(constructor, node),
|
||||
static_b_offset: Au::new(0),
|
||||
inline_size_of_preceding_left_floats: Au(0),
|
||||
inline_size_of_preceding_right_floats: Au(0),
|
||||
hypothetical_position: LogicalPoint::new(writing_mode, Au(0), Au(0)),
|
||||
float: None,
|
||||
flags: BlockFlowFlags::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_node_and_fragment(node: &ThreadSafeLayoutNode, fragment: Fragment) -> BlockFlow {
|
||||
let writing_mode = node.style().writing_mode;
|
||||
BlockFlow {
|
||||
|
@ -583,6 +597,23 @@ impl BlockFlow {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn float_from_node(constructor: &mut FlowConstructor,
|
||||
node: &ThreadSafeLayoutNode,
|
||||
float_kind: FloatKind)
|
||||
-> BlockFlow {
|
||||
let writing_mode = node.style().writing_mode;
|
||||
BlockFlow {
|
||||
base: BaseFlow::new(Some((*node).clone()), writing_mode, ForceNonfloatedFlag::FloatIfNecessary),
|
||||
fragment: Fragment::new(constructor, node),
|
||||
static_b_offset: Au::new(0),
|
||||
inline_size_of_preceding_left_floats: Au(0),
|
||||
inline_size_of_preceding_right_floats: Au(0),
|
||||
hypothetical_position: LogicalPoint::new(writing_mode, Au(0), Au(0)),
|
||||
float: Some(box FloatedBlockInfo::new(float_kind)),
|
||||
flags: BlockFlowFlags::empty(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn float_from_node_and_fragment(node: &ThreadSafeLayoutNode,
|
||||
fragment: Fragment,
|
||||
float_kind: FloatKind)
|
||||
|
@ -1888,10 +1919,6 @@ impl Flow for BlockFlow {
|
|||
CoordinateSystem::Parent)
|
||||
.translate(stacking_context_position));
|
||||
}
|
||||
|
||||
fn mutate_fragments(&mut self, mutator: &mut FragmentMutator) {
|
||||
mutator.process(&mut self.fragment)
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for BlockFlow {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue