mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Generate display lists for table cells during display list generation for their table parent
This commit is contained in:
parent
6232846699
commit
db6ec58e6b
5 changed files with 83 additions and 38 deletions
|
@ -9,9 +9,8 @@
|
|||
use app_units::Au;
|
||||
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
||||
use context::LayoutContext;
|
||||
use display_list::{BlockFlowDisplayListBuilding, BorderPaintingMode};
|
||||
use display_list::{DisplayListBuildState, StackingContextCollectionFlags};
|
||||
use display_list::StackingContextCollectionState;
|
||||
use display_list::{BlockFlowDisplayListBuilding, DisplayListBuildState};
|
||||
use display_list::{StackingContextCollectionFlags, StackingContextCollectionState};
|
||||
use euclid::{Point2D, Rect, SideOffsets2D, Size2D};
|
||||
use flow::{Flow, FlowClass, FlowFlags, GetBaseFlow, OpaqueFlow};
|
||||
use fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
|
@ -20,7 +19,6 @@ use layout_debug;
|
|||
use model::MaybeAuto;
|
||||
use script_layout_interface::wrapper_traits::ThreadSafeLayoutNode;
|
||||
use std::fmt;
|
||||
use style::computed_values::border_collapse::T as BorderCollapse;
|
||||
use style::logical_geometry::{LogicalMargin, LogicalRect, LogicalSize, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::Color;
|
||||
|
@ -248,21 +246,9 @@ impl Flow for TableCellFlow {
|
|||
self.block_flow.update_late_computed_block_position_if_necessary(block_position)
|
||||
}
|
||||
|
||||
fn build_display_list(&mut self, state: &mut DisplayListBuildState) {
|
||||
if !self.visible {
|
||||
return
|
||||
}
|
||||
|
||||
let border_painting_mode = match self.block_flow
|
||||
.fragment
|
||||
.style
|
||||
.get_inheritedtable()
|
||||
.border_collapse {
|
||||
BorderCollapse::Separate => BorderPaintingMode::Separate,
|
||||
BorderCollapse::Collapse => BorderPaintingMode::Collapse(&self.collapsed_borders),
|
||||
};
|
||||
|
||||
self.block_flow.build_display_list_for_block(state, border_painting_mode)
|
||||
fn build_display_list(&mut self, _: &mut DisplayListBuildState) {
|
||||
// This is handled by TableCellStyleInfo::build_display_list()
|
||||
// when the containing table builds its display list
|
||||
}
|
||||
|
||||
fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue