mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Introduce CSSPixelLength and update NonNegativeLength.
First, we define computed::CSSPixelLength which contains a CSSFloat, a pixel value, and then we replace computed::Length with CSSPixelLength. Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength, FontRelativeLength, ViewportPercentageLength, CharacterWidth, and PhysicalLength is CSSPixelLength. Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
This commit is contained in:
parent
cad3aff508
commit
a949e2a057
40 changed files with 502 additions and 406 deletions
|
@ -14,7 +14,6 @@
|
|||
#![deny(unsafe_code)]
|
||||
|
||||
use ServoArc;
|
||||
use app_units::Au;
|
||||
use block::BlockFlow;
|
||||
use context::{LayoutContext, with_thread_local_font_context};
|
||||
use data::{HAS_NEWLY_CONSTRUCTED_FLOW, LayoutData};
|
||||
|
@ -1852,10 +1851,10 @@ impl ComputedValueUtils for ComputedValues {
|
|||
!padding.padding_right.is_definitely_zero() ||
|
||||
!padding.padding_bottom.is_definitely_zero() ||
|
||||
!padding.padding_left.is_definitely_zero() ||
|
||||
border.border_top_width.0 != Au(0) ||
|
||||
border.border_right_width.0 != Au(0) ||
|
||||
border.border_bottom_width.0 != Au(0) ||
|
||||
border.border_left_width.0 != Au(0)
|
||||
border.border_top_width.px() != 0. ||
|
||||
border.border_right_width.px() != 0. ||
|
||||
border.border_bottom_width.px() != 0. ||
|
||||
border.border_left_width.px() != 0.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue