Introduce SVGGeometryElement interface
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 01:00:40 +0000 (01:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Apr 2018 01:00:40 +0000 (01:00 +0000)
commit96db03301d8fcf755f9e93197f56ffe5fe0c8e40
tree551ba3f888570f867721fc9b893136b1c2cd3574
parent243addfc7d6d51c150c0470ff49e8236b88288ba
Introduce SVGGeometryElement interface
https://bugs.webkit.org/show_bug.cgi?id=184768

Source/WebCore:

Patch by Dirk Schulze <krit@webbkit.org> on 2018-04-19
Reviewed by Antti Koivisto.

Start implementing SVGGeometryElement interface from SVG2.
https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement

Start with SVGPathElement only for now. Also, just inferface gets implemented
by this patch. No new functionality like isPointInFill yet.
Fix getPointAtLength and make it more restrictive. This follows the spec and
all other implementations.

Added additional test scenarios to existing tests.

* CMakeLists.txt:
* DerivedSources.make:
* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorJS.pm:
(GetGnuVTableOffsetForType):
* svg/SVGAllInOne.cpp:
* svg/SVGGeometryElement.cpp: Added.
(WebCore::SVGGeometryElement::SVGGeometryElement):
(WebCore::SVGGeometryElement::isSupportedAttribute):
(WebCore::SVGGeometryElement::parseAttribute):
(WebCore::SVGGeometryElement::svgAttributeChanged):
(WebCore::SVGGeometryElement::createElementRenderer):
* svg/SVGGeometryElement.h: Added.
* svg/SVGGeometryElement.idl: Added.
* svg/SVGGradientElement.cpp:
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::SVGPathElement):
(WebCore::SVGPathElement::parseAttribute):
(WebCore::SVGPathElement::svgAttributeChanged):
(WebCore::SVGPathElement::insertedIntoAncestor):
(WebCore::SVGPathElement::removedFromAncestor):
* svg/SVGPathElement.h:
* svg/SVGPathElement.idl:

LayoutTests:

Patch by Dirk Schulze <krit@webkit.org> on 2018-04-19
Reviewed by Antti Koivisto.

Start implementing SVGGeometryElement interface from SVG2.

* svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html: pointAtLength requires value now.
* svg/dom/path-pointAtLength-expected.txt:
* svg/dom/path-pointAtLength.html: Added throw tests for pointAtLength.
* svg/dom/svg2-inheritance-expected.txt: Inheritance fixed for SVGPathElement only for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/dom/SVGPolygonElement-baseVal-list-removal-crash.html
LayoutTests/svg/dom/path-pointAtLength-expected.txt
LayoutTests/svg/dom/path-pointAtLength.html
LayoutTests/svg/dom/svg2-inheritance-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/svg/SVGAllInOne.cpp
Source/WebCore/svg/SVGGeometryElement.cpp [new file with mode: 0644]
Source/WebCore/svg/SVGGeometryElement.h [new file with mode: 0644]
Source/WebCore/svg/SVGGeometryElement.idl [new file with mode: 0644]
Source/WebCore/svg/SVGGradientElement.cpp
Source/WebCore/svg/SVGPathElement.cpp
Source/WebCore/svg/SVGPathElement.h
Source/WebCore/svg/SVGPathElement.idl