Closed Bug 1255870 Opened 7 years ago Closed 7 years ago

layout/reftests/bugs/542605-hidden-unscrollable-ref.xul fails with skia content on OS X

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: mchang, Assigned: mchang)

Details

Attachments

(3 files)

This is failing because on the testcase, the surface we draw the text onto is considered transparent. This causes skia to fallback to grayscale AA instead of subpixel AA. On the reference test, the surface is considered opaque and skia renders the text as subpixel AA.

The test passes with the CG backend because CG can render subpixel AA text on partially transparent backgrounds. On Windows, D2D only renders subpixel AA text on opaque surfaces and falls back to grayscale on transparent text. However, on Windows, both the test and reference render text on an opaque surface.

On the testcase on mac, layout is detecting we have a transparent surface because we create an nsThemedBackground which is expanded past the visible region[1]. On Windows, we don't do this [2]. The reference test case adds a clip to prevent this from happening due to overflow: -moz-hidden-unscrollable;. The test case does not have a root clip on the frame due to being a XUL document. Normal HTML will have a root clip on the frame.

After speaking with :mstange, we can delete this test case instead of trying to fix it since XUL should be dying. 


[1] https://dxr.mozilla.org/mozilla-central/source/widget/cocoa/nsNativeThemeCocoa.mm?case=true&from=nsNativeThemeCocoa.mm#3230
[2] https://dxr.mozilla.org/mozilla-central/source/widget/windows/nsNativeThemeWin.cpp?case=true&from=nsNativeThemeWin.cpp#2267
In case someone wants to debug down the line.
Comment on attachment 8729664 [details] [diff] [review]
Delete reftests/bugs/542605-hidden-unscrollable-ref.xul

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

I don't consider this test worthwhile and agree that it should be removed.

This test was introduced by Jeff in order to test clip restoration on a cairo context. We need to restore to a "no clip" state. But this test achieves the "no clip" state in a way that's not used anywhere else in Firefox and runs into problems that are unrelated to what the test is testing.
I'm fairly confident that we have increased our test coverage sufficiently over the last 6 years that we would now catch a similar problem in some other test.
Attachment #8729664 - Flags: review?(mstange) → review+
https://hg.mozilla.org/mozilla-central/rev/0bf6e7b07ad2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.