Last Comment Bug 701528 - Hardware Acceleration Causes Rendering Issue with Background Attachment "Fixed"
: Hardware Acceleration Causes Rendering Issue with Background Attachment "Fixed"
Status: VERIFIED FIXED
[inbound][qa!]
: verified-aurora, verified-beta
Product: Core
Classification: Components
Component: Layout: View Rendering (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal with 1 vote (vote)
: mozilla11
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
Mentors:
http://mygemologist.com/bg-fixed-test...
: 675497 686121 700050 701363 702419 707505 (view as bug list)
Depends on: 749634
Blocks: 677095 686121 699987 701363
  Show dependency treegraph
 
Reported: 2011-11-10 14:22 PST by Dominic
Modified: 2012-12-06 03:08 PST (History)
17 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-
wontfix
+
fixed
+
fixed


Attachments
DWM colour showing through. (102.05 KB, image/png)
2011-11-10 19:06 PST, Alex
no flags Details
pic of bug (14.24 KB, image/jpeg)
2011-11-12 13:18 PST, john_olson85
no flags Details
standalone test case (481 bytes, text/html)
2011-11-13 18:37 PST, Robert O'Callahan (:roc) (email my personal email if necessary)
no flags Details
fix (74.82 KB, patch)
2011-11-13 20:19 PST, Robert O'Callahan (:roc) (email my personal email if necessary)
bas: review+
christian: approval‑mozilla‑aurora+
christian: approval‑mozilla‑beta+
Details | Diff | Splinter Review
Foxit plugin (129.05 KB, image/jpeg)
2011-12-02 06:52 PST, Paul Silaghi, QA [:pauly]
no flags Details
Adobe reader plugin (103.88 KB, image/jpeg)
2011-12-02 06:52 PST, Paul Silaghi, QA [:pauly]
no flags Details
Fixed div reveals unwanted white border on top and left when scrolled (1.45 KB, text/html)
2011-12-09 12:04 PST, Brian Hauer
no flags Details

Description Dominic 2011-11-10 14:22:34 PST
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 Alex 2011-11-10 18:54:11 PST
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 Alex 2011-11-10 19:06:52 PST
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 Dominic 2011-11-11 01:01:36 PST
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 john_olson85 2011-11-12 13:16:40 PST
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.

http://i43.tinypic.com/f53clf.jpg
Comment 5 john_olson85 2011-11-12 13:18:08 PST
Created attachment 574086 [details]
pic of bug
Comment 6 Boris Zbarsky [:bz] 2011-11-13 15:58:32 PST
roc, could this also be bug 686121?
Comment 7 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-13 17:01:11 PST
I can reproduce this one!
Comment 8 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-13 18:37:01 PST
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.
Comment 9 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-13 20:19:48 PST
Created attachment 574231 [details] [diff] [review]
fix

This does work after all (I was building the wrong tree before!)
Comment 10 Bas Schouten (:bas.schouten) 2011-11-13 20:38:04 PST
Comment on attachment 574231 [details] [diff] [review]
fix

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.
Comment 11 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-13 20:43:07 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/33547cc48103
Comment 12 Alice0775 White 2011-11-13 22:54:31 PST
*** Bug 700050 has been marked as a duplicate of this bug. ***
Comment 13 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-14 13:08:04 PST
We will want to fix this on Aurora and Beta.
Comment 14 Ed Morley [:emorley] 2011-11-14 19:36:56 PST
https://hg.mozilla.org/mozilla-central/rev/33547cc48103
Comment 15 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-14 20:46:05 PST
Comment on attachment 574231 [details] [diff] [review]
fix

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

This is a pretty bad regression and we should fix it ASAP.
Comment 16 henryfhchan 2011-11-14 22:27:02 PST
*** Bug 675497 has been marked as a duplicate of this bug. ***
Comment 17 Boris Zbarsky [:bz] 2011-11-15 01:45:27 PST
*** Bug 686121 has been marked as a duplicate of this bug. ***
Comment 18 christian 2011-11-15 13:40:38 PST
Comment on attachment 574231 [details] [diff] [review]
fix

[triage comment]
Bad regression, we should fix. Approved for beta and aurora. Please land as soon as possible.
Comment 19 Boris Zbarsky [:bz] 2011-11-15 14:01:49 PST
*** Bug 701363 has been marked as a duplicate of this bug. ***
Comment 20 Robert O'Callahan (:roc) (email my personal email if necessary) 2011-11-15 15:07:28 PST
https://hg.mozilla.org/releases/mozilla-beta/rev/54c9b55a4c50
https://hg.mozilla.org/releases/mozilla-aurora/rev/77fd55b5d57d
Comment 21 Fanolian 2011-11-16 00:56:11 PST
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: 5.1.0.1021, Foxit Reader Plugin for Mozilla 2.1.1.720)

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 Fanolian 2011-11-16 01:00:19 PST
Oops, I mean userChrome.css .
Comment 23 j.j. 2011-11-23 13:17:54 PST
*** Bug 702419 has been marked as a duplicate of this bug. ***
Comment 24 Paul Silaghi, QA [:pauly] 2011-12-02 06:52:20 PST
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 ?
Comment 25 Paul Silaghi, QA [:pauly] 2011-12-02 06:52:59 PST
Created attachment 578568 [details]
Adobe reader plugin
Comment 26 Timothy Nikkel (:tnikkel) 2011-12-02 12:46:10 PST
Probably file a new bug for that issue.
Comment 27 Alice0775 White 2011-12-04 07:45:57 PST
*** Bug 707505 has been marked as a duplicate of this bug. ***
Comment 28 Vlad [QA] 2011-12-05 04:35:09 PST
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
Comment 29 Brian Hauer 2011-12-09 12:03:25 PST
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 Brian Hauer 2011-12-09 12:04:04 PST
Created attachment 580493 [details]
Fixed div reveals unwanted white border on top and left when scrolled
Comment 31 Anthony Hughes (:ashughes) [GFX][QA][Mentor] 2011-12-09 12:51:13 PST
(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 Brian Hauer 2011-12-11 18:46:02 PST
Looks like it's working in Aurora for me too.  Thanks to all for fixing this one!

Note You need to log in before you can comment on or make changes to this bug.