mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
parent
0523032afe
commit
f8f17cf475
1 changed files with 3 additions and 2 deletions
|
@ -72,6 +72,7 @@ pub struct Box {
|
|||
style: Arc<ComputedValues>,
|
||||
|
||||
/// The position of this box relative to its owning flow.
|
||||
/// The size includes padding and border, but not margin.
|
||||
position: RefCell<Rect<Au>>,
|
||||
|
||||
/// The border of the content box.
|
||||
|
@ -308,7 +309,7 @@ pub struct InlineParentInfo {
|
|||
macro_rules! def_noncontent( ($side:ident, $get:ident, $inline_get:ident) => (
|
||||
impl Box {
|
||||
pub fn $get(&self) -> Au {
|
||||
self.margin.get().$side + self.border.get().$side + self.padding.get().$side
|
||||
self.border.get().$side + self.padding.get().$side
|
||||
}
|
||||
|
||||
pub fn $inline_get(&self) -> Au {
|
||||
|
@ -317,7 +318,7 @@ macro_rules! def_noncontent( ($side:ident, $get:ident, $inline_get:ident) => (
|
|||
match info.get() {
|
||||
&Some(ref info) => {
|
||||
for info in info.parent_info.iter() {
|
||||
val = val + info.margin.$side + info.border.$side + info.padding.$side;
|
||||
val = val + info.border.$side + info.padding.$side;
|
||||
}
|
||||
},
|
||||
&None => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue