Closed Bug 301338 Opened 19 years ago Closed 19 years ago

Alert boxes (sheets) prevent window loading/painting

Categories

(Core Graveyard :: Widget: Mac, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.8beta5

People

(Reporter: stefanh, Assigned: mark)

References

Details

(Keywords: regression, verified1.8)

Attachments

(2 files)

Mac OS 10.3.9, Seamonkey trunk 2005071711

If I start mailNews and the alert box "Do you wish to compact all folders to
save disk space" appear, the alert box seems to prevent the upper part (toolbar)
to load or paint properly. After the box has been dismissed, large portions of
the toolbar are completely blank. Hovering over the affected area with the mouse
partly restores it. 

First seen: Mozilla trunk 2005062209
Does not occur with Mozilla trunk 2005062109

Bonsai link:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2005-06-21+09%3A00%3A00&maxdate=2005-06-22+09%3A00%3A00&cvsroot=%2Fcvsroot


I'm not sure, but I think this could be caused by the fix for bug 282940
(CFRunLoopSource), hence the component.
Depends on: 282940
Flags: blocking1.8b4?
From top to bottom:
1) Initial load, alert box appear
2) After box is dismissed
3) Result of hovering over parts of the toolbar
Assignee: dougt → joshmoz
fwiw, this also occurs in the thunderbird nightly builds I've tested: 050719 and
050629 (no problem with a TB nightly from 050620).
I wonder if the patch in bug 281455 (which moves window updates to Carbon
Events) would help here.
Bug 281455 is fixed. Does this still happen (sorry, I don't have a tbird build).
Summary: Alert boxes prevent window loading/painting → Alert boxes (sheets) prevent window loading/painting
I can't replicate this in Mozilla 1.7.10 or Thunderbird 1.0.6 on OS X 10.4.2
(In reply to comment #5)
> I can't replicate this in Mozilla 1.7.10 or Thunderbird 1.0.6 on OS X 10.4.2

This bug doesn't occur on the 1.7 branch (Mozilla 1.7.10, Thunderbird 1.0.6), it
only occurs on the trunk.So, you have to use a trunk build (after July 20) in
order to test if it's fixed or not.
Hmm, I was actually able to reproduce this one time in SeaMonkey 2005072110. But
now i can't reproduce it... Odd.
(In reply to comment #7)
> Hmm, I was actually able to reproduce this one time in SeaMonkey 2005072110. But
> now i can't reproduce it... Odd.

Well, it's still there in SeaMonkey 2005072110. I can still reproduce it, but 
it's not as easy as it was before. Then you just needed to open mailNews. I'm
able to reproduce it if I load a page that isn't cached and open mailnews at the
same time.
Josh tells me this isn't a problem in Firefox so I'm minusing the blocking request.
Flags: blocking1.8b4? → blocking1.8b4-
yes, this is fixed now.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
I still see this in SeaMonkey (2005072511) and in the latest Thunderbird trunk
build (20050726).
Status: RESOLVED → VERIFIED
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Is there a way to reproduce this in Firefox?
Either Cmd+D during page load, or, make Camino/Safari your defualt browser and
launch Firefox.
Renominating - this is causing UI bustages in both Firefox and Thundebird.
Flags: blocking1.8b4- → blocking1.8b4?
Whiteboard: CFRunLoop failout
I see this too.  The area not being painted has the same dimensions as the
sheet, but with its left edge fixed to the window's own left.  (Probably top,
too.)  The sheet's own mBounds seem reasonable.
Flags: blocking1.8b4? → blocking1.8b4+
Josh or Simon, have either of you had a chance to dig into this? 
-> me
Status: REOPENED → ASSIGNED
Really, I mean it.
Assignee: joshmoz → mark
Status: ASSIGNED → NEW
We don't store the sheet's offset relative to its parent window, because the
system always centers it horizontally at the top of its parent.  We call the
position (0,0).  When it comes time to clip, the clipping gets done at (0,0). 
That's why the non-updating region is the size of the sheet, but at the top
left of the window.  Even if the sheet's bounds were fixed up to correspond to
its position relative to its parent, the rect that had been beneath the sheet
would be stale when the sheet disappears.

Sheets are top-level windows (so are dialogs), so they don't need to be clipped
out like this.	Other top-level windows aren't clipped, but that's because
they're not siblings of widgets that aren't top-level windows, and this
clipping is only done if the widget itself isn't a top-level window.  Sheets
are anomalous in this regard.

With this patch, widgets that aren't top-level windows won't clip out sheets or
any other top-level windows that they might find themselves being siblings of.
Attachment #196977 - Flags: superreview?(sfraser_bugs)
Attachment #196977 - Flags: review?(joshmoz)
Status: NEW → ASSIGNED
Component: XPCOM → Widget: Mac
Whiteboard: CFRunLoop failout → CFRunLoop fallout
Target Milestone: --- → mozilla1.8beta5
Is this really CFRunLoop fallout? It seems more likely to be caused by some
widget hierarchy changes.

I'm rather surprised that sheets live in the widget hierarchy of their parent
windows, but I guess this is how Win32 works.

Anyway, I'd like to know what caused this to regress.
Not CFRunloop fallout.  This regressed between 031408 and 031509.

Regression window:
http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&date=explicit&mindate=2005-03-14+05%3A00&maxdate=2005-03-15+09%3A00
Whiteboard: CFRunLoop fallout
(In reply to comment #21)
> Not CFRunloop fallout.  This regressed between 031408 and 031509.
> 
> Regression window:
>
http://bonsai.mozilla.org/cvsquery.cgi?branch=HEAD&date=explicit&mindate=2005-03-14+05%3A00&maxdate=2005-03-15+09%3A00

Sorry for the confusion, but I was 100% convinced of my regression range... :(
Whiteboard: [needs review josh, SR sfraser]
Comment on attachment 196977 [details] [diff] [review]
Don't clip out top-level windows

Seems to fix the problem, which I was easily able to reproduce in a non-patched
Firefox 1.5b1 today. My only nit about the patch is that the function name
"IsTopWidgetWindow" could be a little more clear (include the concept of
"top-level", not just "top"). Yeah, I know it is the variable name, but they
don't have to match, or you can fix both. Just a nit, fine with me if you
choose not to change it.
Attachment #196977 - Flags: review?(joshmoz) → review+
Comment on attachment 196977 [details] [diff] [review]
Don't clip out top-level windows

>cvs diff -u8p mozilla/widget/src/mac/nsChildWindow.cpp mozilla/widget/src/mac/nsWindow.h
>
>Index: mozilla/widget/src/mac/nsChildWindow.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/widget/src/mac/nsChildWindow.cpp,v
>retrieving revision 1.18
>diff -u -8 -p -r1.18 nsChildWindow.cpp
>--- mozilla/widget/src/mac/nsChildWindow.cpp	22 May 2004 20:54:39 -0000	1.18
>+++ mozilla/widget/src/mac/nsChildWindow.cpp	22 Sep 2005 01:01:33 -0000
>@@ -92,40 +92,40 @@ nsresult nsChildWindow::StandardCreate(n
> 
> void nsChildWindow::CalcWindowRegions()
> {
> 	Inherited::CalcWindowRegions();
> 
> 	// clip the siblings out of the window region and visRegion 
> 	if (mClipSiblings && mParent && !mIsTopWidgetWindow) {
> 		// need to walk the siblings backwards, to get clipping right.
>-		nsIWidget* sibling = mParent->GetLastChild();
>+		nsWindow* sibling = NS_STATIC_CAST(nsWindow*, mParent->GetLastChild());
> 		if (!sibling)
> 			return;
> 
> 		StRegionFromPool siblingRgn;
> 		if (siblingRgn == nsnull)
> 			return;
> 
> 		do {
>-			if (sibling == NS_STATIC_CAST(nsIWidget*, this))
>+			if (sibling == NS_STATIC_CAST(nsWindow*, this))
> 				break;
> 
> 			PRBool visible;
> 			sibling->IsVisible(visible);
>-			if (visible) {	// don't clip if not visible.
>+			if (visible && !sibling->IsTopWidgetWindow()) {	// don't clip if not visible or if a top-level window.
> 				// get sibling's bounds in parent's coordinate system.
> 				nsRect siblingRect;
> 				sibling->GetBounds(siblingRect);
> 					
> 				// transform from parent's coordinate system to widget coordinates.
> 				siblingRect.MoveBy(-mBounds.x, -mBounds.y);
> 
> 				Rect macRect;
> 				::SetRect(&macRect, siblingRect.x, siblingRect.y, siblingRect.XMost(), siblingRect.YMost());
> 				::RectRgn(siblingRgn, &macRect);
> 				::DiffRgn(mWindowRegion, siblingRgn, mWindowRegion);
> 				::DiffRgn(mVisRegion, siblingRgn, mVisRegion);
> 			}
>-			sibling = sibling->GetPrevSibling();
>+			sibling = NS_STATIC_CAST(nsWindow*, sibling->GetPrevSibling());
> 		} while (sibling);
> 	}
> }

You might as well detab the whole method while you're there.

>Index: mozilla/widget/src/mac/nsWindow.h
>===================================================================

>+    PRBool              IsTopWidgetWindow() { return mIsTopWidgetWindow; };

Make this method "|const|.
Attachment #196977 - Flags: superreview?(sfraser_bugs) → superreview+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Attachment #196977 - Flags: approval1.8b5?
Is this at all related to the problem in Camino where a sheet pops up (say, a
cookie confirmation dialog) and prevents any page content from being drawn or
loaded until the dialog sheet is dismissed?

cl
(In reply to comment #26)
> Is this at all related to the problem in Camino where a sheet pops up (say, a
> cookie confirmation dialog) and prevents any page content from being drawn or
> loaded until the dialog sheet is dismissed?

No.
Stephan, please verify this is fixed with the most recent trunk nightly build. 
Thanks
Attachment #196977 - Flags: approval1.8b5? → approval1.8b5+
Verified fixed with SeaMonkey trunk 2005092310. Thanks :)
Status: RESOLVED → VERIFIED
Bixed on franch.
Keywords: fixed1.8
Whiteboard: [needs review josh, SR sfraser]
*** Bug 309682 has been marked as a duplicate of this bug. ***
Keywords: fixed1.8verified1.8
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: