Auto merge of #10999 - heycam:move-width-height, r=SimonSapin

Move width and height from Box to Position.

This helps with style struct alignment between Servo and Gecko.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10999)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-05-04 19:52:25 -07:00
commit 8bc4785bed
7 changed files with 25 additions and 25 deletions

View file

@ -1695,7 +1695,7 @@ impl Flow for BlockFlow {
fn bubble_inline_sizes(&mut self) {
// If this block has a fixed width, just use that for the minimum and preferred width,
// rather than bubbling up children inline width.
let consult_children = match self.fragment.style().get_box().width {
let consult_children = match self.fragment.style().get_position().width {
LengthOrPercentageOrAuto::Length(_) => false,
_ => true,
};

View file

@ -125,7 +125,7 @@ impl FlexFlow {
// Currently, this is the core of BlockFlow::bubble_inline_sizes() with all float logic
// stripped out, and max replaced with union_nonbreaking_inline.
fn inline_mode_bubble_inline_sizes(&mut self) {
let fixed_width = match self.block_flow.fragment.style().get_box().width {
let fixed_width = match self.block_flow.fragment.style().get_position().width {
LengthOrPercentageOrAuto::Length(_) => true,
_ => false,
};
@ -151,7 +151,7 @@ impl FlexFlow {
// Currently, this is the core of BlockFlow::bubble_inline_sizes() with all float logic
// stripped out.
fn block_mode_bubble_inline_sizes(&mut self) {
let fixed_width = match self.block_flow.fragment.style().get_box().width {
let fixed_width = match self.block_flow.fragment.style().get_position().width {
LengthOrPercentageOrAuto::Length(_) => true,
_ => false,
};
@ -398,9 +398,9 @@ impl Flow for FlexFlow {
let (available_block_size, available_inline_size) = {
let style = &self.block_flow.fragment.style;
let (specified_block_size, specified_inline_size) = if style.writing_mode.is_vertical() {
(style.get_box().width, style.get_box().height)
(style.get_position().width, style.get_position().height)
} else {
(style.get_box().height, style.get_box().width)
(style.get_position().height, style.get_position().width)
};
let available_inline_size = AxisSize::new(specified_inline_size,

View file

@ -211,7 +211,7 @@ pub fn compute_damage(old: Option<&Arc<ServoComputedValues>>, new: &ServoCompute
get_margin.margin_bottom, get_margin.margin_left,
get_padding.padding_top, get_padding.padding_right,
get_padding.padding_bottom, get_padding.padding_left,
get_box.width, get_box.height,
get_position.width, get_position.height,
get_inheritedtext.line_height,
get_inheritedtext.text_align, get_inheritedtext.text_indent,
get_table.table_layout,