1.42 KB, text/html
1.03 KB, text/html
3.12 KB, patch
|Details | Diff | Splinter Review|
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113 I have a semi-tansparent (-moz-opacity: .7), overflow:auto and percentage height div-layer that doesn't scroll, this is outlined in here http://bugzilla.mozilla.org/show_bug.cgi?id=97283 ) I was told to post this as a new bug because the same div-layer renders the background image (assigned through the body element) incorrectly when scrolling manually. The background image scrolls with the div layer when it should stay fixed in the background (body element). When text is highlighted in the div portion of the image behind the highlighted text is rendered correctly. The image is rendered in the correct position when switching to another browser window and back again. In IE6 the bkg image is fixed behind the div layer and is rendered correctly. I have a feeling this is due to the overflow: auto/scroll not focusing a div layer correctly (see bug 97283). james Reproducible: Always Steps to Reproduce:
Created attachment 139490 [details] Sample html and css. Scroll down on the div layer to view the problem
Seeing the garbage painted with Linux build 2004-01-15-07 too.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Hardware: PC → All
15 years ago
Priority: -- → P2
Created attachment 145444 [details] slightly simplified testcase This is a simplified version of James' test case.
Created attachment 145446 [details] [diff] [review] fix The problem is that a view is being marked "painted on uniform background" when its background is actually part of a translucent group and is therefore not really uniform (all same pixel values). We need to detect when such a view's background is part of a translucent group and stop OptimizeDisplayList from treating it as opaque for the purposes of CanScrollWithBitBlt. That would be hard because we don't know in the view system exactly where the uniform background comes from (the nsGfxScrollFrame parent of the scrolled view, in this case, which may not even have a view itself) but we can fall back to the safe approximation of checking whether the HasUniformBackground() view itself is translucent.
Comment on attachment 145446 [details] [diff] [review] fix This is getting a bit ugly. Maybe HasUniformBackground is not quite the right piece of information to transmit to views.
One way to improve the situation would be to make nsGfxScrollFrame always have a view of its own, and then have a view property IsUniformBackground() which is set for any appropriate view (means: "the background is a solid block of the same pixel value covering the entire view, AND this view paints no other content of its own"). Then CanScrollWithBitBlt could discover the necessary optimizations.
Summary: semi-tansparent, overflow:auto div-layer doesn't scroll and renders background image incorrectly when scrolling manually. → semi-transparent, overflow:auto div-layer doesn't scroll and renders background image incorrectly when scrolling manually.
Comment on attachment 145446 [details] [diff] [review] fix Very safe fix to visual corruption bug.
Attachment #145446 - Flags: approval1.7?
Comment on attachment 145446 [details] [diff] [review] fix a=chofmann for 1.7
Attachment #145446 - Flags: approval1.7? → approval1.7+
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.