mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: Fix servo build.
This commit is contained in:
parent
a65925cb85
commit
0c01325c05
4 changed files with 26 additions and 23 deletions
|
@ -58,7 +58,7 @@ use style::properties::{style_structs, ComputedValues};
|
|||
use style::servo::restyle_damage::ServoRestyleDamage;
|
||||
use style::values::computed::effects::SimpleShadow;
|
||||
use style::values::computed::image::Image as ComputedImage;
|
||||
use style::values::computed::Gradient;
|
||||
use style::values::computed::{Gradient, LengthOrAuto};
|
||||
use style::values::generics::background::BackgroundSize;
|
||||
use style::values::generics::image::{GradientKind, Image, PaintWorklet};
|
||||
use style::values::specified::ui::CursorKind;
|
||||
|
@ -2627,19 +2627,22 @@ impl BlockFlow {
|
|||
_ => return,
|
||||
}
|
||||
|
||||
fn extract_clip_component(p: &LengthOrAuto) -> Option<Au> {
|
||||
match *p {
|
||||
LengthOrAuto::Auto => None,
|
||||
LengthOrAuto::LengthPercentage(ref length) => Some(Au::from(*length)),
|
||||
}
|
||||
}
|
||||
|
||||
let clip_origin = Point2D::new(
|
||||
stacking_relative_border_box.origin.x +
|
||||
style_clip_rect.left.map(Au::from).unwrap_or(Au(0)),
|
||||
extract_clip_component(&style_clip_rect.left).unwrap_or_default(),
|
||||
stacking_relative_border_box.origin.y +
|
||||
style_clip_rect.top.map(Au::from).unwrap_or(Au(0)),
|
||||
extract_clip_component(&style_clip_rect.top).unwrap_or_default(),
|
||||
);
|
||||
let right = style_clip_rect
|
||||
.right
|
||||
.map(Au::from)
|
||||
let right = extract_clip_component(&style_clip_rect.right)
|
||||
.unwrap_or(stacking_relative_border_box.size.width);
|
||||
let bottom = style_clip_rect
|
||||
.bottom
|
||||
.map(Au::from)
|
||||
let bottom = extract_clip_component(&style_clip_rect.bottom)
|
||||
.unwrap_or(stacking_relative_border_box.size.height);
|
||||
let clip_size = Size2D::new(right - clip_origin.x, bottom - clip_origin.y);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue