1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00
serenity/Tests/LibWeb/Ref/reference
Aliaksandr Kalenik 0bf82f748f LibWeb: Move clip rect calculation to happen before painting
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
2024-01-28 08:25:28 +01:00
..
images LibWeb: Make use of transform-box when calculating transforms 2024-01-27 07:46:37 +01:00
abspos-escapes-scroll-container-ref.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
abspos-z-index-painting-order-ref.html LibWeb: Do not require box to be positioned to create stacking context 2024-01-02 21:45:05 +01:00
anonymous-wrapper-css-visibility-ref.html LibWeb: Remove Layout::Node::m_visible and compute it on the fly 2023-09-18 14:45:20 +02:00
background-size-calc-ref.html LibWeb: Allow calculated values for background-size dimensions 2023-09-15 08:40:10 +02:00
body-link-attribute-ref.html LibWeb: Respect the document's link_color for Linktext identifiers 2023-11-21 16:54:02 +01:00
border-radius-ref.html Tests/LibWeb: Add border-radius ref test 2023-10-21 23:16:17 +02:00
border-radius-shrink-zero-sized-box-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
border-radius-with-padding-ref.html LibWeb: Take padding into account when resolving border radii 2024-01-07 19:28:38 +01:00
calc-border-radius-ref.html LibWeb/CSS: Fix crashing when calc() is used for border-radius 2024-01-01 10:12:20 +01:00
canvas-fillstyle-rgb.html Tests/LibWeb: Test canvas fillStyle parsing of rgb strings 2023-11-24 08:42:18 +01:00
canvas-path-rect-ref.html LibWeb: Add canvas context2d roundRect 2023-10-20 07:20:29 +02:00
clip-abspos-children-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
clip-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-any-link-selector-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-attr-typed-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-background-position-ref.html LibWeb: Add tests for background-position 2023-12-05 09:55:16 +01:00
css-background-repeat-ref.html LibWeb: Add ref test for background-repeat 2023-11-18 15:08:21 +00:00
css-backgrounds-ref.html LibWeb: Add ref test for general CSS background properties 2023-11-18 15:08:21 +00:00
css-gradient-currentcolor-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-gradients-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-invalid-var-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-lang-selector-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-local-link-selector-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-open-closed-selectors-ref.html LibWeb: Implement the :open and :closed pseudo-classes 2023-09-13 19:55:22 +02:00
css-placeholder-shown-selector-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-quotes-ref.html LibWeb: Support quotes in content values 2023-09-17 15:45:52 -06:00
css-read-only-read-write-selectors-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-transform-box-ref.html LibWeb: Make use of transform-box when calculating transforms 2024-01-27 07:46:37 +01:00
first-available-font-should-include-whitespace-ref.html LibWeb: Find font that has whitespace glyph in first_available_font() 2024-01-22 14:14:59 +01:00
grid-items-painting-order-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
img-srcset-viewport-relative-sizes-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
inline-node-ref.html Tests/LibWeb: Add ref test for inline node styles 2023-12-07 10:52:47 +01:00
inline-stacking-context-ref.html LibWeb: Allow inline nodes to establish a stacking context 2024-01-05 19:36:55 +01:00
input-placeholder-ref.html LibWeb: Hide input placeholder when input already has a value 2023-12-10 20:56:19 +01:00
item-with-negative-z-index-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
meter-ref.html LibWeb: Add basic HTML meter element support 2023-12-04 19:54:43 +00:00
object-fit-position-ref.html Tests/LibWeb: Add object-{fit,position} test 2023-10-31 07:03:05 +01:00
opacity-stacking-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
outer-box-shadow-ref.html Tests/LibWeb: Add outer box-shadow ref test 2023-10-22 18:38:22 +02:00
overflow-hidden-2-ref.html Tests/LibWeb: Add ref-tests for "overflow: hidden" 2023-12-21 19:25:31 +01:00
overflow-hidden-3-ref.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-4-ref.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-5-ref.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-ref.html Tests/LibWeb: Add ref-tests for "overflow: hidden" 2023-12-21 19:25:31 +01:00
positioned-elements-in-scroll-container-ref.html LibWeb: Use offset of nearest scrollable ancestor for positioned boxes 2023-12-11 20:37:05 +01:00
scrollable-box-with-nested-stacking-context-ref.html LibWeb: Apply scroll boxes offsets after painting commands recording 2023-12-30 11:10:24 +01:00
separate-borders-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
simple-svg-mask-ref.html LibWeb: Store computed SVG path data/transforms in LayoutState 2023-10-30 19:44:54 +01:00
space-glyph-width-ref.html LibGfx: Take into account unicode ranges to find font for space glyph 2024-01-08 01:00:24 +01:00
square-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-axis-aligned-lines-ref.html LibWeb: Fix drawing axis-aligned lines 2024-01-09 00:03:09 +01:00
svg-background-no-natural-size-ref.html Tests/LibWeb: Add ref test for SVG background without natural size 2023-12-30 23:23:19 +01:00
svg-file-matches-html-file.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-gradient-spreadMethod-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-radialGradient-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-stroke-paintstyle-with-opacity-ref.html LibWeb: Fix stroke-opacity for stroked paths that use PaintStyles 2023-10-28 19:06:12 +02:00
svg-symbol-ref.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-text-effects-ref.html LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
svg-textPath-ref.html Tests/LibWeb: Add ref test for SVG <textPath>s 2023-12-19 21:29:03 +01:00
svg-use-defined-earlier.html LibWeb: Ensure DocumentObserver document_completely_loaded() is called 2023-12-26 21:37:04 +01:00
text-decorations-ref.html LibWeb: Use PaintableFragment::baseline() in paint_text_decoration() 2024-01-26 07:36:40 +01:00
text-div.html LibWeb/Tests: Rename css-attr-ref.html reference to text-div.html 2023-12-11 16:54:59 +01:00
text-shadow-ref.html Tests/LibWeb: Add ref test for text-shadow 2023-10-26 08:38:16 +02:00
transform-2d-translate-ref.html LibWeb: Resolve CSS transform lengths against padding rect 2024-01-16 21:54:10 +01:00
transform-calc-length-percentage-ref.html LibWeb/CSS: Improve parsing of length percentage values for transforms 2024-01-09 14:15:05 +01:00
unicode-range-ref.html LibGfx+LibWeb: Update for_each_glyph_position to use font cascade list 2023-12-10 17:32:04 +01:00