Closed
Bug 231585
Opened 21 years ago
Closed 21 years ago
semi-transparent, overflow:auto div-layer doesn't scroll and renders background image incorrectly when scrolling manually.
Categories
(Core :: Web Painting, defect, P2)
Core
Web Painting
Tracking
()
RESOLVED
FIXED
People
(Reporter: ptyland, Assigned: roc)
Details
(Keywords: testcase)
Attachments
(3 files)
1.42 KB,
text/html
|
Details | |
1.03 KB,
text/html
|
Details | |
3.12 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
chofmann
:
approval1.7+
|
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:
![]() |
||
Comment 2•21 years ago
|
||
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
Assignee | ||
Updated•21 years ago
|
Priority: -- → P2
Assignee | ||
Comment 3•21 years ago
|
||
This is a simplified version of James' test case.
Assignee | ||
Comment 4•21 years ago
|
||
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.
Assignee | ||
Comment 5•21 years ago
|
||
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.
Attachment #145446 -
Flags: superreview?(dbaron)
Attachment #145446 -
Flags: review?(dbaron)
Assignee | ||
Comment 6•21 years ago
|
||
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.
Attachment #145446 -
Flags: superreview?(dbaron)
Attachment #145446 -
Flags: superreview+
Attachment #145446 -
Flags: review?(dbaron)
Attachment #145446 -
Flags: review+
Assignee | ||
Comment 7•21 years ago
|
||
Comment on attachment 145446 [details] [diff] [review]
fix
Very safe fix to visual corruption bug.
Attachment #145446 -
Flags: approval1.7?
Comment 8•21 years ago
|
||
Comment on attachment 145446 [details] [diff] [review]
fix
a=chofmann for 1.7
Attachment #145446 -
Flags: approval1.7? → approval1.7+
Assignee | ||
Comment 9•21 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•