RESOLVED FIXED 25403
Gradient Fill of text not positioned properly
https://bugs.webkit.org/show_bug.cgi?id=25403
Summary Gradient Fill of text not positioned properly
Jeff Schiller
Reported 2009-04-25 20:01:27 PDT
The attached test case shows a bug in WebKit: The green text should almost completely obscure the red text. However, the red text is visible in Safari 4 at a different size and position than the green text. Note that the red text is actually a gradient. If the gradient was replaced with a solid color (fill="red"), then this problem is no longer present. This may be related to Bug 25402.
Attachments
Test Case showing the problem (805 bytes, image/svg+xml)
2009-04-25 20:01 PDT, Jeff Schiller
no flags
Add text gradient test to cover (3.90 KB, patch)
2009-04-28 15:10 PDT, Eric Seidel (no email)
simon.fraser: review+
Jeff Schiller
Comment 1 2009-04-25 20:01:59 PDT
Created attachment 29795 [details] Test Case showing the problem
Gavin Sherlock
Comment 2 2009-04-26 12:44:44 PDT
I don't see a problem with the test case in r42858
Dirk Schulze
Comment 3 2009-04-26 23:05:13 PDT
*** Bug 25402 has been marked as a duplicate of this bug. ***
Dirk Schulze
Comment 4 2009-04-26 23:08:55 PDT
The wrong behavior is caused by wrong values of the drawing rect. eseidel improved boundingBox's in the last days. It should work now. Can you test it again with the latest nightly please?
Eric Seidel (no email)
Comment 5 2009-04-28 15:03:02 PDT
Wow. This is much better after http://trac.webkit.org/changeset/42950. Would you consider this fixed, Jeff? Or do we have more work to do here? Our rendering looks as good (or better) than FF and Opera.
Eric Seidel (no email)
Comment 6 2009-04-28 15:10:12 PDT
Created attachment 29866 [details] Add text gradient test to cover 5 files changed, 43 insertions(+), 0 deletions(-)
Eric Seidel (no email)
Comment 7 2009-04-28 15:14:06 PDT
Thanks for the awesome test case. Committing to http://svn.webkit.org/repository/webkit/trunk ... M LayoutTests/ChangeLog A LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.checksum A LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.png A LayoutTests/platform/mac/svg/text/text-gradient-positioning-expected.txt A LayoutTests/svg/text/text-gradient-positioning.svg Committed r42966 We might still be using repaintRectInLocalCoordinates() in a few places where we should be using objectBoundingBox(), so related test cases could fail. But this nice test case you provided "passes" now, as far as I can tell. Thanks for the great test case! (You'll see that I changed the text a little to make it more self-documenting, but otherwise landed it as-is.)
Jeff Schiller
Comment 8 2009-04-28 16:10:06 PDT
Looks great to me in nightly from 4/25. Thanks!
Note You need to log in before you can comment on or make changes to this bug.