Closed Bug 1238795 Opened 6 years ago Closed 6 years ago

Images embedded in PDF overflow text areas

Categories

(Core :: Graphics, defect, P3)

46 Branch
x86_64
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox44 --- unaffected
firefox45 --- unaffected
firefox46 + fixed
firefox-esr38 --- unaffected

People

(Reporter: emceeaich, Assigned: lsalzman)

References

()

Details

(Keywords: regression, Whiteboard: [pdfjs-c-rendering][gfx-noted])

Attachments

(4 files)

Open PDF at http://file.mf.cz/896/4-01-16-E15-0801.pdf, go to page six and see that the image of the auto assembly line overflows into text.
Testcase WFM on Win10 and Ubuntu 15.10 in a VM. Emma, are you able to bisect this down with mozregression? http://mozilla.github.io/mozregression/
Flags: needinfo?(ehumphries)
Target Milestone: Firefox 46 → ---
Looks like it affects only Skia. Suspected commits point to bug 1082598.

12:02.78 LOG: MainThread Bisector INFO Last good revision: d8e260e1535f0ff3877b21d6846380dedf449453
12:02.78 LOG: MainThread Bisector INFO First bad revision: 6630a176477ef903dcf3057db755abc43ba5018d
12:02.78 LOG: MainThread Bisector INFO Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d8e260e1535f0ff3877b21d6846380dedf449453&tochange=6630a176477ef903dcf3057db755abc43ba5018d
Blocks: 1082598
Flags: needinfo?(ehumphries) → needinfo?(lsalzman)
[Tracking Requested - why for this release]: Visual regression when opening PDFs on platforms using the Skia backend.
Component: PDF Viewer → Graphics
Product: Firefox → Core
Whiteboard: [pdfjs-c-rendering] → [pdfjs-c-rendering][gfx-noted]
The smaller test case demonstrates and clipping on JPEG image is not working.
Preliminary investigation: this only occurs when Skia canvas is enabled. If "gfx.canvas.azure.accelerated" is true, for some reason the image fails to clip. If this pref is set to false (using the software Skia backend), then the image is properly clipped and does not cause the issue.

So it would seem that somewhere, somehow, the clipping is either not being set or buggy for the Skia GPU case.

I will see if I can find out more tomorrow.
Flags: needinfo?(lsalzman)
This is actually a bug in Skia. If you use drawBitmapRect on a SkGpuDevice, and supply a bitmap that is not GPU-ified, then it fails to update the clipping on the device before drawing.

I filed an upstream change here: https://codereview.chromium.org/1584073007/

This patch is just the same as the upstream change.
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Attachment #8708040 - Flags: review?(jmuizelaar)
Attachment #8708040 - Flags: review?(jmuizelaar) → review+
No test? :(
Flags: needinfo?(lsalzman)
Flags: in-testsuite?
https://hg.mozilla.org/mozilla-central/rev/22010c7e2ed1
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Flags: needinfo?(lsalzman)
Attachment #8708441 - Flags: review?(ydelendik)
Comment on attachment 8708441 [details] [diff] [review]
add reftest to verify that canvas drawImage respects clipping

Review of attachment 8708441 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thanks.
Attachment #8708441 - Flags: review?(ydelendik) → review+
Woo, thanks :)
Flags: in-testsuite? → in-testsuite+
Tracking for 46 since this was a recent regression. Tests, yay!
Emma, first fixed bug in-product that you have found and filed. Bugmaster power!
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #18)
> Emma, first fixed bug in-product that you have found and filed. Bugmaster
> power!

/me curtsies and fist bumps
You need to log in before you can comment on or make changes to this bug.