1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00
serenity/Userland/Libraries/LibWeb/SVG
MacDue 5cf1570f40 LibWeb: Add initial support for nesting SVG viewports
Previously, we were handling viewBoxes/viewports in a slightly hacky
way, asking graphics elements to figure out what viewBox to use during
layout. This does not work in all cases, and can't allow for more
complex SVGs where it is possible to have nested viewports.

This commit makes the SVGFormattingContext keep track of the
viewport/boxes, and it now lays out each viewport recursively, where
each nested `<svg>` or `<symbol>` can establish a new viewport.

This fixes some previous edge cases, and starts to allow nested
viewports (there's still some issues to resolve there).

Fixes #22931
2024-01-27 18:12:13 +01:00
..
AttributeNames.cpp LibWeb: Add xlink:href to SVG attribute names 2023-12-30 18:50:29 +01:00
AttributeNames.h LibWeb: Add xlink:href to SVG attribute names 2023-12-30 18:50:29 +01:00
AttributeParser.cpp LibWeb: Flesh out SVGMaskElement a bit 2023-09-19 10:46:05 +02:00
AttributeParser.h LibWeb: Flesh out SVGMaskElement a bit 2023-09-19 10:46:05 +02:00
Default.css LibWeb: Include standard SVG user agent style sheet 2023-09-23 16:27:14 +02:00
SVGAnimatedLength.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGAnimatedLength.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGAnimatedLength.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
SVGAnimatedNumber.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGAnimatedNumber.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGAnimatedNumber.idl LibWeb: Format all .idl files to use four space indentation 2024-01-18 14:00:06 +01:00
SVGAnimatedRect.cpp LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGAnimatedRect.h LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGAnimatedRect.idl LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGAnimatedString.cpp LibWeb: Implement SVGAnimatedString 2023-12-30 18:50:29 +01:00
SVGAnimatedString.h LibWeb: Implement SVGAnimatedString 2023-12-30 18:50:29 +01:00
SVGAnimatedString.idl LibWeb: Format all .idl files to use four space indentation 2024-01-18 14:00:06 +01:00
SVGCircleElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGCircleElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGCircleElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGClipPathElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGClipPathElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGClipPathElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGDecodedImageData.cpp LibWeb: Remove early continue in size parsing 2024-01-20 15:22:25 +01:00
SVGDecodedImageData.h LibWeb: Make HTML::DecodedImageData to be GC-allocated 2023-12-12 23:01:08 +01:00
SVGDefsElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGDefsElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGDefsElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGElement.h LibWeb: Port Element::attribute_changed from DeprecatedString to String 2023-11-19 08:16:34 +00:00
SVGElement.idl LibWeb: Move Element.prototype.style to ElementCSSInlineStyle mixin 2023-03-20 20:37:40 -04:00
SVGEllipseElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGEllipseElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGEllipseElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGFitToViewBox.idl LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGForeignObjectElement.cpp LibWeb: Remove DOM element deprecated_get_attribute() 2024-01-19 13:12:54 -07:00
SVGForeignObjectElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGForeignObjectElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGGElement.cpp LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGGElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGGeometryElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGGeometryElement.h LibJS: Make Cell::initialize() return void 2023-08-08 07:39:11 +02:00
SVGGeometryElement.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
SVGGradientElement.cpp LibWeb: Remove DOM element deprecated_get_attribute() 2024-01-19 13:12:54 -07:00
SVGGradientElement.h LibWeb: Port Element::attribute_changed from DeprecatedString to String 2023-11-19 08:16:34 +00:00
SVGGradientElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGGraphicsElement.cpp LibWeb: Add initial support for nesting SVG viewports 2024-01-27 18:12:13 +01:00
SVGGraphicsElement.h LibWeb: Add initial support for nesting SVG viewports 2024-01-27 18:12:13 +01:00
SVGGraphicsElement.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
SVGLength.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGLength.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGLength.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
SVGLinearGradientElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGLinearGradientElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGLinearGradientElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGLineElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGLineElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGLineElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGMaskElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGMaskElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGMaskElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGPathElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGPathElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGPathElement.idl LibWeb: Add Exposed attribute and IDL spec links where missing 2022-10-09 10:14:57 +02:00
SVGPolygonElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGPolygonElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGPolygonElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGPolylineElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGPolylineElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGPolylineElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGRadialGradientElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGRadialGradientElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGRadialGradientElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGRectElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGRectElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGRectElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGScriptElement.cpp LibWeb: Wait until new document is active before running SVG scripts 2024-01-14 11:27:58 +00:00
SVGScriptElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGScriptElement.idl IDL: Add missing #imports 2023-11-11 08:51:51 +01:00
SVGStopElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGStopElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGStopElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGStyleElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGStyleElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGStyleElement.idl IDL: Add missing spec links 2023-11-11 08:51:51 +01:00
SVGSVGElement.cpp LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGSVGElement.h LibWeb: Add initial support for nesting SVG viewports 2024-01-27 18:12:13 +01:00
SVGSVGElement.idl LibWeb: Add SVGSVGElement.viewBox attribute 2024-01-25 08:23:41 +01:00
SVGSymbolElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGSymbolElement.h LibWeb: Add initial support for nesting SVG viewports 2024-01-27 18:12:13 +01:00
SVGSymbolElement.idl LibWeb: Implement the <symbol> SVG element 2023-06-03 05:58:00 +02:00
SVGTextContentElement.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SVGTextContentElement.h Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SVGTextContentElement.idl LibWeb: Add comments and missing items of various IDL files 2023-10-25 19:45:41 +02:00
SVGTextElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGTextElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGTextElement.idl LibWeb: Split SVGTextContentElement into spec defined subclasses 2023-07-23 06:32:39 +02:00
SVGTextPathElement.cpp LibWeb: Add SVGURIReference 2023-12-30 18:50:29 +01:00
SVGTextPathElement.h LibWeb: Add SVGURIReference 2023-12-30 18:50:29 +01:00
SVGTextPathElement.idl LibWeb: Format all .idl files to use four space indentation 2024-01-18 14:00:06 +01:00
SVGTextPositioningElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGTextPositioningElement.h LibWeb: Port Element::attribute_changed from DeprecatedString to String 2023-11-19 08:16:34 +00:00
SVGTextPositioningElement.idl LibWeb: Add comments and missing items of various IDL files 2023-10-25 19:45:41 +02:00
SVGTitleElement.cpp Everywhere: Rename {Deprecated => Byte}String 2023-12-17 18:25:10 +03:30
SVGTitleElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGTitleElement.idl LibWeb: Implement the SVG title element 2023-06-09 01:12:48 +02:00
SVGTSpanElement.cpp LibWeb: Port Intrinsics from DeprecatedString 2023-11-28 17:15:27 -05:00
SVGTSpanElement.h LibWeb: Put most LibWeb GC objects in type-specific heap blocks 2023-11-19 22:00:48 +01:00
SVGTSpanElement.idl LibWeb: Add support for SVG <tspan> elements 2023-07-23 06:32:39 +02:00
SVGURIReference.h LibWeb: Add SVGURIReference 2023-12-30 18:50:29 +01:00
SVGURIReference.idl LibWeb: Add SVGURIReference 2023-12-30 18:50:29 +01:00
SVGUseElement.cpp LibWeb: Remove DOM element deprecated_get_attribute() 2024-01-19 13:12:54 -07:00
SVGUseElement.h LibWeb: Implement SVGUseElement#href 2023-12-30 18:50:29 +01:00
SVGUseElement.idl LibWeb: Implement SVGUseElement#href 2023-12-30 18:50:29 +01:00
SVGViewport.h LibWeb: Add initial support for nesting SVG viewports 2024-01-27 18:12:13 +01:00
TagNames.cpp LibWeb: Port SVG::TagNames from DeprecatedFlyString 2023-10-08 08:11:48 -04:00
TagNames.h LibWeb: Add initial support for SVG <textPath> 2023-12-19 21:29:03 +01:00
ViewBox.cpp Everywhere: Use to_number<T> instead of to_{int,uint,float,double} 2023-12-23 20:41:07 +01:00
ViewBox.h LibWeb: Make CSSPixels and Length use 64-bit (double) floating point 2023-05-24 14:40:35 +02:00