mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #6258 - SimonSapin:drop-box-sizing-padding-box, r=jdm
This reverts commit 945adab
/ PR #6033.
The CSS Working Group resolved to drop this value from the spec:
http://log.csswg.org/irc.w3.org/css/2015-05-20/#e555680
The group was unable to come up with even a theoretical use case. Gecko only implemented this value for completeness. Other browsers vendors have clearly expressed they have no interest in implementing this.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6258)
<!-- Reviewable:end -->
This commit is contained in:
commit
300c36f250
7 changed files with 2 additions and 28 deletions
|
@ -347,10 +347,8 @@ impl CandidateBSizeIterator {
|
|||
};
|
||||
|
||||
// If the style includes `box-sizing: border-box`, subtract the border and padding.
|
||||
// If the style includes `box-sizing: padding-box`, subtract the border.
|
||||
let adjustment_for_box_sizing = match fragment.style.get_box().box_sizing {
|
||||
box_sizing::T::border_box => fragment.border_padding.block_start_end(),
|
||||
box_sizing::T::padding_box => fragment.padding_width().block_start_end(),
|
||||
box_sizing::T::content_box => Au(0),
|
||||
};
|
||||
|
||||
|
@ -2060,12 +2058,7 @@ pub trait ISizeAndMarginsComputer {
|
|||
computed_inline_size =
|
||||
MaybeAuto::Specified(size - block.fragment.border_padding.inline_start_end())
|
||||
}
|
||||
(MaybeAuto::Specified(size), box_sizing::T::padding_box) => {
|
||||
computed_inline_size =
|
||||
MaybeAuto::Specified(size - block.fragment.padding_width().inline_start_end())
|
||||
}
|
||||
(MaybeAuto::Auto, box_sizing::T::border_box) |
|
||||
(MaybeAuto::Auto, box_sizing::T::padding_box) |
|
||||
(_, box_sizing::T::content_box) => {}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ fn create_or_get_local_context(shared_layout_context: &SharedLayoutContext)
|
|||
applicable_declarations_cache: ApplicableDeclarationsCache::new(),
|
||||
style_sharing_candidate_cache: StyleSharingCandidateCache::new(),
|
||||
};
|
||||
r.set(unsafe { boxed::into_raw(context) });
|
||||
r.set(boxed::into_raw(context));
|
||||
} else if shared_layout_context.screen_size_changed {
|
||||
unsafe {
|
||||
(*r.get()).applicable_declarations_cache.evict_all();
|
||||
|
|
|
@ -1029,10 +1029,6 @@ impl Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn padding_width(&self) -> LogicalMargin<Au> {
|
||||
self.border_padding - self.border_width()
|
||||
}
|
||||
|
||||
/// Computes the margins in the inline direction from the containing block inline-size and the
|
||||
/// style. After this call, the inline direction of the `margin` field will be correct.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue