Skip to content

Border width is inconsistent at device pixel ratio 1.5 #4042

Open
@SamRodri

Description

@SamRodri

In Windows 10 with display scaling set to 150%, this Webrender snippet does not render correctly:

let border_side = BorderSide {
    color: ColorF::new(1.0, 0.0, 0.0, 1.0),
    style: BorderStyle::Solid,
};
let border_widths = LayoutSideOffsets::new_all_same(1.0);
let border_details = BorderDetails::Normal(NormalBorder {
    top: border_side,
    right: border_side,
    bottom: border_side,
    left: border_side,
    radius: BorderRadius::zero(),
    do_aa: true,
});
let bounds = LayoutRect::new(LayoutPoint::new(50.0, 50.0), LayoutSize::new(50.0, 50.0));
builder.push_border(
    &CommonItemProperties::new(
        bounds,
        SpaceAndClipInfo { spatial_id, clip_id: ClipId::root(pipeline_id) },
    ),
    bounds,
    border_widths,
    border_details,
);  

border_error_webrender

Servo also shows this bug servo#27457

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions