Add support for 'padding-box' value for 'box-sizing' property (fixes #6032)

Spec: http://dev.w3.org/csswg/css-ui/#valdef-box-sizing-padding-box
Currently, only Firefox is supporting this value.
This commit is contained in:
Jinwoo Song 2015-05-13 14:37:17 +09:00
parent b3b9deafa7
commit 945adabd48
6 changed files with 27 additions and 1 deletions

View file

@ -999,6 +999,10 @@ 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.
///