Closed Bug 691780 Opened 13 years ago Closed 13 years ago

CSS background with color and image cause stripping (or fail) when used with opacity

Categories

(Core :: Graphics, defect)

7 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 689962

People

(Reporter: byoung, Assigned: mattwoodrow)

References

()

Details

(Keywords: qawanted, regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Build ID: 20110928134238

Steps to reproduce:

I built this simple test HTML/CSS page to demonstrate that Firefox 7 isn't applying the background color and image correctly when coupled with the opacity property:
http://jsfiddle.net/4bMFa/1/


Actual results:


The result should be a solid yellow-green background in the bottom right corner (the color is the result of a div with a #000 and black image background overlaying a yellow page). However, in Firefox 7 there is a yellow horizontal stripe visible. You can change the CSS to use repeat-y instead of repeat-y and the stripe is then vertical.

You can get it to work by dropping the color from the #overlay's background and changing the repeat from "repeat-x" to just "repeat"

However, if you drop only the color, you'll get a dark strip and a mostly yellow page. There doesn't seem to be a way to get the image, background color, and the opacity to work correctly in Firefox 7.


Expected results:

The whole page should be an ugly green-ish yellow color caused by the black, 50% opaque #overlay div overlaying the yellow page. There shouldn't be a horizontal stripe across the page.
Just found that if you set the repeat on #overlay to "no-repeat" you'll see a rectangle the shape of the background image knocked out of the #overlay div.
This seems to work in Seamonkey trunk on win32 if I compare the right result window with Opera 11.5.

Could you please try it again without the hardware acceleration ?
The fastest way to do this only temporary is to just start Firefox in the Firefox safemode
http://support.mozilla.com/en-US/kb/Safe+Mode
Just tried it in Safe Mode with the same settings and it still breaks on my system (Mac OS 10.6.8 & FF 7.0.1). That same test code, however, works fine on a Windows 7 netbook I have here running FF 7.0.1, so it seems to be a Mac OS X-only issue.
Component: General → Graphics
Keywords: qawanted
Product: Firefox → Core
QA Contact: general → thebes
I can confirm this with both recent Aurora and 'nightly' builds. With both repeat-x and repeat-y there is a yellow strip roughly the size of the image. If the background-repeat keyword is omitted, the image just doesn't show.

That seems to happen only with one-colour black png images, though. If the image is _not_ black - rgb(0,0,0) – it works correctly.

Hardware acceleration on/off doesn't seem to make a difference. Fx 6.0 is not affected.
Tested on 10.6.8.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Could be related to bug 689962
Can you try to find a regression range ?
Attached file test case
The 2 squares should be identical.

One thing I noticed while writing the test case: when slowly resizing the window, the background-image briefly flickers on/off.
could be also bug 647560
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #9)
> Bug 701528 maybe? is this fixed on trunk now?

No. 11.0a1 (2011-11-21) - rv 78cd6a30e250 still shows the same issue with the attached testcase.
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #11)
> Mac only? WFM on Windows.

So far nobody has claimed otherwise.
It does seem likely to be bug 647560, but I don't have a usable Mac machine around. Maybe Matt can help.
Assignee: nobody → matt.woodrow
I can reproduce this, doesn't appear to be accelerated layers dependent. Will take a look.
This appears to be a duplicate of bug 689962, the patch there fixes this for me.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: