mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibWeb: Implement SVGStopElement (<stop>)
This is used to specify the color/position of color stops for SVG gradients.
This commit is contained in:
parent
297d8eebcd
commit
b19d2634f6
7 changed files with 116 additions and 1 deletions
|
@ -93,6 +93,7 @@
|
|||
#include <LibWeb/SVG/SVGPolylineElement.h>
|
||||
#include <LibWeb/SVG/SVGRectElement.h>
|
||||
#include <LibWeb/SVG/SVGSVGElement.h>
|
||||
#include <LibWeb/SVG/SVGStopElement.h>
|
||||
#include <LibWeb/SVG/SVGTextContentElement.h>
|
||||
#include <LibWeb/SVG/TagNames.h>
|
||||
#include <LibWeb/WebIDL/AbstractOperations.h>
|
||||
|
@ -441,6 +442,8 @@ static WebIDL::ExceptionOr<JS::GCPtr<SVG::SVGElement>> create_svg_element(JS::Re
|
|||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGRectElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::g)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGGElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::stop)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGStopElement>(realm, document, move(qualified_name)));
|
||||
if (local_name == SVG::TagNames::text)
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<SVG::SVGTextContentElement>(realm, document, move(qualified_name)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue