mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
parent
a9aa50683f
commit
5c408d2be9
39 changed files with 397 additions and 377 deletions
|
@ -1957,7 +1957,7 @@ impl Fragment {
|
|||
relative_containing_block_size.to_physical(relative_containing_block_mode);
|
||||
let border_box = self.border_box.to_physical(self.style.writing_mode, container_size);
|
||||
if coordinate_system == CoordinateSystem::Own && self.establishes_stacking_context() {
|
||||
return Rect(ZERO_POINT, border_box.size)
|
||||
return Rect::new(ZERO_POINT, border_box.size)
|
||||
}
|
||||
|
||||
// FIXME(pcwalton): This can double-count relative position sometimes for inlines (e.g.
|
||||
|
@ -1974,10 +1974,10 @@ impl Fragment {
|
|||
pub fn stacking_relative_content_box(&self, stacking_relative_border_box: &Rect<Au>)
|
||||
-> Rect<Au> {
|
||||
let border_padding = self.border_padding.to_physical(self.style.writing_mode);
|
||||
Rect(Point2D(stacking_relative_border_box.origin.x + border_padding.left,
|
||||
stacking_relative_border_box.origin.y + border_padding.top),
|
||||
Size2D(stacking_relative_border_box.size.width - border_padding.horizontal(),
|
||||
stacking_relative_border_box.size.height - border_padding.vertical()))
|
||||
Rect::new(Point2D::new(stacking_relative_border_box.origin.x + border_padding.left,
|
||||
stacking_relative_border_box.origin.y + border_padding.top),
|
||||
Size2D::new(stacking_relative_border_box.size.width - border_padding.horizontal(),
|
||||
stacking_relative_border_box.size.height - border_padding.vertical()))
|
||||
}
|
||||
|
||||
/// Returns true if this fragment establishes a new stacking context and false otherwise.
|
||||
|
@ -2033,7 +2033,7 @@ impl Fragment {
|
|||
|
||||
// Box shadows cause us to draw outside our border box.
|
||||
for box_shadow in self.style().get_effects().box_shadow.iter() {
|
||||
let offset = Point2D(box_shadow.offset_x, box_shadow.offset_y);
|
||||
let offset = Point2D::new(box_shadow.offset_x, box_shadow.offset_y);
|
||||
let inflation = box_shadow.spread_radius + box_shadow.blur_radius *
|
||||
BLUR_INFLATION_FACTOR;
|
||||
overflow = overflow.union(&border_box.translate(&offset).inflate(inflation, inflation))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue