Move some CSS properties from Box to Position

This commit is contained in:
Mauricio Collares 2016-04-04 23:37:31 -03:00
parent 281e385ab2
commit aae8919da4
5 changed files with 31 additions and 27 deletions

View file

@ -359,7 +359,7 @@ impl CandidateBSizeIterator {
};
// If the style includes `box-sizing: border-box`, subtract the border and padding.
let adjustment_for_box_sizing = match fragment.style.get_box().box_sizing {
let adjustment_for_box_sizing = match fragment.style.get_position().box_sizing {
box_sizing::T::border_box => fragment.border_padding.block_start_end(),
box_sizing::T::content_box => Au(0),
};
@ -1308,7 +1308,7 @@ impl BlockFlow {
let opaque_self = OpaqueFlow::from_flow(self);
// Calculate non-auto block size to pass to children.
let box_border = match self.fragment.style().get_box().box_sizing {
let box_border = match self.fragment.style().get_position().box_sizing {
box_sizing::T::border_box => self.fragment.border_padding.block_start_end(),
box_sizing::T::content_box => Au(0),
};
@ -2189,7 +2189,7 @@ pub trait ISizeAndMarginsComputer {
parent_flow_inline_size,
layout_context);
let style = block.fragment.style();
match (computed_inline_size, style.get_box().box_sizing) {
match (computed_inline_size, style.get_position().box_sizing) {
(MaybeAuto::Specified(size), box_sizing::T::border_box) => {
computed_inline_size =
MaybeAuto::Specified(size - block.fragment.border_padding.inline_start_end())