mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
0bf82f748f
With this change, clip rectangles for boxes with hidden overflow or the clip property are no longer calculated during the recording of painting commands. Instead, it has moved to the "pre-paint" phase, along with the assignment of scrolling offsets, and works in the following way: 1. The paintable tree is traversed to collect all paintable boxes that have hidden overflow or use the CSS clip property. For each of these boxes, the "final" clip rectangle is calculated by intersecting clip rectangles in the containing block chain for a box. 2. The paintable tree is traversed another time, and a clip rectangle is assigned for each paintable box contained by a node with hidden overflow or the clip property. This way, clipping becomes much easier during the painting commands recording phase, as it only concerns the use of already assigned clip rectangles. The same approach is applied to handle scrolling offsets. Also, clip rectangle calculation is now implemented more correctly, as we no longer stop at the stacking context boundary while intersecting clip rectangles in the containing block chain. Fixes: https://github.com/SerenityOS/serenity/issues/22932 https://github.com/SerenityOS/serenity/issues/22883 https://github.com/SerenityOS/serenity/issues/22679 https://github.com/SerenityOS/serenity/issues/22534
28 lines
541 B
HTML
28 lines
541 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="reference/overflow-hidden-4-ref.html" />
|
|
<style>
|
|
* {
|
|
outline: black solid 1px;
|
|
}
|
|
.outer {
|
|
background: pink;
|
|
width: 100px;
|
|
height: 100px;
|
|
overflow: hidden;
|
|
}
|
|
.middle {
|
|
transform: perspective(1200px);
|
|
background: orange;
|
|
}
|
|
.inner {
|
|
width: 300px;
|
|
height: 300px;
|
|
background: magenta;
|
|
overflow: hidden;
|
|
}
|
|
.red {
|
|
background: red;
|
|
width: 300px;
|
|
height: 300px;
|
|
}
|
|
</style><body><div class="outer"><div class="middle"><div class="inner"><div class="red">
|