Closed Bug 701528 Opened 10 years ago Closed 10 years ago

Hardware Acceleration Causes Rendering Issue with Background Attachment "Fixed"


(Core :: Web Painting, defect)

Windows 7
Not set



Tracking Status
firefox8 - wontfix
firefox9 + fixed
firefox10 + fixed


(Reporter: solaveritasteliberum, Assigned: roc)




(Keywords: verified-aurora, verified-beta, Whiteboard: [inbound][qa!])


(7 files)

When using background-attachment: fixed, a white gap appears at the top of the image. This has been previously filed under, but as of Firefox 8 I still see the issue. Furthermore, the work around described here ( no longer seems to work. Here is a simple test case:

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.
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)
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.
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:
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.
Attached image 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!
Attached file 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
Attached patch fixSplinter Review
This does work after all (I was building the wrong tree before!)
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
Duplicate of this bug: 700050
We will want to fix this on Aurora and Beta.
Ever confirmed: true
Closed: 10 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?
Duplicate of this bug: 675497
Duplicate of this bug: 686121
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
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 )
Oops, I mean userChrome.css .
Blocks: 699987
Duplicate of this bug: 702419
Whiteboard: [inbound] → [inbound][qa+]
Attached image 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 and 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 ?
Probably file a new bug for that issue.
Duplicate of this bug: 707505
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
Whiteboard: [inbound][qa+] → [inbound][qa!]
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).
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.
Looks like it's working in Aurora for me too.  Thanks to all for fixing this one!
Depends on: 749634
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.