mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
This commit is contained in:
parent
b8900782b0
commit
466faac2a5
223 changed files with 4414 additions and 4105 deletions
|
@ -6,18 +6,18 @@
|
|||
|
||||
#![deny(unsafe_blocks)]
|
||||
|
||||
use block::{BlockFlow, MarginsMayNotCollapse, ISizeAndMarginsComputer};
|
||||
use block::{BlockFlow, ISizeAndMarginsComputer, MarginsMayCollapseFlag};
|
||||
use block::{ISizeConstraintInput, ISizeConstraintSolution};
|
||||
use construct::FlowConstructor;
|
||||
use context::LayoutContext;
|
||||
use floats::FloatKind;
|
||||
use flow::{mod, Flow, FlowClass, IMPACTED_BY_LEFT_FLOATS, IMPACTED_BY_RIGHT_FLOATS};
|
||||
use flow::{ImmutableFlowUtils, TableFlowClass};
|
||||
use flow::ImmutableFlowUtils;
|
||||
use fragment::{Fragment, FragmentBoundsIterator};
|
||||
use layout_debug;
|
||||
use model::{IntrinsicISizes, IntrinsicISizesContribution};
|
||||
use table_row::CellIntrinsicInlineSize;
|
||||
use table_wrapper::{TableLayout, FixedLayout, AutoLayout};
|
||||
use table_wrapper::TableLayout;
|
||||
use wrapper::ThreadSafeLayoutNode;
|
||||
|
||||
use servo_util::geometry::Au;
|
||||
|
@ -25,7 +25,7 @@ use servo_util::logical_geometry::LogicalRect;
|
|||
use std::cmp::max;
|
||||
use std::fmt;
|
||||
use style::{ComputedValues, CSSFloat};
|
||||
use style::computed_values::{LPA_Auto, LPA_Length, LPA_Percentage, table_layout};
|
||||
use style::computed_values::{LengthOrPercentageOrAuto, table_layout};
|
||||
use sync::Arc;
|
||||
|
||||
/// A table flow corresponded to the table's internal table fragment under a table wrapper flow.
|
||||
|
@ -54,9 +54,9 @@ impl TableFlow {
|
|||
let mut block_flow = BlockFlow::from_node_and_fragment(node, fragment);
|
||||
let table_layout = if block_flow.fragment().style().get_table().table_layout ==
|
||||
table_layout::fixed {
|
||||
FixedLayout
|
||||
TableLayout::Fixed
|
||||
} else {
|
||||
AutoLayout
|
||||
TableLayout::Auto
|
||||
};
|
||||
TableFlow {
|
||||
block_flow: block_flow,
|
||||
|
@ -72,9 +72,9 @@ impl TableFlow {
|
|||
let mut block_flow = BlockFlow::from_node(constructor, node);
|
||||
let table_layout = if block_flow.fragment().style().get_table().table_layout ==
|
||||
table_layout::fixed {
|
||||
FixedLayout
|
||||
TableLayout::Fixed
|
||||
} else {
|
||||
AutoLayout
|
||||
TableLayout::Auto
|
||||
};
|
||||
TableFlow {
|
||||
block_flow: block_flow,
|
||||
|
@ -91,9 +91,9 @@ impl TableFlow {
|
|||
let mut block_flow = BlockFlow::float_from_node(constructor, node, float_kind);
|
||||
let table_layout = if block_flow.fragment().style().get_table().table_layout ==
|
||||
table_layout::fixed {
|
||||
FixedLayout
|
||||
TableLayout::Fixed
|
||||
} else {
|
||||
AutoLayout
|
||||
TableLayout::Auto
|
||||
};
|
||||
TableFlow {
|
||||
block_flow: block_flow,
|
||||
|
@ -164,7 +164,7 @@ impl TableFlow {
|
|||
/// methods
|
||||
#[inline(always)]
|
||||
fn assign_block_size_table_base<'a>(&mut self, layout_context: &'a LayoutContext<'a>) {
|
||||
self.block_flow.assign_block_size_block_base(layout_context, MarginsMayNotCollapse);
|
||||
self.block_flow.assign_block_size_block_base(layout_context, MarginsMayCollapseFlag::MarginsMayNotCollapse);
|
||||
}
|
||||
|
||||
/// Updates the minimum and preferred inline-size calculation for a single row. This is
|
||||
|
@ -181,7 +181,7 @@ impl TableFlow {
|
|||
debug_assert!(child.is_table_row());
|
||||
let row = child.as_table_row();
|
||||
match table_layout {
|
||||
FixedLayout => {
|
||||
TableLayout::Fixed => {
|
||||
// Fixed table layout only looks at the first row.
|
||||
//
|
||||
// FIXME(pcwalton): This is really inefficient. We should stop after the first row!
|
||||
|
@ -192,7 +192,7 @@ impl TableFlow {
|
|||
}
|
||||
}
|
||||
}
|
||||
AutoLayout => {
|
||||
TableLayout::Auto => {
|
||||
computation.union_block(&TableFlow::update_automatic_column_inline_sizes(
|
||||
column_inline_sizes,
|
||||
row.cell_intrinsic_inline_sizes.as_slice()))
|
||||
|
@ -203,7 +203,7 @@ impl TableFlow {
|
|||
|
||||
impl Flow for TableFlow {
|
||||
fn class(&self) -> FlowClass {
|
||||
TableFlowClass
|
||||
FlowClass::Table
|
||||
}
|
||||
|
||||
fn as_table<'a>(&'a mut self) -> &'a mut TableFlow {
|
||||
|
@ -242,12 +242,12 @@ impl Flow for TableFlow {
|
|||
for specified_inline_size in kid.as_table_colgroup().inline_sizes.iter() {
|
||||
self.column_intrinsic_inline_sizes.push(ColumnIntrinsicInlineSize {
|
||||
minimum_length: match *specified_inline_size {
|
||||
LPA_Auto | LPA_Percentage(_) => Au(0),
|
||||
LPA_Length(length) => length,
|
||||
LengthOrPercentageOrAuto::Auto | LengthOrPercentageOrAuto::Percentage(_) => Au(0),
|
||||
LengthOrPercentageOrAuto::Length(length) => length,
|
||||
},
|
||||
percentage: match *specified_inline_size {
|
||||
LPA_Auto | LPA_Length(_) => 0.0,
|
||||
LPA_Percentage(percentage) => percentage,
|
||||
LengthOrPercentageOrAuto::Auto | LengthOrPercentageOrAuto::Length(_) => 0.0,
|
||||
LengthOrPercentageOrAuto::Percentage(percentage) => percentage,
|
||||
},
|
||||
preferred: Au(0),
|
||||
constrained: false,
|
||||
|
@ -308,7 +308,7 @@ impl Flow for TableFlow {
|
|||
self.block_flow.fragment.border_box.size.inline - padding_and_borders;
|
||||
|
||||
match self.table_layout {
|
||||
FixedLayout => {
|
||||
TableLayout::Fixed => {
|
||||
// In fixed table layout, we distribute extra space among the unspecified columns
|
||||
// if there are any, or among all the columns if all are specified.
|
||||
self.column_computed_inline_sizes.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue