WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
88772
Viewbox Scaling Exposes Incorrect Transformations on Text Gradient Fills
https://bugs.webkit.org/show_bug.cgi?id=88772
Summary
Viewbox Scaling Exposes Incorrect Transformations on Text Gradient Fills
Dominik Röttsches (drott)
Reported
2012-06-11 03:03:11 PDT
When using a viewbox attribute that results in upscaling, text gradient fills are rendered incorrectly.
Attachments
RefTests
(2.41 KB, patch)
2012-06-11 04:11 PDT
,
Dominik Röttsches (drott)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Dominik Röttsches (drott)
Comment 1
2012-06-11 04:11:02 PDT
Created
attachment 146825
[details]
RefTests
Dominik Röttsches (drott)
Comment 2
2012-06-11 04:14:12 PDT
Comment on
attachment 146825
[details]
RefTests This reftest shows the issue. The gradient should scale from red over green to blue over the size of the text, same in both cases - with viewbox and without.
Dominik Röttsches (drott)
Comment 3
2012-06-18 07:51:39 PDT
The issue seems to be with identifying the bounding box of small-scale text. Origin of bounding box for the text in LayoutTests/svg/transforms/viewbox-text-fill-gradient.html is 0,0 - extents are 1,1 - while these should be precise float values.
Dominik Röttsches (drott)
Comment 4
2012-06-18 09:07:07 PDT
In my understanding, the rounding happens in void SVGRootInlineBox::layoutRootBox(). Using LayoutUnits here, would only improve the results but not fix the issue completely - we need higher precision for the text bounding boxes.
Dominik Röttsches (drott)
Comment 5
2012-06-18 09:11:03 PDT
Probably same root cause as
bug 75781
.
Dominik Röttsches (drott)
Comment 6
2013-01-25 05:31:37 PST
This issue persists even after landing patch from
bug 107771
.
Ahmad Saleem
Comment 7
2023-01-21 06:44:24 PST
I took the test case from the attached patch and turned into JSFiddle and also added missing </rect>: JSFiddle -
https://jsfiddle.net/9z4Ljr7y/show
Safari 16.2, Safari Technology Preview 161, Chrome Canary 111 and Firefox Nightly 111 are matching other, do we need to track anything else? Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug