Closed Bug 1238795 Opened 7 years ago Closed 7 years ago

Images embedded in PDF overflow text areas


(Core :: Graphics, defect, P3)

46 Branch



Tracking Status
firefox44 --- unaffected
firefox45 --- unaffected
firefox46 + fixed
firefox-esr38 --- unaffected


(Reporter: emceeaich, Assigned: lsalzman)




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


(4 files)

Open PDF at, 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?
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:
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 "" 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:

This patch is just the same as the upstream change.
Assignee: nobody → lsalzman
Attachment #8708040 - Flags: review?(jmuizelaar)
Attachment #8708040 - Flags: review?(jmuizelaar) → review+
No test? :(
Flags: needinfo?(lsalzman)
Flags: in-testsuite?
Closed: 7 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.