-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert SVG 1.1 marker tests to reftests. #4015
Convert SVG 1.1 marker tests to reftests. #4015
Conversation
@nikosandronikos see https://travis-ci.org/w3c/web-platform-tests/builds/168782053 —several of the files in this PR have trailing whitespace; e.g., line 5 of |
@sideshowbarker No problem - any idea why the linter might not report the whitespace when run locally? |
Ok, user error I think - I have to pass the full file rather than a path. I was assuming passing a path caused all files in that path to be checked. |
Yeah, sorry, we should document that better. I think most people would reasonably expect that if you pass it a directory name as a path it will recursively check all the files in the directory. FWIW the way I personally work around it for now is just to do something like:
…which is relatively fast |
By the way I guess you already noticed (I did only just now) that along with flagging the trailing whitespace, the linter is also flagged That seems to be caused by the U+001c character in line 89 of that file. Which I guess is an illegal character in XML documents? |
@sideshowbarker I did see that. Thanks! |
w3c-test:mirror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked over all these tests and they all seem right as far as the conversion to reftests goes. I did not review them against the SVG spec, but I assume (hope) the originals went through review already somewhere? If so then I can go ahead and merge them to master. Otherwise do you have another SVG subject matter expert who can review them?
@@ -0,0 +1,23 @@ | |||
<svg width="100%" height="100%" viewBox="0 0 480 360" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that in Firefox this svg/painting/marker-007.svg
test displays nothing. Is that an expected failure? Gecko doesn’t conform to the spec on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Gecko doesn't seem to conform to the spec on that one. I can't find a bug in bugzilla, but I'll raise one once the test is reviewed and lands.
Here's the SVG 1.1 SE test suite link for reference: https://www.w3.org/Graphics/SVG/Test/20110816/harness/htmlObjectApproved/painting-marker-07-f.html
All the tests except 008 were previously reviewed as SVG 1.1 SE tests (008 was a draft still so unreviewed). But we should be reviewing that these tests still assert what is described in SVG 2. As we create the SVG 2 test suite, it will likely be myself, @AmeliaBR, and @Tavmjong who will do most of the reviewing, so I'll try to get one of them to take a look. And it would be good to give them (and me) access to merging PRs at some point. |
Review for accuracy per Spec:
I'd be okay approving the changes with the one correction to marker-005.svg. However, maybe some browser devs could run these through their testing systems to see if the anti-aliasing differences are causing false failures. If so, some fussing may be required. And of course, there are new marker features that we need to add tests for. And lots of old edge cases that these don't cover. |
Hey @AmeliaBR, thanks for the awesome review. marker-005.svg is easily fixed. I've been playing with trying to totally eliminate the anti-aliasing issues and haven't found any great solutions. Everything has some level of difference around the edges. Since this is likely to pop up in lots of our tests, I'd like to work out some sort of recommendations we can give. But it's a bit dependent on how much the differences actually matter. Regarding your other question - I don't know of any way to mark that test result accuracy is dependent on another test passing. Maybe @gsnedders has some suggestion here? It's probably not the end of the world if a false positive occurs as long as the test it's dependent on fails. |
w3c-test:mirror |
@nikosandronikos Depending on another test passing is practically inevitable (after all, at some level, all testes rely on some other test passing, even if it is just basic functionality like the As for anti-aliasing differences, we badly need to come up with a better solution for fuzzy matching, because just assuming near identical shapes render identically doesn't quite work. That said, at least in the marker-002 case I'm not sure this is anti-aliasing differences: I think it's subpixel rendering differences. In the bottom left, we start off with a |
@gsnedders anti-aliasing is just a way of representing sub-pixel coverage. In the actual test there's multiple levels of transformation happening. We have a viewBox, which defines a transform, markerWidth multiplying in another transformation, etc. So a reference with no transformations still ends up slightly different. We could massage the numbers until we get a set that gives us the least possible loss of precision, but that's quite hard, and it's going to be an ongoing problem. |
…auto to be visible
Also addressed some other minor comments made by AmeliaBR.
@AmeliaBR I have resolved anti aliasing differences (AFAICT) and addressed all your comments except the one for marker-006.svg - The test is different to marker-001.svg in that it has a |
ping @AmeliaBR in case these are still useful. |
@sideshowbarker I can't add myself as reviewer, can you help? |
@svgeesus it seems you’re now listed as a reviewer for this PR, and I also see you listed as a reviewer in https://github.com/web-platform-tests/wpt/blob/master/svg/META.yml (which triggers related tooling and notifications stuff) So I’m not sure what other buttons to push… Are you still running into to some problem? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now other reviewer comments have been addressed.
Wanting to merge because original submitter is no longer active, so any future changes are more easily done by others post-merge.
@sideshowbarker the remaining issues are
and four conflicting files (resolve conflicts is greyed out). Would like to land this long-running PR so SVG WG can take over maintaining the tests |
@svgeesus someone will need to file a new PR with these changes, given none of us can touch @nikosandronikos's repo. |
Convert SVG 1.1 marker tests to reftests.