mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Further changes required by Servo
This commit is contained in:
parent
7b4fb5dc22
commit
0fd2f08da1
7 changed files with 34 additions and 30 deletions
|
@ -686,10 +686,10 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
fn build_border(&mut self, builder: &mut DisplayListBuilder) {
|
||||
let border = self.fragment.style.get_border();
|
||||
let widths = SideOffsets2D::new(
|
||||
border.border_top_width.px(),
|
||||
border.border_right_width.px(),
|
||||
border.border_bottom_width.px(),
|
||||
border.border_left_width.px(),
|
||||
border.border_top_width.to_f32_px(),
|
||||
border.border_right_width.to_f32_px(),
|
||||
border.border_bottom_width.to_f32_px(),
|
||||
border.border_left_width.to_f32_px(),
|
||||
);
|
||||
if widths == SideOffsets2D::zero() {
|
||||
return;
|
||||
|
@ -715,7 +715,7 @@ impl<'a> BuilderForBoxFragment<'a> {
|
|||
|
||||
fn build_outline(&mut self, builder: &mut DisplayListBuilder) {
|
||||
let outline = self.fragment.style.get_outline();
|
||||
let width = outline.outline_width.px();
|
||||
let width = outline.outline_width.to_f32_px();
|
||||
if width == 0.0 {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1052,7 +1052,8 @@ impl BoxFragment {
|
|||
containing_block: containing_block.rect,
|
||||
fragment: fragment.clone(),
|
||||
});
|
||||
if self.style.get_outline().outline_width.px() > 0.0 {
|
||||
use style::Zero;
|
||||
if !self.style.get_outline().outline_width.is_zero() {
|
||||
stacking_context
|
||||
.contents
|
||||
.push(StackingContextContent::Fragment {
|
||||
|
|
|
@ -160,8 +160,8 @@ impl FragmentTree {
|
|||
let border = style.get_border();
|
||||
Some(Rect::new(
|
||||
Point2D::new(
|
||||
border.border_left_width.px() as i32,
|
||||
border.border_top_width.px() as i32,
|
||||
border.border_left_width.to_px(),
|
||||
border.border_top_width.to_px(),
|
||||
),
|
||||
Size2D::new(
|
||||
padding_rect.size.width.px() as i32,
|
||||
|
|
|
@ -320,10 +320,10 @@ impl ComputedValuesExt for ComputedValues {
|
|||
let border = self.get_border();
|
||||
LogicalSides::from_physical(
|
||||
&PhysicalSides::new(
|
||||
border.border_top_width.0,
|
||||
border.border_right_width.0,
|
||||
border.border_bottom_width.0,
|
||||
border.border_left_width.0,
|
||||
border.border_top_width.into(),
|
||||
border.border_right_width.into(),
|
||||
border.border_bottom_width.into(),
|
||||
border.border_left_width.into(),
|
||||
),
|
||||
containing_block_writing_mode,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue