mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
This commit is contained in:
parent
37cd870a9e
commit
af879523ea
60 changed files with 921 additions and 836 deletions
|
@ -68,7 +68,7 @@ impl TableFlow {
|
|||
pub fn from_fragment(fragment: Fragment) -> TableFlow {
|
||||
let mut block_flow = BlockFlow::from_fragment(fragment);
|
||||
let table_layout =
|
||||
if block_flow.fragment().style().get_table().table_layout == table_layout::T::fixed {
|
||||
if block_flow.fragment().style().get_table().table_layout == table_layout::T::Fixed {
|
||||
TableLayout::Fixed
|
||||
} else {
|
||||
TableLayout::Auto
|
||||
|
@ -192,8 +192,8 @@ impl TableFlow {
|
|||
pub fn spacing(&self) -> border_spacing::T {
|
||||
let style = self.block_flow.fragment.style();
|
||||
match style.get_inheritedtable().border_collapse {
|
||||
border_collapse::T::separate => style.get_inheritedtable().border_spacing,
|
||||
border_collapse::T::collapse => border_spacing::T::zero(),
|
||||
border_collapse::T::Separate => style.get_inheritedtable().border_spacing,
|
||||
border_collapse::T::Collapse => border_spacing::T::zero(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ impl Flow for TableFlow {
|
|||
.fragment
|
||||
.style
|
||||
.get_inheritedtable()
|
||||
.border_collapse == border_collapse::T::collapse;
|
||||
.border_collapse == border_collapse::T::Collapse;
|
||||
let table_inline_collapsed_borders = if collapsing_borders {
|
||||
Some(TableInlineCollapsedBorders {
|
||||
start: CollapsedBorder::inline_start(&*self.block_flow.fragment.style,
|
||||
|
@ -495,8 +495,8 @@ impl Flow for TableFlow {
|
|||
.style
|
||||
.get_inheritedtable()
|
||||
.border_collapse {
|
||||
border_collapse::T::separate => BorderPaintingMode::Separate,
|
||||
border_collapse::T::collapse => BorderPaintingMode::Hidden,
|
||||
border_collapse::T::Separate => BorderPaintingMode::Separate,
|
||||
border_collapse::T::Collapse => BorderPaintingMode::Hidden,
|
||||
};
|
||||
|
||||
self.block_flow.build_display_list_for_block(state, border_painting_mode);
|
||||
|
@ -733,7 +733,7 @@ pub trait TableLikeFlow {
|
|||
impl TableLikeFlow for BlockFlow {
|
||||
fn assign_block_size_for_table_like_flow(&mut self, block_direction_spacing: Au) {
|
||||
debug_assert!(self.fragment.style.get_inheritedtable().border_collapse ==
|
||||
border_collapse::T::separate || block_direction_spacing == Au(0));
|
||||
border_collapse::T::Separate || block_direction_spacing == Au(0));
|
||||
|
||||
if self.base.restyle_damage.contains(ServoRestyleDamage::REFLOW) {
|
||||
// Our current border-box position.
|
||||
|
@ -750,8 +750,8 @@ impl TableLikeFlow for BlockFlow {
|
|||
let child_table_row = kid.as_table_row();
|
||||
current_block_offset = current_block_offset +
|
||||
match self.fragment.style.get_inheritedtable().border_collapse {
|
||||
border_collapse::T::separate => block_direction_spacing,
|
||||
border_collapse::T::collapse => {
|
||||
border_collapse::T::Separate => block_direction_spacing,
|
||||
border_collapse::T::Collapse => {
|
||||
child_table_row.collapsed_border_spacing.block_start
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue