mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Move some CSS properties from Box to Position
This commit is contained in:
parent
281e385ab2
commit
aae8919da4
5 changed files with 31 additions and 27 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue