Skip to content
Permalink
Browse files

Remove ListItemFlowDisplayListBuilding

  • Loading branch information...
nox committed Jan 14, 2019
1 parent 7d57c9b commit f75578cbf10fb7f0484ef2391238565c59df5fb7
Showing with 23 additions and 33 deletions.
  1. +0 −29 components/layout/display_list/builder.rs
  2. +0 −1 components/layout/display_list/mod.rs
  3. +23 −3 components/layout/list_item.rs
@@ -28,7 +28,6 @@ use crate::flow_ref::FlowRef;
use crate::fragment::SpecificFragmentInfo;
use crate::fragment::{CanvasFragmentSource, CoordinateSystem, Fragment, ScannedTextFragmentInfo};
use crate::inline::InlineFragmentNodeFlags;
use crate::list_item::ListItemFlow;
use crate::model::MaybeAuto;
use crate::table_cell::CollapsedBordersForCell;
use app_units::{Au, AU_PER_PX};
@@ -2804,34 +2803,6 @@ impl BlockFlow {
}
}

pub trait ListItemFlowDisplayListBuilding {
fn build_display_list_for_list_item(&mut self, state: &mut DisplayListBuildState);
}

impl ListItemFlowDisplayListBuilding for ListItemFlow {
fn build_display_list_for_list_item(&mut self, state: &mut DisplayListBuildState) {
// Draw the marker, if applicable.
for marker in &mut self.marker_fragments {
let stacking_relative_border_box = self
.block_flow
.base
.stacking_relative_border_box_for_display_list(marker);
marker.build_display_list(
state,
stacking_relative_border_box,
BorderPaintingMode::Separate,
DisplayListSection::Content,
self.block_flow.base.clip,
None,
);
}

// Draw the rest of the block.
self.block_flow
.build_display_list_for_block(state, BorderPaintingMode::Separate)
}
}

pub trait FlexFlowDisplayListBuilding {
fn build_display_list_for_flex(&mut self, state: &mut DisplayListBuildState);
}
@@ -6,7 +6,6 @@ pub use self::builder::BorderPaintingMode;
pub use self::builder::DisplayListBuildState;
pub use self::builder::FlexFlowDisplayListBuilding;
pub use self::builder::IndexableText;
pub use self::builder::ListItemFlowDisplayListBuilding;
pub use self::builder::StackingContextCollectionFlags;
pub use self::builder::StackingContextCollectionState;
pub use self::conversions::ToLayout;
@@ -7,8 +7,10 @@

use crate::block::BlockFlow;
use crate::context::{with_thread_local_font_context, LayoutContext};
use crate::display_list::StackingContextCollectionState;
use crate::display_list::{DisplayListBuildState, ListItemFlowDisplayListBuilding};
use crate::display_list::items::DisplayListSection;
use crate::display_list::{
BorderPaintingMode, DisplayListBuildState, StackingContextCollectionState,
};
use crate::floats::FloatKind;
use crate::flow::{Flow, FlowClass, OpaqueFlow};
use crate::fragment::Overflow;
@@ -189,7 +191,25 @@ impl Flow for ListItemFlow {
}

fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
self.build_display_list_for_list_item(state);
// Draw the marker, if applicable.
for marker in &mut self.marker_fragments {
let stacking_relative_border_box = self
.block_flow
.base
.stacking_relative_border_box_for_display_list(marker);
marker.build_display_list(
state,
stacking_relative_border_box,
BorderPaintingMode::Separate,
DisplayListSection::Content,
self.block_flow.base.clip,
None,
);
}

// Draw the rest of the block.
self.block_flow
.build_display_list_for_block(state, BorderPaintingMode::Separate)
}

fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {

0 comments on commit f75578c

Please sign in to comment.
You can’t perform that action at this time.