mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Make text-shadow and box-shadow use SimpleShadow
This commit is contained in:
parent
65ff4a399c
commit
201d7e79e7
14 changed files with 414 additions and 434 deletions
|
@ -2551,9 +2551,8 @@ impl Fragment {
|
|||
|
||||
// Box shadows cause us to draw outside our border box.
|
||||
for box_shadow in &self.style().get_effects().box_shadow.0 {
|
||||
let offset = Vector2D::new(box_shadow.offset_x, box_shadow.offset_y);
|
||||
let inflation = box_shadow.spread_radius + box_shadow.blur_radius *
|
||||
BLUR_INFLATION_FACTOR;
|
||||
let offset = Vector2D::new(box_shadow.base.horizontal, box_shadow.base.vertical);
|
||||
let inflation = box_shadow.spread + box_shadow.base.blur * BLUR_INFLATION_FACTOR;
|
||||
overflow.paint = overflow.paint.union(&border_box.translate(&offset)
|
||||
.inflate(inflation, inflation))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue