1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

LibWeb: Apply "clip" property in apply_clip_overflow_rect()

Fixes bug when "clip" property does not affect abspos children.
This change makes "clip" property to be applied together with
"overflow: hidden" in `apply_clip_overflow_rect()` that already
handles abspos children correctly.
This commit is contained in:
Aliaksandr Kalenik 2023-08-23 13:58:30 +02:00 committed by Andreas Kling
parent 5896c0ed06
commit d06d4eb388
4 changed files with 40 additions and 11 deletions

View file

@ -0,0 +1,11 @@
<!DOCTYPE html><style type="text/css">
* {
border: 1px solid black;
}
.outer {
position: absolute;
}
.inner {
position: absolute;
}
</style><div class="outer"><div class="inner">

View file

@ -0,0 +1,17 @@
<!DOCTYPE html><style type="text/css">
* {
border: 1px solid black;
}
.outer {
position: absolute;
clip: rect(0px, auto, auto, 0px);
}
.inner {
position: absolute;
}
svg {
width: 100px;
height: 100px;
fill: red;
}
</style><div class="outer"><div class="inner"><svg viewBox="0 0 1 1"><rect x=0 y=0 width=1 height=1></rect><svg>

View file

@ -1,4 +1,5 @@
{
"clip-abspos-children.html": "clip-abspos-children-ref.html",
"item-with-negative-z-index.html": "item-with-negative-z-index-ref.html",
"img-srcset-viewport-relative-sizes.html": "img-srcset-viewport-relative-sizes-ref.html",
"grid-items-painting-order.html": "grid-items-painting-order-ref.html",