Bug 1654331 - throw InvalidStateError when getPointAtLength can't get the path for measuring r=dholbert

Differential Revision: https://phabricator.services.mozilla.com/D86461
This commit is contained in:
longsonr 2020-08-09 20:34:04 +00:00
Родитель 1be997b53b
Коммит e2d27d8052
3 изменённых файлов: 1 добавлений и 48 удалений

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

@ -230,7 +230,7 @@ already_AddRefed<nsISVGPoint> SVGGeometryElement::GetPointAtLength(
float distance, ErrorResult& rv) {
RefPtr<Path> path = GetOrBuildPathForMeasuring();
if (!path) {
rv.Throw(NS_ERROR_FAILURE);
rv.ThrowInvalidStateError("No path available for measuring");
return nullptr;
}

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

@ -1,10 +0,0 @@
[SVGGeometryElement.getPointAtLength-03.svg]
[When SVGGeometryElement.getPointAtLength is called with an element that is not in the document, throw exception with SVGRectElement]
expected: FAIL
[When SVGGeometryElement.getPointAtLength is called with an element that is not in the document, throw exception with SVGPathElement]
expected: FAIL
[When SVGGeometryElement.getPointAtLength is called with an element that is not in the document, throw exception with SVGCircleElement]
expected: FAIL

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

@ -1,37 +0,0 @@
[SVGGeometryElement.getPointAtLength-05.svg]
[SVGGeometryElement.getPointAtLength: 'display' and empty path, circle with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, rect with display: defualt and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, polyline with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, ellipse with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, ellipse with display: default and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, rect with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, path with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, path with display: defualt and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, polygon with display: none and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, polyline with display: default and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, circle with display: default and an empty path]
expected: FAIL
[SVGGeometryElement.getPointAtLength: 'display' and empty path, polygon with display: defualt and an empty path]
expected: FAIL