Attach (recommended) or Link to PDF file here:
[shading_pattern.pdf](https://github.com/mozilla/pdf.js/files/1532598/shading_pattern.pdf)

Configuration:
- Web browser and its version: Firefox 57.0
- Operating system and its version: Debian GNU/Linux 9 64-bit
- PDF.js version: tried with Firefox's 1.9.583 and with online viewer 2.0.185
- Is a browser extension: no

Steps to reproduce the problem:
1. Open the attached file with the online viewer https://mozilla.github.io/pdf.js/web/viewer.html

What is the expected behavior? (add screenshot)
![image](https://user-images.githubusercontent.com/11061462/33626267-d9a57dee-d9d8-11e7-8712-cfa17c038259.png)
(Image captured from Adobe Reader CS.) The shading needs to be inside the letters.

What went wrong? (add screenshot)
![image](https://user-images.githubusercontent.com/11061462/33626285-eaabd462-d9d8-11e7-94e2-96480b57750d.png)
The shading seems to be displaced and upside-down, for it does not cover all the characters of the word.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

for (j = 0; j < thisChunkHeight; j++) {
        const srcDiff = srcLength - srcPos;
        let k = 0;
        const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;
        const kEndUnrolled = kEnd & ~7;
        let mask = 0;
        let srcByte = 0;
        for (; k < kEndUnrolled; k += 8) {
          srcByte = src[srcPos++];
          dest32[destPos++] = srcByte & 128 ? white : black;
          dest32[destPos++] = srcByte & 64 ? white : black;
          dest32[destPos++] = srcByte & 32 ? white : black;
          dest32[destPos++] = srcByte & 16 ? white : black;
          dest32[destPos++] = srcByte & 8 ? white : black;
          dest32[destPos++] = srcByte & 4 ? white : black;
          dest32[destPos++] = srcByte & 2 ? white : black;
          dest32[destPos++] = srcByte & 1 ? white : black;
        }
        for (; k < kEnd; k++) {
          if (mask === 0) {
            srcByte = src[srcPos++];
            mask = 128;
          }
          dest32[destPos++] = srcByte & mask ? white : black;
          mask >>= 1;
        }
      }
      
      while (destPos < dest32DataLength) {
        dest32[destPos++] = 0;