Bug 1325320 part 2 - change shapes so they implement SVGGeometryElement and implement SVGGeometryElement::GetOrBuildPath r=dholbert r=mystor (DOM Peer)

This commit is contained in:
Robert Longson 2018-03-13 19:20:43 +00:00
Родитель 3179655c20
Коммит bda3ae0619
9 изменённых файлов: 10 добавлений и 227 удалений

Просмотреть файл

@ -125,7 +125,10 @@ SVGGeometryElement::GetOrBuildPath(const DrawTarget* aDrawTarget,
already_AddRefed<Path>
SVGGeometryElement::GetOrBuildPathForMeasuring()
{
return nullptr;
RefPtr<DrawTarget> drawTarget =
gfxPlatform::GetPlatform()->ScreenReferenceDrawTarget();
FillRule fillRule = mCachedPath ? mCachedPath->GetFillRule() : GetFillRule();
return GetOrBuildPath(drawTarget, fillRule);
}
FillRule

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGCircleElement : SVGGraphicsElement {
interface SVGCircleElement : SVGGeometryElement {
[Constant]
readonly attribute SVGAnimatedLength cx;
[Constant]

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGEllipseElement : SVGGraphicsElement {
interface SVGEllipseElement : SVGGeometryElement {
[Constant]
readonly attribute SVGAnimatedLength cx;
[Constant]

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGLineElement : SVGGraphicsElement {
interface SVGLineElement : SVGGeometryElement {
[Constant]
readonly attribute SVGAnimatedLength x1;
[Constant]

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGPolygonElement : SVGGraphicsElement {
interface SVGPolygonElement : SVGGeometryElement {
};
SVGPolygonElement implements SVGAnimatedPoints;

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGPolylineElement : SVGGraphicsElement {
interface SVGPolylineElement : SVGGeometryElement {
};
SVGPolylineElement implements SVGAnimatedPoints;

Просмотреть файл

@ -10,7 +10,7 @@
* liability, trademark and document use rules apply.
*/
interface SVGRectElement : SVGGraphicsElement {
interface SVGRectElement : SVGGeometryElement {
[Constant]
readonly attribute SVGAnimatedLength x;
[Constant]

Просмотреть файл

@ -290,12 +290,6 @@
[SVGElement interface: path must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGRectElement interface: existence and properties of interface object]
expected: FAIL
[SVGRectElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "pathLength" with the proper type (0)]
expected: FAIL
@ -308,15 +302,6 @@
[SVGGeometryElement interface: rect must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on rect with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on rect with too few arguments must throw TypeError]
expected: FAIL
@ -335,12 +320,6 @@
[SVGElement interface: rect must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGCircleElement interface: existence and properties of interface object]
expected: FAIL
[SVGCircleElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "pathLength" with the proper type (0)]
expected: FAIL
@ -356,15 +335,6 @@
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on circle with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on circle with too few arguments must throw TypeError]
expected: FAIL
[SVGElement interface: circle must inherit property "onautocomplete" with the proper type (8)]
expected: FAIL
@ -380,12 +350,6 @@
[SVGElement interface: circle must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGEllipseElement interface: existence and properties of interface object]
expected: FAIL
[SVGEllipseElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "pathLength" with the proper type (0)]
expected: FAIL
@ -401,15 +365,6 @@
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on ellipse with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on ellipse with too few arguments must throw TypeError]
expected: FAIL
[SVGElement interface: ellipse must inherit property "onautocomplete" with the proper type (8)]
expected: FAIL
@ -425,15 +380,6 @@
[SVGElement interface: ellipse must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGLineElement interface: existence and properties of interface object]
expected: FAIL
[SVGLineElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
@ -446,15 +392,6 @@
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on line with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on line with too few arguments must throw TypeError]
expected: FAIL
[SVGElement interface: line must inherit property "onautocomplete" with the proper type (8)]
expected: FAIL
@ -470,12 +407,6 @@
[SVGElement interface: line must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGPolylineElement interface: existence and properties of interface object]
expected: FAIL
[SVGPolylineElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "pathLength" with the proper type (0)]
expected: FAIL
@ -491,15 +422,6 @@
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polyline with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on polyline with too few arguments must throw TypeError]
expected: FAIL
[SVGElement interface: polyline must inherit property "onautocomplete" with the proper type (8)]
expected: FAIL
@ -515,12 +437,6 @@
[SVGElement interface: polyline must inherit property "onsort" with the proper type (62)]
expected: FAIL
[SVGPolygonElement interface: existence and properties of interface object]
expected: FAIL
[SVGPolygonElement interface: existence and properties of interface prototype object]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "pathLength" with the proper type (0)]
expected: FAIL
@ -536,15 +452,6 @@
[SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polygon with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on polygon with too few arguments must throw TypeError]
expected: FAIL
[SVGElement interface: polygon must inherit property "onautocomplete" with the proper type (8)]
expected: FAIL
@ -1472,105 +1379,36 @@
[SVGGeometryElement interface: rect must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on rect with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on circle with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on ellipse with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on line with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on polyline with too few arguments must throw TypeError]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "pathLength" with the proper type (0)]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "isPointInFill" with the proper type (1)]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "isPointInStroke" with the proper type (2)]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getTotalLength" with the proper type (3)]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getPointAtLength" with the proper type (4)]
expected: FAIL
[SVGGeometryElement interface: calling getPointAtLength(float) on polygon with too few arguments must throw TypeError]
expected: FAIL
[SVGUnitTypes interface: existence and properties of interface prototype object]
expected: FAIL
@ -1637,96 +1475,42 @@
[SVGGeometryElement interface: path must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: rect must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: circle must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: ellipse must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: line must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polyline must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "pathLength" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "isPointInFill(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "isPointInStroke(DOMPoint)" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getTotalLength()" with the proper type]
expected: FAIL
[SVGGeometryElement interface: polygon must inherit property "getPointAtLength(float)" with the proper type]
expected: FAIL
[SVGImageElement interface: image must inherit property "crossOrigin" with the proper type]
expected: FAIL

Просмотреть файл

@ -1,4 +0,0 @@
[SVGGeometryElement-rect.svg]
[getTotalLength and getPointAtLength do not take pathLength into account]
expected: FAIL