mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Refactor outline-style to accept "auto" value in addition to border-style values.
Fixes https://github.com/servo/servo/issues/15207
This commit is contained in:
parent
8b9dc9392b
commit
09d4751054
11 changed files with 164 additions and 26 deletions
|
@ -1072,15 +1072,18 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
style: &ServoComputedValues,
|
||||
bounds: &Rect<Au>,
|
||||
clip: &ClippingRegion) {
|
||||
use style::values::Either;
|
||||
|
||||
let width = style.get_outline().outline_width;
|
||||
if width == Au(0) {
|
||||
return
|
||||
}
|
||||
|
||||
let outline_style = style.get_outline().outline_style;
|
||||
if outline_style == border_style::T::none {
|
||||
return
|
||||
}
|
||||
let outline_style = match style.get_outline().outline_style {
|
||||
Either::First(_auto) => border_style::T::solid,
|
||||
Either::Second(border_style::T::none) => return,
|
||||
Either::Second(border_style) => border_style
|
||||
};
|
||||
|
||||
// Outlines are not accounted for in the dimensions of the border box, so adjust the
|
||||
// absolute bounds.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue