| Summary: | [CSS Shapes] the sandbag JS utility code isn't producing the correct expected result in the shape-image gradient tests | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Rebecca Hauck <rhauck> | ||||||
| Component: | Tools / Tests | Assignee: | Bem Jones-Bey <bjonesbe> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bjonesbe, buildbot, commit-queue, rniwa | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Rebecca Hauck
2014-08-13 19:09:12 PDT
I don't think this is a fault of the JS utility code. I replaced the JS code in the expected file with a circle() shape outside (in the 001 test), and the JS code and the circle() both give the same shape that is different from the shape created by the gradient. Examining the shape drawn by the inspector for both the gradient shape case and the circle shape case, it looks to me like the gradient creates a shape, that while circular, has a much rougher contour, so there are places where it is farther our and places where it is closer in than the clean circle. It may make the most sense to use math like in the JS utility to figure out where the text should be positioned in the ideal case, and then have a delta that it can vary and just check that the text is positioned within that delta. (Making it a testharness test instead of a ref test.) Created attachment 241191 [details]
Patch
Created attachment 241193 [details]
Patch
Comment on attachment 241193 [details]
Patch
r=me
Comment on attachment 241193 [details] Patch Clearing flags on attachment: 241193 Committed r175755: <http://trac.webkit.org/changeset/175755> All reviewed patches have been landed. Closing bug. |