1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:47:45 +00:00

LibWeb: Check if corners have radius after converting to device pixels

Check needs to happen after conversion because non-zero radius in
CSSPixels could turn into zero in device pixels.

Fixes https://github.com/SerenityOS/serenity/issues/22765
This commit is contained in:
Aliaksandr Kalenik 2024-01-15 14:23:08 +01:00 committed by Andreas Kling
parent 6087d2feec
commit 64a48065b0
4 changed files with 27 additions and 5 deletions

View file

@ -0,0 +1,12 @@
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
BlockContainer <html> at (0,0) content-size 800x48 [BFC] children: not-inline
BlockContainer <body> at (8,8) content-size 1x32 children: not-inline
BlockContainer <div> at (8,8) content-size 1x32 [BFC] children: inline
frag 0 from ImageBox start: 0, length: 0, rect: [8,8 16x32] baseline: 32
ImageBox <img> at (8,8) content-size 16x32 children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x48]
PaintableWithLines (BlockContainer<BODY>) [8,8 1x32]
PaintableWithLines (BlockContainer<DIV>) [8,8 1x32] overflow: [8,8 16x32]
ImagePaintable (ImageBox<IMG>) [8,8 16x32]

View file

@ -0,0 +1,10 @@
<!doctype html><style>
body {
width: 1px;
}
div {
border-radius: 8px;
overflow: hidden;
}
/* Test passes if it renders without crashing. */
</style><body><div><img>