-
Notifications
You must be signed in to change notification settings - Fork 27
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
[motion-1] Add new tests for <basic-shape> #327
Comments
@BorisChiou @nmoucht FYI |
Gecko doesn't support basic shape for motion, so I'm OK with landing these tests (and may verify again when I work on the gecko bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1598156) |
In aggregate: this wpt.fyi query. |
@gsnedders @nt1m can either of you get a position for WebKit on this? |
I just noticed these two tests: Their expectations (i.e. xxx-ref.html) seem incorrect to me. Per css-shape spec (https://drafts.csswg.org/css-shapes-1/#typedef-shape-radius), for
So they are equal to Also, I noticed there are some floating-point numbers used in the xxx-ref files, e.g. offset-path-shape-ellipse-003-ref.html. I may update thest tests to avoid using so many floating-point numbers in the xxx-ref files. Also, I may add more fuzzy expectations in these tests (for (Note: I expect the fuzzy happens because Gecko uses a different way to handle sub-pixel anti-alias, and the arc calculation makes the angles of the tangent vectors have some minor differences. However, the visual results are almost identical.) |
Hi! Thanks for your comment!
That's why the box ends up at the containing block's top left corner with zero radius, only moved by -50px to match it's center.
|
I deleted my previous comment because now I understand the reason. For |
No, not quite. It makes it be the top left of the transformed element (its pre-transform position). Now, in this case, that happens to also be the top left of the containing block, because that's just how the element is positioned. Then we resolve closest-side against the containing block and get a 0 radius. If the square had a margin on it, or the container had padding, or anything to not make those two corners coincident, then we'd get a non-zero radius out of it. (And btw, I had some pending edits from w3c/fxtf-drafts#504 that I've just applied, so it would be good to get some tests for that as well - offset-position can now be |
Thanks for the "NOTE" to explain the definition of the box for |
If it makes you feel better, I actually wrote that text before seeing your comment; it just felt like something that should be made more explicit. ^_^ |
I don't have any objections to adding these tests. |
thanks all, closing the issue |
Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf
I have labeled the 17 issues in web-platform-tests/wpt-metadata#4313. Note that offset-path-shape-circle-005.html and offset-path-shape-ellipse-005.html were not labeled, because they weren't discussed above. |
Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4601330 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1155131}
Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4601330 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1155131}
Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4601330 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1155131}
…rect, a=testonly Automatic update from web-platform-tests Remove wpt test for offset-path as incorrect Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4601330 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1155131} -- wpt-commits: 12c162cd662feae268a9f69cc1f8ddde44cf86d8 wpt-pr: 40441
…rect, a=testonly Automatic update from web-platform-tests Remove wpt test for offset-path as incorrect Resolved by: web-platform-tests/interop#327 Change-Id: Ic9ea1cccc454feb1c99f8dbe87357ef0a4b56ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4601330 Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1155131} -- wpt-commits: 12c162cd662feae268a9f69cc1f8ddde44cf86d8 wpt-pr: 40441
BTW, I just noticed offset-path-shape-xywh-002.html may be incorrect. It seems Blink uses the height of its reference box to resolve the percentage value of the width of the transformed box: Therefore, I'm updating this test file in Gecko's bug right now (https://bugzilla.mozilla.org/show_bug.cgi?id=1786160). |
Test List
offset-path-shape-circle-001.html
offset-path-shape-circle-002.html
offset-path-shape-circle-003.html
offset-path-shape-circle-004.html
offset-path-shape-ellipse-001.html
offset-path-shape-ellipse-002.html
offset-path-shape-ellipse-003.html
offset-path-shape-ellipse-004.html
offset-path-shape-inset-001.html
offset-path-shape-inset-002.html
offset-path-shape-polygon-001.html
offset-path-shape-polygon-002.html
offset-path-shape-polygon-003.html
offset-path-shape-rect-001.html
offset-path-shape-rect-002.html
offset-path-shape-xywh-001.html
offset-path-shape-xywh-002.html
Rationale
There is only one test to cover the functionality of the basic-shapes for motion path. I propose to add these tests and delete offset-path-shape.html as it's incorrect (the sizes of the inset are resolved against its own size, not the reference box).
The text was updated successfully, but these errors were encountered: