mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +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:
parent
6087d2feec
commit
64a48065b0
4 changed files with 27 additions and 5 deletions
12
Tests/LibWeb/Layout/expected/misc/corner-radius.txt
Normal file
12
Tests/LibWeb/Layout/expected/misc/corner-radius.txt
Normal 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]
|
10
Tests/LibWeb/Layout/input/misc/corner-radius.html
Normal file
10
Tests/LibWeb/Layout/input/misc/corner-radius.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue