Closed
Bug 1177726
Opened 10 years ago
Closed 10 years ago
Stroke text with shadow on canvas is cut off
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: smaren, Assigned: milan)
References
Details
(Keywords: regression, reproducible)
Attachments
(1 file, 3 obsolete files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0
Build ID: 20150511103818
Steps to reproduce:
1: apply shadow with a small shadowBlur (http://jsfiddle.net/nnqc8/344/)
2: call stroke text
Actual results:
The text is cut off on all sides.
Expected results:
The stroked text should look as if there was no shadow.
http://jsfiddle.net/nnqc8/345/ - identical setup but without shadow color set.
![]() |
||
Comment 1•10 years ago
|
||
Pushlog: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=07f04ff0b782&tochange=71d1333ca77f
Regressed by:71d1333ca77f Anthony Jones — Bug 591358 - Part 3: Lazy creation of the draw target in order to save memory and improve performance. r=roc
Blocks: 591358
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression,
reproducible
Version: 38 Branch → 18 Branch
Assignee | ||
Comment 2•10 years ago
|
||
If it was regressed by that, it's too long ago, and sort of incidental. Seems like we just don't account for the shadow in CanvasRenderingContext2D::DrawOrMeasureText; either nsBidiPresUtils::ProcessText needs to know about it, or we need to adjust the values it gives us back.
OS: Unspecified → All
Assignee | ||
Comment 3•10 years ago
|
||
I take that back; increasing the bounding box returned by nsBidiPresUtils::ProcessText does make the problem go away, but I don't think that's the actual problem.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → milan
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8630592 -
Flags: review?(jmuizelaar)
Comment 5•10 years ago
|
||
Add a reftest.
Assignee | ||
Comment 6•10 years ago
|
||
Added a reftest.
Attachment #8630592 -
Attachment is obsolete: true
Attachment #8630592 -
Flags: review?(jmuizelaar)
Attachment #8630635 -
Flags: review?(jmuizelaar)
Comment 7•10 years ago
|
||
Comment on attachment 8630635 [details] [diff] [review]
Inflate the bounds based on stroke options before creating adjusted target. r=jmuizelaar
Review of attachment 8630635 [details] [diff] [review]:
-----------------------------------------------------------------
Call the test 1177726-text-stroke-bounds.html or something like that which gives an indication of what it's testing.
Attachment #8630635 -
Flags: review?(jmuizelaar) → review+
Assignee | ||
Comment 8•10 years ago
|
||
(In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> ...
> Call the test 1177726-text-stroke-bounds.html or something like that which
> gives an indication of what it's testing.
All the other tests are just bug numbers, which is why I named these the way I did. Hmm.
Comment 9•10 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #8)
> (In reply to Jeff Muizelaar [:jrmuizel] from comment #7)
> > ...
> > Call the test 1177726-text-stroke-bounds.html or something like that which
> > gives an indication of what it's testing.
>
> All the other tests are just bug numbers, which is why I named these the way
> I did. Hmm.
Yeah, that doens't make it a good practice. dom/canvas/test/reftest is also probably a better place to put it.
Assignee | ||
Comment 10•10 years ago
|
||
Already had try running with the old code, will rename/move the reftest and land
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3def327b3bc0
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e8771c4935ca
Assignee | ||
Comment 11•10 years ago
|
||
Moved the test to dom/canvas instead.
Attachment #8630635 -
Attachment is obsolete: true
Attachment #8631053 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 12•10 years ago
|
||
Keywords: checkin-needed
Comment 13•10 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=11512920&repo=mozilla-inbound
Flags: needinfo?(milan)
Comment 14•10 years ago
|
||
Assignee | ||
Comment 15•10 years ago
|
||
Good thing we had a test; this change didn't actually break anything, but the test failure is showing that I didn't fix the bug on all platforms. +1 for automated tests and Jeff reminding me to put one in.
Flags: needinfo?(milan)
Assignee | ||
Comment 16•10 years ago
|
||
Android seemed to have "half" of this bug to start - the left and bottom were "clipped", but the top...
Assignee | ||
Comment 17•10 years ago
|
||
I made an assumption about the test failure based on the Android results being different before the fix - looking at the actual result of the failed test, it turns out it's just aliasing errors away from the borders, likely the white shadow, so, the fix actually works. Fuzz those few pixels away.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=73ecd58fa2df
Attachment #8631053 -
Attachment is obsolete: true
Attachment #8632149 -
Flags: review+
Comment 19•10 years ago
|
||
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•