Commit Graph

15 Commits

Author SHA1 Message Date
Luke Wilde
55646893d8 LibWeb: Add xlink:href to SVG attribute names 2023-12-30 18:50:29 +01:00
Shannon Booth
e4f8c59210 LibWeb: Port AttributeNames to FlyString 2023-10-08 08:11:48 -04:00
Andreas Kling
25eee91811 AK: Make "foo"_fly_string infallible
Stop worrying about tiny OOMs.

Work towards #20405.
2023-08-07 16:03:27 +02:00
Andreas Kling
55c1d8ba29 LibWeb: Honor the opacity attribute on SVG graphics elements
This is simply converted to an equivalent CSS `opacity` property value.
2023-06-20 13:24:33 +02:00
Aliaksandr Kalenik
0d8d7ae94e LibWeb: Implement painting for svg text
The implementation of painting for SVG text follows the same pattern
as the implementation of painting for SVG geometries. However, instead
of reusing the existing PaintableWithLines to draw text, a new class
called SVGTextPaintable is introduced. because everything that is
painted inside an SVG is expected to inherit from SVGGraphicsPaintable.
Therefore reusing the text painting from regular text nodes would
require significant refactoring.
2023-06-09 17:20:34 +02:00
PrestonLTaylor
c7c3043aa2 LibWeb: Implement the <use> SVG element
The SVG <use> element is used to be able to reuse other SVG graphics
without having to re-write the svg element.

We now support this feature! :^)
2023-06-03 05:58:00 +02:00
MacDue
9ecc5413de LibWeb: Add tag and attribute names for SVG linear gradients 2023-05-04 16:50:01 +02:00
MacDue
b19d2634f6 LibWeb: Implement SVGStopElement (<stop>)
This is used to specify the color/position of color stops for SVG
gradients.
2023-04-28 09:42:28 +02:00
Timothy Flynn
db2ba5f1d9 LibWeb: Initialize static web strings during main-thread VM creation
These are currently initialized in a [[gnu::constructor]], which has a
weird initialization order. These constructors are invoked before main()
and, incidentally, before any user-defined default constructors of the
static strings they are initializing.

This will become an issue when these strings are ported to FlyString,
which has a user-defined default constructor. In that scenario, when the
FlyString constructor is executed after the [[gnu::constructor]], the
strings will be "reset" to the empty string.

Instead of relying on a non-standard compiler extension here, let's just
initialize these strings explicitly during main-thread VM creation, as
this now happens in WebContent's main().
2023-03-18 19:50:45 +01:00
Timothy Flynn
f3db548a3d AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
2023-01-09 23:00:24 +00:00
Sam Atkins
116a1f485c LibWeb: Add SVG <polyline> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
17912330c4 LibWeb: Add SVG <line> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
21bdcee3c3 LibWeb: Add SVG <circle> element and test case :^) 2022-02-11 21:38:27 +01:00
Sam Atkins
1dde6a0a2b LibWeb: Add SVG <rect> element and test case :^) 2022-02-11 21:38:27 +01:00
Andreas Kling
8949b0def6 LibWeb: Add an SVG::AttributeNames namespace
There are a whole bunch of SVG attributes, and we shouldn't mix them in
with the HTML attributes. This patch adds some of them to the new
namespace, but there are more to be added. :^)
2021-09-15 11:56:26 +02:00