Closed Bug 1126163 Opened 5 years ago Closed 5 years ago

Fix reftest image-object-position-with-background-1.html to not require fuzzy annotation, when imagelib single-color optimization is disabled

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox37 --- fixed
firefox38 --- fixed

People

(Reporter: seth, Assigned: dholbert)

References

Details

Attachments

(1 file)

In bug 1126146, which disables the single-color optimization for reftests, |image-object-position-with-background-1.html| needed a fairly big fuzzy factor on OS X due to blurriness. It'd be nice to fix that.

To see what the failure looks like, look at the OS X reftest failures in this try job:

https://tbpl.mozilla.org/?tree=Try&rev=77de6bafe558
Component: ImageLib → Layout: Images
Huh -- so the issue is that the last square (a <video>) in the *reference case* seems to have a row of fuzzy pixels along the edge of the poster-image.  (like the poster image is positioned 1/2 pixel too far to the bottom-right)

As noted in bug 1126146, it's possible that this has something to do with the fact that the reference case shrinks the image (from 32x32 to 27x27) instead of leaving it at 32x32 and clipping it.  I'll see if clipping it instead (in an overflow:hidden div) helps here.
Flags: needinfo?(dholbert)
Version: unspecified → Trunk
Attached patch possible fixSplinter Review
Here's a possible fix.

Try run on Mac (with Seth's patch from his Try run in comment 0), to make sure I can trigger the failure so I know I'm actually testing what I want to be testing:
 https://treeherder.mozilla.org/#/jobs?repo=try&revision=836e7a41beb7
 (Expected orange^)

Try run on all platforms, with my attached patch layered on top of that:
 https://treeherder.mozilla.org/#/jobs?repo=try&revision=0e3fd8b8ecfe
 (hopefully green?^)
Flags: needinfo?(dholbert)
Comment on attachment 8555402 [details] [diff] [review]
possible fix

Yay - the first Try run does indeed show the test-failure on MacOS, along with the unrelated 846144-1.html test-failure, and the second Try run *only* has the 846144-1.html failure.

So it looks like this patch does indeed fix the reference-case to render more reliably like the testcase (and not have a weird half-pixel rounding issue at the upper-left edge of <video>'s poster-image).
Attachment #8555402 - Flags: review?(seth)
Comment on attachment 8555402 [details] [diff] [review]
possible fix

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

Looks good!
Attachment #8555402 - Flags: review?(seth) → review+
Summary: Remove fuzzy annotation from image-object-position-with-background-1.html → Fix reftest image-object-position-with-background-1.html to not require fuzzy annotation, when imagelib single-color optimization is disabled
Thanks! I'll land this later today, after the b2g jobs on the Try run have completed.

This should mean that you no longer need to add a fuzzy annotation for this test, in your patch in bug 1126146.

Given that (&  given that that bug's not quite landing-ready yet -- at least, it's got a pending review request), I'm swapping the dependency order.  Hopefully that makes sense.
Assignee: nobody → dholbert
Blocks: 1126146
Status: NEW → ASSIGNED
No longer depends on: 1126146
I don't mean to hijack this bug =), but I'm curious if we might want to do something similar for |image-object-position-with-background-2.html|. It also fails if we don't optimize surfaces. (This is the Moz2D sense of surface optimization, now, not the single-color optimization.)

Check out the Windows 8 x64 debug reftest failure here:

https://tbpl.mozilla.org/?tree=Try&rev=a619a8707963
That is a different sort of failure, and I don't think this same strategy would work there.

(In particular, in that failure, the testcase is what's rendering badly (non-solid-blue), instead of the reference case.  And it's a bit more mysterious-looking, too -- gradual fadeout, at the page-boundary [which is in the middle of a sliced-up image].)

So, let's track that in a separate bug, if you don't mind.
(The image-object-position-with-background-2.html failure seems more clearly like a real bug in our code somewhere, too, and not something we should hack around in the reftest.)
Flags: needinfo?(dholbert)
I filed bug 1126530 for the image-object-position-with-background-2.html failure discussed in comment 6, 7, and 8.
Awesome. Thanks for looking into these failures! For some reason these tests are good at shining light on strange issues that other tests don't seem to hit, which is a good thing.
See Also: → 1126530
https://hg.mozilla.org/mozilla-central/rev/53f5af7b9bf0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Uplifted to Aurora to hopefully fix the permafail introduced by bug 1126146.
https://hg.mozilla.org/releases/mozilla-aurora/rev/8f5501a49164
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.