mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Revert the addition of accept_new_box() implementations for each flow type.
This commit is contained in:
parent
34672e5b17
commit
c8a69b9d76
4 changed files with 0 additions and 36 deletions
|
@ -27,8 +27,6 @@ trait BlockLayout {
|
|||
fn bubble_widths_block(@self, ctx: &LayoutContext);
|
||||
fn assign_widths_block(@self, ctx: &LayoutContext);
|
||||
fn assign_height_block(@self, ctx: &LayoutContext);
|
||||
fn accept_new_box_block(@self, ctx: &LayoutContext, @RenderBox);
|
||||
|
||||
fn build_display_list_block(@self, a: &dl::DisplayListBuilder, b: &Rect<au>,
|
||||
c: &Point2D<au>, d: &dl::DisplayList);
|
||||
}
|
||||
|
@ -143,13 +141,6 @@ impl FlowContext : BlockLayout {
|
|||
}
|
||||
}
|
||||
|
||||
fn accept_new_box_block(@self, _ctx: &LayoutContext, box: @RenderBox) {
|
||||
assert self.starts_block_flow();
|
||||
assert self.block().box.is_none();
|
||||
|
||||
self.block().box = Some(box);
|
||||
}
|
||||
|
||||
fn build_display_list_block(@self, builder: &dl::DisplayListBuilder, dirty: &Rect<au>,
|
||||
offset: &Point2D<au>, list: &dl::DisplayList) {
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ trait FlowContextMethods {
|
|||
fn bubble_widths(@self, &LayoutContext);
|
||||
fn assign_widths(@self, &LayoutContext);
|
||||
fn assign_height(@self, &LayoutContext);
|
||||
fn accept_new_box(@self, &LayoutContext, @RenderBox);
|
||||
fn build_display_list_recurse(@self, &dl::DisplayListBuilder, dirty: &Rect<au>,
|
||||
offset: &Point2D<au>, &dl::DisplayList);
|
||||
pure fn foldl_boxes_for_node<B: Copy>(Node, +seed: B, cb: pure fn&(+a: B,@RenderBox) -> B) -> B;
|
||||
|
@ -196,15 +195,6 @@ impl FlowContext : FlowContextMethods {
|
|||
}
|
||||
}
|
||||
|
||||
fn accept_new_box(@self, ctx: &LayoutContext, box: @RenderBox) {
|
||||
match self {
|
||||
@BlockFlow(*) => self.accept_new_box_block(ctx, box),
|
||||
@InlineFlow(*) => self.accept_new_box_inline(ctx, box),
|
||||
@RootFlow(*) => self.accept_new_box_root(ctx, box),
|
||||
_ => fail fmt!("Tried to accept_new_box of flow: %?", self)
|
||||
}
|
||||
}
|
||||
|
||||
fn build_display_list_recurse(@self, builder: &dl::DisplayListBuilder, dirty: &Rect<au>,
|
||||
offset: &Point2D<au>, list: &dl::DisplayList) {
|
||||
match self {
|
||||
|
|
|
@ -190,7 +190,6 @@ trait InlineLayout {
|
|||
fn bubble_widths_inline(@self, ctx: &LayoutContext);
|
||||
fn assign_widths_inline(@self, ctx: &LayoutContext);
|
||||
fn assign_height_inline(@self, ctx: &LayoutContext);
|
||||
fn accept_new_box_inline(@self, &LayoutContext, @RenderBox);
|
||||
fn build_display_list_inline(@self, a: &dl::DisplayListBuilder, b: &Rect<au>, c: &Point2D<au>, d: &dl::DisplayList);
|
||||
}
|
||||
|
||||
|
@ -287,13 +286,6 @@ impl FlowContext : InlineLayout {
|
|||
// during inline flowing.
|
||||
}
|
||||
|
||||
fn accept_new_box_inline(@self, _ctx: &LayoutContext, box: @RenderBox) {
|
||||
assert self.starts_inline_flow();
|
||||
|
||||
self.inline().boxes.push(box);
|
||||
// TODO: use the boxlistbuilder
|
||||
}
|
||||
|
||||
fn build_display_list_inline(@self, builder: &dl::DisplayListBuilder, dirty: &Rect<au>,
|
||||
offset: &Point2D<au>, list: &dl::DisplayList) {
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@ trait RootLayout {
|
|||
fn bubble_widths_root(@self, ctx: &LayoutContext);
|
||||
fn assign_widths_root(@self, ctx: &LayoutContext);
|
||||
fn assign_height_root(@self, ctx: &LayoutContext);
|
||||
fn accept_new_box_root(@self, ctx: &LayoutContext, @RenderBox);
|
||||
|
||||
fn build_display_list_root(@self, a: &dl::DisplayListBuilder, b: &Rect<au>,
|
||||
c: &Point2D<au>, d: &dl::DisplayList);
|
||||
}
|
||||
|
@ -59,13 +57,6 @@ impl FlowContext : RootLayout {
|
|||
self.assign_height_block(ctx);
|
||||
}
|
||||
|
||||
fn accept_new_box_root(@self, _ctx: &LayoutContext, box: @RenderBox) {
|
||||
assert self.starts_root_flow();
|
||||
assert self.root().box.is_none();
|
||||
|
||||
self.root().box = Some(box);
|
||||
}
|
||||
|
||||
fn build_display_list_root(@self, builder: &dl::DisplayListBuilder, dirty: &Rect<au>,
|
||||
offset: &Point2D<au>, list: &dl::DisplayList) {
|
||||
assert self.starts_root_flow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue