Open Bug 1182531 Opened 9 years ago Updated 6 months ago

Make reftest output deterministic when an error is detected in the image data

Categories

(Core :: Graphics: ImageLib, defect)

defect

Tracking

()

People

(Reporter: seth, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Right now, if an error is detected in an image's data (as opposed to its header), how we render the image depends on when we happen to detect the error. This is because layout doesn't do anything to guarantee that the two cases are the same.

We need to fix this, probably by being a little smarter about how we handle DrawResult::BAD_IMAGE. I haven't debugged in detail exactly what causes the rendering differences, but here's one example in practice: the image/test/reftest/ico/ico-bmp-corrupted/ family of tests contains several tests where an error is only detected in the image data. I've modified those tests to be more robust, but if the bad image is loaded directly into an <img> element instead of being sync decoded first, then it's nondeterministic whether a white region will be painted where the <img> element should be (probably indicating that the background layer was clipped out) or whether the <img> element's background layer (a CSS background-color) will be painted instead.
Depends on: 1182533
Whiteboard: [gfx-noted]
Severity: normal → S3
See Also: → 1860627
See Also: → 1645576
You need to log in before you can comment on or make changes to this bug.