Attach (recommended) or Link to PDF file here:
[bug.pdf](https://github.com/mozilla/pdf.js/files/2886648/bug.pdf)
Also available at https://bug1529152.bmoattachments.org/attachment.cgi?id=9045439


Configuration:
- Web browser and its version: Firefox Nightly 67.0a1 (2019-02-20) (64-bit)
- Operating system and its version: Linux (64-bit Ubuntu 18.10)
- PDF.js version: whatever is bundled with current Nightly
- Is a browser extension: No (using built-in version, which is not listed in extensions)

Steps to reproduce the problem:
1. View [attached PDF](https://github.com/mozilla/pdf.js/files/2886648/bug.pdf)) in PDF.js (e.g. via Firefox Nightly built-in PDF viewer).  It's also hosted here: https://bug1529152.bmoattachments.org/attachment.cgi?id=9045439
This PDF was generated from an [HTML testcase](https://bugzilla.mozilla.org/attachment.cgi?id=9045438) that has a repeating-linear-gradient with "hard stops" (0-100px all the same color, 100-200px all the same color, & repeat)

What is the expected behavior?
There should be **solid stripes** of blue and lime.  There shouldn't be any blurring between the colors.  I think there should be 6 total stripes, though different viewers seem to disagree (Safari+Edge render 6 stripes; Chrome renders a tiny blue stripe at the top; Evince renders 3 broad stripes)  But bottom line, there should be distinct solid-colored stripes. Here's a screenshot of the Chrome built-in PDF viewer's rendering:
![image](https://user-images.githubusercontent.com/426803/53128057-c8735680-3518-11e9-82fa-f75d733bda44.png)

What went wrong?
PDF.js renders a gradual gradient from lime to blue (but mostly lime).  Here's a screenshot:
![image](https://user-images.githubusercontent.com/426803/53127935-6f0b2780-3518-11e9-8f77-6d1998150ee0.png)
*
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import {
  assert,
  FormatError,
  info,
  unreachable,
  Util,
  warn,
} from "../shared/util.js";
import { BaseStream } from "./base_stream.js";
import { ColorSpace } from "./colorspace.js";
import { MissingDataException } from "./core_utils.js";
const ShadingType = {
  FUNCTION_BASED: 1,
  AXIAL: 2,
  RADIAL: 3,
  FREE_FORM_MESH: 4,
  LATTICE_FORM_MESH: 5,
  COONS_PATCH_MESH: 6,
  TENSOR_PATCH_MESH: 7,
};
class Pattern {