ladybird/Tests/LibWeb/Ref
Zac Brannelly 9165faca5e LibWeb: Support CSS property background-clip: text
From https://drafts.csswg.org/css-backgrounds-4/#background-clip
"The background is painted within (clipped to) the intersection of the
border box and the geometry of the text in the element and its in-flow
and floated descendants"

This change implements it in the following way:
1. Traverse the descendants of the element, collecting the Gfx::Path of
   glyphs into a vector.
2. The vector of collected paths is saved in the background painting
   command.
3. The painting commands executor uses the list of glyphs to paint a
   mask for background clipping.

Co-authored-by: Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
2024-03-03 15:33:12 +01:00
..
assets Tests/LibWeb: Add ref test for SVG background without natural size 2023-12-30 23:23:19 +01:00
reference LibWeb: Support CSS property background-clip: text 2024-03-03 15:33:12 +01:00
abspos-escapes-scroll-container.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
abspos-z-index-painting-order.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.html LibWeb: Remove Layout::Node::m_visible and compute it on the fly 2023-09-18 14:45:20 +02:00
background-size-calc.html LibWeb: Allow calculated values for background-size dimensions 2023-09-15 08:40:10 +02:00
body-link-attribute.html LibWeb: Respect the document's link_color for Linktext identifiers 2023-11-21 16:54:02 +01:00
border-radius-shrink-zero-sized-box.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
border-radius-with-padding.html LibWeb: Take padding into account when resolving border radii 2024-01-07 19:28:38 +01:00
border-radius.html Tests/LibWeb: Add border-radius ref test 2023-10-21 23:16:17 +02:00
button-inside-scroll-container.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
calc-border-radius.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.html LibWeb: Add canvas context2d roundRect 2023-10-20 07:20:29 +02:00
canvas-text.html LibWeb: Use paths for text in CRC2D (if possible) 2024-02-12 13:38:10 +01:00
clip-abspos-children.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
clip.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
corner-clip-inside-scrollable.html LibWeb: Clean previous border radii clips in refresh_clip_state() 2024-02-28 07:44:12 -05:00
css-any-link-selector.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-attr-basic.html LibWeb/Tests: Rename css-attr-ref.html reference to text-div.html 2023-12-11 16:54:59 +01:00
css-attr-fallback.html LibWeb/Tests: Rename css-attr-ref.html reference to text-div.html 2023-12-11 16:54:59 +01:00
css-attr-typed-fallback.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-attr-typed.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-background-clip-text.html LibWeb: Support CSS property background-clip: text 2024-03-03 15:33:12 +01:00
css-background-position.html LibWeb: Add ref-tests for 3-value background positions with center 2024-01-10 23:27:28 +01:00
css-background-repeat.html LibWeb: Re-enable the css-background-repeat.html ref test 2023-12-01 10:28:02 +01:00
css-backgrounds.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
css-functional-unknown-webkit-pseudo-element.html LibWeb: Support obsolete but required -webkit- CSS parsing quirk 2023-12-11 16:54:59 +01:00
css-gradient-currentcolor.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-gradients.html LibWeb: Allow calc() in CSS position values 2023-11-21 01:29:26 +01:00
css-invalid-var.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-lang-selector.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-local-link-selector.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-open-closed-selectors.html LibWeb: Implement the :open and :closed pseudo-classes 2023-09-13 19:55:22 +02:00
css-placeholder-shown-selector.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-quotes.html LibWeb: Support quotes in content values 2023-09-17 15:45:52 -06:00
css-read-only-read-write-selectors.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
css-transform-box.html LibWeb: Make use of transform-box when calculating transforms 2024-01-27 07:46:37 +01:00
css-unknown-webkit-pseudo-element.html LibWeb: Support obsolete but required -webkit- CSS parsing quirk 2023-12-11 16:54:59 +01:00
first-available-font-should-include-whitespace.html LibWeb: Find font that has whitespace glyph in first_available_font() 2024-01-22 14:14:59 +01:00
grid-items-painting-order.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
img-srcset-viewport-relative-sizes.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
inline-node.html Tests/LibWeb: Add ref test for inline node styles 2023-12-07 10:52:47 +01:00
inline-stacking-context.html LibWeb: Allow inline nodes to establish a stacking context 2024-01-05 19:36:55 +01:00
input-placeholder.html LibWeb: Hide input placeholder when input already has a value 2023-12-10 20:56:19 +01:00
invalidate-css-transform-property.html LibWeb: Fix invalidation of CSS properties that do not affect layout 2024-02-03 09:28:03 +01:00
item-with-negative-z-index.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
meter.html LibWeb: Add basic HTML meter element support 2023-12-04 19:54:43 +00:00
nested-boxes-with-hidden-overflow-and-border-radius.html LibWeb: Account for all clipped border radii in containing block chain 2024-02-11 08:12:31 +01:00
object-fit-position.html Tests/LibWeb: Add object-{fit,position} test 2023-10-31 07:03:05 +01:00
opacity-stacking.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
outer-box-shadow.html Tests/LibWeb: Add outer box-shadow ref test 2023-10-22 18:38:22 +02:00
outlines.html LibWeb: Resolve outline CSS property before paint commands recording 2024-02-12 13:38:24 +01:00
overflow-hidden-2.html Tests/LibWeb: Add ref-tests for "overflow: hidden" 2023-12-21 19:25:31 +01:00
overflow-hidden-3.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-4.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-5.html LibWeb: Move clip rect calculation to happen before painting 2024-01-28 08:25:28 +01:00
overflow-hidden-6.html LibWeb: Fix hidden overflow clipping with nested CSS transforms 2024-01-29 07:21:38 +01:00
overflow-hidden-7.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
overflow-hidden-text-inside-translated-container.html LibWeb: Do not add CSS transforms into clip rect in PaintableWithLines 2024-02-03 20:05:09 +01:00
overflow-hidden.html Tests/LibWeb: Add ref-tests for "overflow: hidden" 2023-12-21 19:25:31 +01:00
positioned-elements-in-scroll-container.html LibWeb: Use offset of nearest scrollable ancestor for positioned boxes 2023-12-11 20:37:05 +01:00
resolve-paint-only-properties-after-layout.html LibWeb: Invalidate paint-only property after relayout 2024-02-08 13:08:10 +01:00
scroll-iframe.html LibWeb: Remove direct calls of page_did_request_scroll_to() 2024-02-03 19:00:26 +01:00
scroll-using-mousewheel-event.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
scrollable-box-with-nested-stacking-context.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
scrollable-contains-boxes-with-hidden-overflow-1.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
scrollable-contains-boxes-with-hidden-overflow-2.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
scrollable-contains-boxes-with-hidden-overflow-and-opacity.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
separate-borders-inline-table.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
simple-svg-mask.html LibWeb: Store computed SVG path data/transforms in LayoutState 2023-10-30 19:44:54 +01:00
space-glyph-width.html LibGfx: Take into account unicode ranges to find font for space glyph 2024-01-08 01:00:24 +01:00
square-flex.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-alpha-mask-attribute.html LibWeb: Support mask-type style attribute for SVGs 2023-11-12 16:01:46 +01:00
svg-alpha-mask.html LibWeb: Store computed SVG path data/transforms in LayoutState 2023-10-30 19:44:54 +01:00
svg-axis-aligned-lines.html LibWeb: Fix drawing axis-aligned lines 2024-01-09 00:03:09 +01:00
svg-background-no-natural-size.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.svg LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-gradient-spreadMethod.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-inside-scroll-container.html LibWeb: Implement scrollbar painting 2024-02-28 07:51:13 -05:00
svg-mask-in-defs.html LibWeb: Store computed SVG path data/transforms in LayoutState 2023-10-30 19:44:54 +01:00
svg-mask-maskUnits-userSpaceOnUse.html LibWeb: Store computed SVG path data/transforms in LayoutState 2023-10-30 19:44:54 +01:00
svg-radialGradient.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-stroke-paintstyle-with-opacity.html LibWeb: Fix stroke-opacity for stroked paths that use PaintStyles 2023-10-28 19:06:12 +02:00
svg-symbol.html LibWeb+headless-browser: Replace ref-test manifest with link tags 2023-09-13 08:48:19 +02:00
svg-text-effects.html LibWeb: Support transforms, stroking, gradients, etc for SVG <text> 2023-11-05 02:46:46 +01:00
svg-textPath.html Tests/LibWeb: Add ref test for SVG <textPath>s 2023-12-19 21:29:03 +01:00
svg-use-defined-later.html LibWeb: Ensure DocumentObserver document_completely_loaded() is called 2023-12-26 21:37:04 +01:00
text-decorations.html LibWeb: Use PaintableFragment::baseline() in paint_text_decoration() 2024-01-26 07:36:40 +01:00
text-shadow.html Tests/LibWeb: Add missing test-shadow.html 2023-10-26 10:56:30 +02:00
transform-2d-translate.html LibWeb: Resolve CSS transform lengths against padding rect 2024-01-16 21:54:10 +01:00
transform-calc-length-percentage.html LibWeb/CSS: Improve parsing of length percentage values for transforms 2024-01-09 14:15:05 +01:00
unicode-range.html LibGfx+LibWeb: Update for_each_glyph_position to use font cascade list 2023-12-10 17:32:04 +01:00