ladybird/Libraries/LibWeb/SVG
Erik Kurzinger 42339be999 LibWeb: Use intrinsic size for current_image_bitmap
Currently, ImageProvider::current_image_bitmap takes a Gfx::IntSize
argument which determines the size of the returned bitmap. The default
value of this argument is 0x0 which causes the function to return
nullptr. This behavior is evidently unintuitive enough that it has lead
to incorrect usage in multiple places. For example, the 2D canvas
drawImage method will never actually draw anything because it calls
current_image_bitmap with no arguments. And the naturalWidth and
naturalHeight of an image will always return 0 (even after the image has
loaded) for the same reason.

To correct this and hopefully avoid similar issues in the future,
ImageProvider::current_image_bitmap will be renamed to
current_image_bitmap_sized, and the default value for the size argument
will be removed. For consistency, a similar change will be made to
SVGImageElement::default_image_bitmap.

The existing current_image_bitmap function will no longer take a size
argument. Instead it will always return a bitmap of the image's
intrinsic size. This seems to be what most existing callers had already
assumed was the function's behavior.
2025-08-30 15:49:11 +02:00
..
AttributeNames.cpp LibWeb: Remove the initialize_strings methods 2025-01-12 00:35:58 +01:00
AttributeNames.h LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
AttributeParser.cpp LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
AttributeParser.h LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
Default.css LibWeb: Layout foreignObject as block-level element with hidden overflow 2025-07-09 14:36:08 +02:00
Path.cpp LibWeb/SVG: Add serialization of Paths 2025-07-17 13:59:23 -04:00
Path.h LibWeb/SVG: Add serialization of Paths 2025-07-17 13:59:23 -04:00
SVGAElement.cpp LibWeb/SVG: Implement the SVGAElement.target attribute 2025-07-12 11:05:48 +02:00
SVGAElement.h LibWeb/SVG: Implement the SVGAElement.target attribute 2025-07-12 11:05:48 +02:00
SVGAElement.idl LibWeb/SVG: Implement the SVGAElement.referrerPolicy attribute 2025-07-12 11:05:48 +02:00
SVGAnimatedEnumeration.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGAnimatedEnumeration.h LibWeb: Add SVGAnimatedEnumeration 2025-02-22 10:14:29 +01:00
SVGAnimatedEnumeration.idl LibWeb: Add SVGAnimatedEnumeration 2025-02-22 10:14:29 +01:00
SVGAnimatedLength.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGAnimatedLength.h
SVGAnimatedLength.idl
SVGAnimatedNumber.cpp LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
SVGAnimatedNumber.h LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
SVGAnimatedNumber.idl
SVGAnimatedRect.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGAnimatedRect.h
SVGAnimatedRect.idl
SVGAnimatedString.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGAnimatedString.h LibWeb: Enable EXPLICIT_SYMBOL_EXPORT 2025-08-23 16:04:36 -06:00
SVGAnimatedString.idl
SVGAnimatedTransformList.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGAnimatedTransformList.h
SVGAnimatedTransformList.idl
SVGAnimationElement.cpp LibWeb: Add barebones SVGAnimationElement class 2025-07-30 15:51:35 +01:00
SVGAnimationElement.h LibWeb: Add barebones SVGAnimationElement class 2025-07-30 15:51:35 +01:00
SVGAnimationElement.idl LibWeb: Add barebones SVGAnimationElement class 2025-07-30 15:51:35 +01:00
SVGCircleElement.cpp LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGCircleElement.h LibWeb: Avoid many style invalidations on DOM attribute mutation 2024-12-24 17:17:09 +01:00
SVGCircleElement.idl
SVGClipPathElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGClipPathElement.h LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGClipPathElement.idl
SVGDecodedImageData.cpp LibWeb: Support decoding SVG favicons 2025-08-27 08:41:01 +02:00
SVGDecodedImageData.h LibWeb: Support decoding SVG favicons 2025-08-27 08:41:01 +02:00
SVGDefsElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGDefsElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGDefsElement.idl
SVGDescElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGDescElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGDescElement.idl
SVGElement.cpp LibWeb/CSS: Parse the paint-order property 2025-08-28 10:31:09 +01:00
SVGElement.h LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGElement.idl LibWeb: Implement SVGElement.viewportElement 2025-05-16 20:36:07 +02:00
SVGEllipseElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGEllipseElement.h
SVGEllipseElement.idl
SVGFEBlendElement.cpp LibWeb/SVG: Apply SVGFeBlendElement blend mode 2025-08-06 15:21:03 +02:00
SVGFEBlendElement.h LibWeb/SVG: Apply SVGFeBlendElement blend mode 2025-08-06 15:21:03 +02:00
SVGFEBlendElement.idl LibWeb/SVG: Apply SVGFeBlendElement blend mode 2025-08-06 15:21:03 +02:00
SVGFEFloodElement.cpp LibWeb: Use correct colors for SVGFEFloodElement::flood_color 2025-08-04 11:29:05 +01:00
SVGFEFloodElement.h LibWeb: Use correct colors for SVGFEFloodElement::flood_color 2025-08-04 11:29:05 +01:00
SVGFEFloodElement.idl LibWeb/SVG: Add FEFloodElement 2025-07-09 18:07:12 +01:00
SVGFEGaussianBlurElement.cpp LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
SVGFEGaussianBlurElement.h LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
SVGFEGaussianBlurElement.idl LibWeb: Implement SVGAnimatedNumber 2025-07-11 11:25:59 +01:00
SVGFEImageElement.cpp LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
SVGFEImageElement.h LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
SVGFEImageElement.idl LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
SVGFEMergeElement.cpp LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEMergeElement.h LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEMergeElement.idl LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEMergeNodeElement.cpp LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEMergeNodeElement.h LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEMergeNodeElement.idl LibWeb: Implement <feMerge> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEOffsetElement.cpp LibWeb: Implement <feOffset> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEOffsetElement.h LibWeb: Implement <feOffset> SVG filter 2025-08-07 16:41:12 +02:00
SVGFEOffsetElement.idl LibWeb: Implement <feOffset> SVG filter 2025-08-07 16:41:12 +02:00
SVGFilterElement.cpp LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
SVGFilterElement.h LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00
SVGFilterElement.idl LibWeb: Add SVGFilterElement 2025-02-22 10:14:29 +01:00
SVGFilterPrimitiveStandardAttributes.h LibWeb/SVG: Add FilterPrimitiveStandardAttributes 2025-07-09 18:07:12 +01:00
SVGFilterPrimitiveStandardAttributes.idl LibWeb/SVG: Add FilterPrimitiveStandardAttributes 2025-07-09 18:07:12 +01:00
SVGFitToViewBox.cpp LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
SVGFitToViewBox.h LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
SVGFitToViewBox.idl
SVGForeignObjectElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGForeignObjectElement.h Meta: Enforce newlines around namespaces 2025-05-14 02:01:59 -06:00
SVGForeignObjectElement.idl
SVGGElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGGElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGGElement.idl
SVGGeometryElement.cpp LibWeb: Implement the SVGGeometryElement.pathLength attribute 2025-07-12 11:49:10 +12:00
SVGGeometryElement.h LibWeb: Implement the SVGGeometryElement.pathLength attribute 2025-07-12 11:49:10 +12:00
SVGGeometryElement.idl LibWeb: Implement the SVGGeometryElement.pathLength attribute 2025-07-12 11:49:10 +12:00
SVGGradientElement.cpp LibWeb: Implement the color-interpolation property for SVG gradients 2025-08-17 10:51:05 +02:00
SVGGradientElement.h LibWeb: Implement the color-interpolation property for SVG gradients 2025-08-17 10:51:05 +02:00
SVGGradientElement.idl
SVGGraphicsElement.cpp LibWeb/SVG: Respect paint-order when painting SVG paths 2025-08-28 10:31:09 +01:00
SVGGraphicsElement.h LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
SVGGraphicsElement.idl LibWeb: Stub out SVGGraphicsElement.getCTM() 2025-05-16 20:36:07 +02:00
SVGImageElement.cpp LibWeb: Use intrinsic size for current_image_bitmap 2025-08-30 15:49:11 +02:00
SVGImageElement.h LibWeb: Use intrinsic size for current_image_bitmap 2025-08-30 15:49:11 +02:00
SVGImageElement.idl
SVGLength.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGLength.h LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGLength.idl
SVGLinearGradientElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGLinearGradientElement.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGLinearGradientElement.idl
SVGLineElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGLineElement.h
SVGLineElement.idl
SVGMaskElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGMaskElement.h LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGMaskElement.idl
SVGMetadataElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGMetadataElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGMetadataElement.idl
SVGPathElement.cpp LibWeb/SVG: Move path data into Path.{h,cpp} 2025-07-17 13:59:23 -04:00
SVGPathElement.h LibWeb/SVG: Move path data into Path.{h,cpp} 2025-07-17 13:59:23 -04:00
SVGPathElement.idl
SVGPolygonElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGPolygonElement.h
SVGPolygonElement.idl
SVGPolylineElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGPolylineElement.h
SVGPolylineElement.idl
SVGRadialGradientElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGRadialGradientElement.h AK+Everywhere: Rename verify_cast to as 2025-01-21 11:34:06 -05:00
SVGRadialGradientElement.idl
SVGRectElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGRectElement.h
SVGRectElement.idl
SVGScriptElement.cpp LibWeb: Port node text content to UTF-16 2025-07-28 18:30:50 +02:00
SVGScriptElement.h LibWeb/SVG: Process script element when href attribute changes 2025-02-26 16:08:35 +01:00
SVGScriptElement.idl
SVGStopElement.cpp LibWeb: Use XML parser for SVG-as-image documents 2025-08-22 11:35:59 +02:00
SVGStopElement.h LibWeb: Support relative lengths in stop-color calcs 2025-08-04 11:29:05 +01:00
SVGStopElement.idl
SVGStyleElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGStyleElement.h LibWeb: Add metadata to children update steps invocation 2025-01-30 13:55:40 -07:00
SVGStyleElement.idl
SVGSVGElement.cpp LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGSVGElement.h LibWeb/SVG: Parse comma-separated SVG viewBox 2025-08-30 15:49:11 +02:00
SVGSVGElement.idl LibWeb/SVG: Mark SVG factory functions as [NewObject] 2025-04-02 17:28:45 +01:00
SVGSymbolElement.cpp Everywhere: Change west consts caught by clang-format-21 to east consts 2025-08-29 18:18:55 +01:00
SVGSymbolElement.h LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGSymbolElement.idl
SVGTextContentElement.cpp LibWeb: Port SVGFormattingContext to UTF-16 2025-08-05 15:13:36 +02:00
SVGTextContentElement.h LibWeb: Port SVGFormattingContext to UTF-16 2025-08-05 15:13:36 +02:00
SVGTextContentElement.idl
SVGTextElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGTextElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTextElement.idl
SVGTextPathElement.cpp LibWeb/SVG: Remove remaining user of of old try_resolve_url_to() 2025-04-30 17:38:38 +01:00
SVGTextPathElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTextPathElement.idl
SVGTextPositioningElement.cpp LibJS+LibWeb: Replace JS::Utf16String with AK::Utf16String 2025-07-18 12:45:38 -04:00
SVGTextPositioningElement.h
SVGTextPositioningElement.idl
SVGTitleElement.cpp LibWeb+LibWebView+WebContent+UI: Port the document title to UTF-16 2025-08-02 10:10:14 -07:00
SVGTitleElement.h LibWeb: Add metadata to children update steps invocation 2025-01-30 13:55:40 -07:00
SVGTitleElement.idl
SVGTransform.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGTransform.h
SVGTransform.idl
SVGTransformList.cpp LibJS+LibWeb: Port interned bytecode strings to UTF-16 2025-08-14 10:27:08 +02:00
SVGTransformList.h
SVGTransformList.idl
SVGTSpanElement.cpp LibWeb: Only set prototype once for object with IDL interface 2025-04-20 18:43:11 +02:00
SVGTSpanElement.h LibWeb: Make CSS::ComputedProperties GC-allocated 2024-12-22 10:12:49 +01:00
SVGTSpanElement.idl
SVGUnitTypes.h LibWeb: Add SVGUnitTypes 2025-08-06 23:05:56 -04:00
SVGUnitTypes.idl LibWeb: Add SVGUnitTypes 2025-08-06 23:05:56 -04:00
SVGURIReference.h LibWeb: Replace usages of dynamic_cast with as and as_if 2025-08-22 20:26:09 +02:00
SVGURIReference.idl
SVGUseElement.cpp LibWeb: Implement SVGLength's read-only property 2025-08-27 11:50:27 +02:00
SVGUseElement.h LibWeb: Fix typos - act II 2025-04-09 15:05:20 +01:00
SVGUseElement.idl
SVGViewElement.cpp LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGViewElement.h LibWeb: Move common SVGViewport code into an SVGFitToViewBox class 2025-08-28 15:42:56 +02:00
SVGViewElement.idl LibWeb: Implement SVGViewElement 2025-07-22 00:52:24 +02:00
TagNames.cpp LibWeb: Remove the initialize_strings methods 2025-01-12 00:35:58 +01:00
TagNames.h LibWeb: Implement <feImage> SVG filter 2025-08-29 10:15:24 +01:00