mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Refactor BorderRadius and move it to the border modules
BorderRadius now parses itself reusing Rect<T>.
This commit is contained in:
parent
4144dc74db
commit
af3ede418b
20 changed files with 269 additions and 286 deletions
|
@ -16,7 +16,6 @@ use style::logical_geometry::{LogicalMargin, WritingMode};
|
|||
use style::properties::ServoComputedValues;
|
||||
use style::values::computed::{BorderRadiusSize, LengthOrPercentageOrAuto};
|
||||
use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrNone};
|
||||
use style::values::generics;
|
||||
|
||||
/// A collapsible margin. See CSS 2.1 § 8.3.1.
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
|
@ -476,9 +475,8 @@ pub fn specified_border_radius(
|
|||
containing_size: Size2D<Au>)
|
||||
-> Size2D<Au>
|
||||
{
|
||||
let generics::BorderRadiusSize(size) = radius;
|
||||
let w = size.width.to_used_value(containing_size.width);
|
||||
let h = size.height.to_used_value(containing_size.height);
|
||||
let w = radius.0.width.to_used_value(containing_size.width);
|
||||
let h = radius.0.height.to_used_value(containing_size.height);
|
||||
Size2D::new(w, h)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue