Hardware Acceleration Causes Rendering Issue with Background Attachment "Fixed"




Layout: View Rendering
6 years ago
5 years ago


(Reporter: Dominic, Assigned: roc)


({verified-aurora, verified-beta})

Windows 7
verified-aurora, verified-beta
Dependency tree / graph

Firefox Tracking Flags

(firefox8- wontfix, firefox9+ fixed, firefox10+ fixed)


(Whiteboard: [inbound][qa!], URL)


(7 attachments)



6 years ago
When using background-attachment: fixed, a white gap appears at the top of the image. This has been previously filed under https://bugzilla.mozilla.org/show_bug.cgi?id=677095, but as of Firefox 8 I still see the issue. Furthermore, the work around described here (https://bugzilla.mozilla.org/show_bug.cgi?id=677095#c47) no longer seems to work. Here is a simple test case: http://mygemologist.com/bg-fixed-test.html.

Note, I have also noticed some strange behavior with javascript animations in conjunction with this, but I'm still trying to put together a test case for that. I will update the main test case if I come up with one.

Comment 1

6 years ago
From a quick look with Magnifier, I noticed it looked like an alpha issue with the DWM (Magnifier uses smooth scaling for DWM content, and nearest neighbour for everything else, and the line was smoothly scaled)

I played around with the window colour settings (Disabled transparency and made it bright red), and the lines (I could see them at the top and bottom) turned red in Firefox. So it looks like Firefox is telling the DWM that there's a 1px transparent area between the web page content and the toolbars (I think)

I'm using Firefox 8 on Windows 7 (x64)

Comment 2

6 years ago
Created attachment 573722 [details]
DWM colour showing through.

I think I was wrong in my last comment, It's not that Firefox is giving the wrong bounds to the DWM, it's that the 2px border the DWM draws between transparent and opaque content is bleeding through the content Firefox draws on top of it.

Comment 3

6 years ago
Ok, so I put together another version of the test case to show the issues I was seeing with javascript animations. I know the code and layout is a bit confusing (it's borrowed from a site I'm working on), but just hover over any of the top nav items to see what I'm talking about. On my system (Windows 7, Firefox 8), the entire top area disappears while the animation is running. Like the pixel gap, this only happens when hardware acceleration is enabled.

See new test case here: http://mygemologist.com/bg-fixed-test-2.html

Comment 4

6 years ago
I have the same issue, There's a white gap on top & bottom of my transparent png background. Behind that is a fixed background. Problem goes away when I change background from fixed to scroll or turn off hardware acceleration.


Comment 5

6 years ago
Created attachment 574086 [details]
pic of bug
roc, could this also be bug 686121?
Component: Layout → Layout: View Rendering
Depends on: 686121
QA Contact: layout → layout.view-rendering
I can reproduce this one!
Created attachment 574218 [details]
standalone test case

The repeated image should extend all the way to the edges of the viewport. When the bug is present, there's a white or light-colored border where the image touches the edge of the viewport.
Assignee: nobody → roc
Created attachment 574231 [details] [diff] [review]

This does work after all (I was building the wrong tree before!)
Attachment #574231 - Flags: review?(bas.schouten)
Comment on attachment 574231 [details] [diff] [review]

Review of attachment 574231 [details] [diff] [review]:

It's a shame the generated code uses up one more instruction, but it shouldn't matter too much.
Attachment #574231 - Flags: review?(bas.schouten) → review+
Blocks: 686121
No longer depends on: 686121
Blocks: 701363
Whiteboard: [inbound]


6 years ago
Duplicate of this bug: 700050
Blocks: 677095
We will want to fix this on Aurora and Beta.
status-firefox10: --- → affected
status-firefox8: --- → affected
status-firefox9: --- → affected
tracking-firefox10: --- → ?
tracking-firefox8: --- → ?
tracking-firefox9: --- → ?
Ever confirmed: true
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Comment on attachment 574231 [details] [diff] [review]

Review of attachment 574231 [details] [diff] [review]:

This is a pretty bad regression and we should fix it ASAP.
Attachment #574231 - Flags: approval-mozilla-beta?
Attachment #574231 - Flags: approval-mozilla-aurora?


6 years ago
Duplicate of this bug: 675497
Duplicate of this bug: 686121


6 years ago
status-firefox8: affected → wontfix
tracking-firefox10: ? → +
tracking-firefox8: ? → -
tracking-firefox9: ? → +

Comment 18

6 years ago
Comment on attachment 574231 [details] [diff] [review]

[triage comment]
Bad regression, we should fix. Approved for beta and aurora. Please land as soon as possible.
Attachment #574231 - Flags: approval-mozilla-beta?
Attachment #574231 - Flags: approval-mozilla-beta+
Attachment #574231 - Flags: approval-mozilla-aurora?
Attachment #574231 - Flags: approval-mozilla-aurora+
Duplicate of this bug: 701363
status-firefox10: affected → fixed
status-firefox9: affected → fixed

Comment 21

6 years ago
The following may be more related to bug#700050 but that bug is marked as a duplicate of this bug.

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111115 Firefox/11.0a1

I still encounter this glitch with Foxit Reader's PDF plugin after bug#701528 lands. 
(Foxit Reader Version:, Foxit Reader Plugin for Mozilla

Step to reproduce:
1. Install the latest version of Foxit Reader and its plugin for Firefox;
2. Open any PDF file in Nightly after 20111115 build;
3. Shrink browser width. 
(Or alternatively, without shrinking browser width, adding
#content,#appcontent,#content>tabbox>tabpanels {-moz-appearance:none !important;}
in userContent.css )

Comment 22

6 years ago
Oops, I mean userChrome.css .


6 years ago
Blocks: 699987


6 years ago
Duplicate of this bug: 702419
Whiteboard: [inbound] → [inbound][qa+]
Created attachment 578567 [details]
Foxit plugin

I've verified this on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20100101 Firefox/9.0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a2) Gecko/20111201 Firefox/10.0a2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111201 Firefox/11.0a1

http://mygemologist.com/bg-fixed-test.html and http://mygemologist.com/bg-fixed-test-2.html seems to look fine, but a white line is still seen when opening pdfs documents, both with Foxit and Adobe reader plugins. See screenshots attached. What do you think ?
Created attachment 578568 [details]
Adobe reader plugin
Probably file a new bug for that issue.


6 years ago
Duplicate of this bug: 707505

Comment 28

6 years ago
Using the testcase form the attachment and also the URL, the issue is not reproducing anymore on:

Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20100101 Firefox/9.0beta 4
Mozilla/5.0 (Windows NT 6.1; rv:10.0a2) Gecko/20111204 Firefox/10.0a2
Mozilla/5.0 (Windows NT 6.1; rv:11.0a1) Gecko/20111204 Firefox/11.0a1

Setting resolution to Verified Fixed
Keywords: verified-aurora, verified-beta
Whiteboard: [inbound][qa+] → [inbound][qa!]

Comment 29

6 years ago
Glad to hear this is fixed!  Since the bug title is similar but not precisely what I am seeing, I want to simply contribute the following.  If anyone who has the fix could please confirm that this is addressed, I would appreciate it.

My use case is a fixed-position <div> element that gains an unwanted white border only when the page is scrolled.  I will attach a simple test case.  The white border appears both on the top and left (not just the top).

Comment 30

6 years ago
Created attachment 580493 [details]
Fixed div reveals unwanted white border on top and left when scrolled


6 years ago
Attachment #580493 - Attachment mime type: text/plain → text/html
(In reply to Brian Hauer from comment #30)
> Created attachment 580493 [details]
> Fixed div reveals unwanted white border on top and left when scrolled

I'm not seeing a white border in the latest Nightly but it's hard to tell without a reference screenshot. Feel free to test using the latest Nightly yourself.

Comment 32

6 years ago
Looks like it's working in Aurora for me too.  Thanks to all for fixing this one!


5 years ago
Depends on: 749634
You need to log in before you can comment on or make changes to this bug.