Skip to content

[svg 2 text] add scripted tests for length and indexed access - #10172

Merged
svgeesus merged 1 commit into
web-platform-tests:masterfrom
liamquin:svg-lists-have-length
Mar 31, 2018
Merged

svgeesus merged 1 commit into
web-platform-tests:masterfrom
liamquin:svg-lists-have-length

Conversation

@liamquin

@liamquin liamquin commented Mar 26, 2018 •

Copy link
Copy Markdown

The text and tspan elements seem to be the only ones in SVG itself affected by this change. The spec only demands read-only access so that's all that's tested here.

@ghost

ghost commented Mar 26, 2018 •

Copy link
Copy Markdown

Build PASSED

Started: 2018-03-26 01:25:44
Finished: 2018-03-26 01:35:21

View more information about this build on:

@AmeliaBR

Copy link
Copy Markdown
Contributor

Thanks for getting this started, Liam! Comments:

The text and tspan elements seem to be the only ones in SVG itself affected by this change.

All the SVGXXXList interfaces should now support indexed access and setting; not sure whether there are any existing tests. Other instances where the lists are exposed on element classes:

  • the animated transform lists for transform, patternTransform, and gradientTransform
  • the points and animatedPoints lists in polygons and polylines
  • requiredExtensions and systemLanguage (exposed on most elements) represented as SVGStringList

The spec only demands read-only access

animVal is read-only. baseVal is read-write.

The reference URL should be to the interface definition, not the layout notes:
https://svgwg.org/svg2-draft/single-page.html#text-InterfaceSVGTextPositioningElement
and
https://svgwg.org/svg2-draft/single-page.html#types-TermListInterface

(or the multipage versions of the URLs) (or the TR versions) (Do we have a policy on what URL should be used as a reference?)

The meta descriptions should be unique for each test file. (Also, it's length property, not length() method.)

@liamquin

liamquin commented Mar 26, 2018 via email

Copy link
Copy Markdown
Author

@svgeesus

Copy link
Copy Markdown
Contributor

Amelia is correct, animVal is read-only because it is the result of animation. but baseVal.value is read-write and further, changing it will update animVal

@svgeesus svgeesus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look good.

It would be useful to check that the lists can be edited in script (and the length changes), and also a visual test that the dx dy and rotate actally do something.

But my comment is more "these tests remind me we should also test that". The tests here are good.

@svgeesus
svgeesus merged commit 3589b85 into web-platform-tests:master Mar 31, 2018
@AmeliaBR

Copy link
Copy Markdown
Contributor

Did you make the changes you had been going to, Liam?

@liamquin

liamquin commented Apr 1, 2018 via email

Copy link
Copy Markdown
Author

@liamquin

liamquin commented Apr 1, 2018 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants