Closed
Bug 190311
Opened 23 years ago
Closed 23 years ago
Redraws of then alpha background of the second absolutely positioned element fail.
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: orien, Assigned: roc)
References
()
Details
(Whiteboard: [fix])
Attachments
(1 file, 2 obsolete files)
|
3.65 KB,
patch
|
roc
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212
In the page at http://www.icecode.com/menu_trans.html the alpha background of
the #menu element is not redrawn correctly. There are links to other versions
of the page where the menu is affected or where both absolutely positioned
elements use solid backgrounds which are unaffected. Elements such as the table
cells, for which I also used an alpha background exhibit no such problems
Reproducible: Always
Steps to Reproduce:
1. Load example page using alpha background.
2. Force mozilla to redraw the page, either by iconifying, shading, changing
workspaces, or just scrolling up and down. The alpha backgrounds should exhibit
redraw problems.
3. Repeat with the pages without alpha backgrounds and see that the redraws are
successful
Actual Results:
The alpha backgrounds do not redraw correctly
Expected Results:
It should have redrawn the alpha backgrounds with the same robustness as the
solid versions.
Comment 1•23 years ago
|
||
*** Bug 190312 has been marked as a duplicate of this bug. ***
| Reporter | ||
Comment 2•23 years ago
|
||
This might be the same as 189894, but I couldn;t figure out what the other bug
report was talking about, so I submitted my own.
Also I tested these pages in the most recent nightly build, and experienced the
same problems.
| Assignee | ||
Comment 3•23 years ago
|
||
Probably a Linux image rendering bug, but I'm not sure. Does it happen on Windows?
Assignee: roc+moz → paper
Status: UNCONFIRMED → NEW
Component: Layout: View Rendering → GFX: Gtk
Ever confirmed: true
| Reporter | ||
Comment 4•23 years ago
|
||
I had a friend test it out with a rather old version "Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721". Unfortunately I don't have
access to windows myself to test it with a newer release.
| Reporter | ||
Comment 5•23 years ago
|
||
Sorry, failed to mention, the bug does not appear to be in the windows version
that he tested. Whether it come into existance later in the tree, I can't say,
but it wasn't there 6 months ago.
Comment 6•23 years ago
|
||
tor's temporarily unavailable, but I'm CCing him anyway. He might be able to help.
Comment 7•23 years ago
|
||
this regressed between linux trunk builds 2002061108 and 2002061304, indicating
the culrprit is bug 85595
Comment 8•23 years ago
|
||
CCing people from Bug 148350. If I follow the logic correctly, these two are
not the same:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=mozilla/view/src&command=DIFF_FRAMESET&file=nsView.cpp&rev1=3.156&rev2=3.157&root=/cvsroot
This bug happens with the code on the left, but does exist on the code on the right.
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
Simpler Testcase:
http://mozilla.animecity.nu/GTKBug/menu_trans.html
Comment 11•23 years ago
|
||
Comment on attachment 113254 [details] [diff] [review]
Patch
kevin, roc, please check to see if I'm actually correcting the logic. Thanks
:)
Attachment #113254 -
Flags: superreview?(roc+moz)
Attachment #113254 -
Flags: review?(kmcclusk)
| Assignee | ||
Comment 12•23 years ago
|
||
Arron, I'm pretty sure those pieces of code are equivalent and your patch is
wrong. Can you describe the variable values where you think they're not equivalent?
Comment 13•23 years ago
|
||
Comment on attachment 113254 [details] [diff] [review]
Patch
I checked again, an you're right, the patch is totally wrong.
Attachment #113254 -
Attachment is obsolete: true
Attachment #113254 -
Flags: superreview?(roc+moz)
Attachment #113254 -
Flags: review?(kmcclusk)
Comment 14•23 years ago
|
||
I can't fix this.
It is caused by Bug 148350. Prior to that patch, skipping of parentIsFloating
assigning was common because if !lastViewIsFloating == True, the rest of the
while logic did not need to be run, which is where parentIsFloating was set.
In those cases parentIsFloating was uninitialized and probably evaluated to
true. At the end of the while, lastViewIsFloating is set to parentIsFloating,
which would make lastViewIsFloating invalid, and the while loop would screw up.
Bug 148350 fixed that problem, and unveiled this bug.
I don't know enough about clippings and flow to even guess where to begin.
Resetting owner and QA.
Assignee: paper → blizzard
| Assignee | ||
Comment 15•23 years ago
|
||
I found the problem. It's the intersection of at least 3 bugs, 2 in GFX-GTK and
1 in views.
One bug in GFX-GTK is that DrawTile() does not call UpdateGC() after calling
nsIRenderingContext::SetClipRect and before actual rendering (in the 8-bit alpha
case). This means that the image is tiled using the clip rect set by the last
UpdateGC(), which in this case is the area of the last view rendered. Oops.
When I added an UpdateGC() call in what seemed to be the right place, I found
another bug in DrawTile(). It calls nsIRenderingContext::SetClipRect and passes
in a rectangle in pixels, but the rect is supposed to be in twips. So the rect
gets scaled down and the image is mutilated. So I added a new
SetClipRectInPixels and used it.
The thing that caused all this to manifest is that the view system was setting
VIEW_CLIPPED on too many views because of insufficient logic in GetClippedRect.
This *should* have been benign (the only use of VIEW_CLIPPED is to avoid setting
the clip rect if we don't really need to) but because of the above bugs it
caused this problem to appear.
Assignee: blizzard → roc+moz
| Assignee | ||
Comment 16•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Whiteboard: [fix]
| Assignee | ||
Updated•23 years ago
|
Attachment #113493 -
Flags: superreview?(bzbarsky)
Attachment #113493 -
Flags: review?(pavlov)
Comment 17•23 years ago
|
||
Comment on attachment 113493 [details] [diff] [review]
fixes
r=pavlov. glad you added comments about SetClipRect vs SetClipRegion. I know
that has bitten people in the past.
Attachment #113493 -
Flags: review?(pavlov) → review+
Comment 18•23 years ago
|
||
r=kmcclusk@netscape.com for the view module changes.
Comment 19•23 years ago
|
||
Comment on attachment 113493 [details] [diff] [review]
fixes
fun..... we really need to get unit stuff sorted out. :(
Attachment #113493 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 20•23 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 21•23 years ago
|
||
Reopen bug - the patch did not cover Xlib gfx... ;-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 22•23 years ago
|
||
Attachment #113493 -
Attachment is obsolete: true
Updated•23 years ago
|
Attachment #115463 -
Flags: superreview?(bzbarsky)
Attachment #115463 -
Flags: review?(roc+moz)
Comment 23•23 years ago
|
||
Comment on attachment 115463 [details] [diff] [review]
Patch for 2003-02-07-08-trunk
Have we considered subclassing a common superclass that will contain all the
identical methods that can be shared between gtk/xlib/qt/whatever?
Attachment #115463 -
Flags: superreview?(bzbarsky) → superreview+
Comment 24•23 years ago
|
||
Boris Zbarsky wrote:
> (From update of attachment 115463 [details] [diff] [review])
> Have we considered subclassing a common superclass that will contain all the
> identical methods that can be shared between gtk/xlib/qt/whatever?
subclassing may be the wrong approach. In theory we could migrate gfx/src/gtk,
gfx/src/xlib, gfx/src/xprint and gfx/src/qt into one template placed in
gfx/src/x11shared/ - but AFAIK C++ templates are not allowed per mozilla.org's
coding policy... ;-(
Comment 25•23 years ago
|
||
bz: sort of, that would be Bug 182658, at least for nsImage*. We already have a
superclass for nsIRenderingContext, which is nsRenderingContextImpl.
Unfortunately, it wouldn't helpfull for this bug, since SetClipRectInPixels and
UpdateGC are being added to the platform specific code, and not the platform
independent nsRenderingContextImpl. (IMO, they should have been added to
nsRenderingContextImpl, but I realize that would cause problems)
| Assignee | ||
Updated•23 years ago
|
Attachment #115463 -
Flags: review?(roc+moz) → review+
Comment 26•23 years ago
|
||
*** Bug 125244 has been marked as a duplicate of this bug. ***
Comment 27•23 years ago
|
||
Attachment 115463 [details] [diff] checked-in into "trunk"
(http://bonsai.mozilla.org/cvsquery.cgi?module=MozillaTinderboxAll&branch=HEAD&cvsroot=/cvsroot&date=explicit&mindate=1046225340&maxdate=1046225400&who=smontagu%25netscape.com),
marking bug as FIXED.
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•