Closed
Bug 72230
Opened 24 years ago
Closed 24 years ago
When loading a site, mozilla stops redrawing content area - bad user experience
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: mar_garina, Assigned: ccarlen)
Details
(Whiteboard: [Hixie-P4])
Attachments
(4 files)
3.68 KB,
patch
|
Details | Diff | Splinter Review | |
983 bytes,
patch
|
Details | Diff | Splinter Review | |
3.72 KB,
patch
|
Details | Diff | Splinter Review | |
888 bytes,
patch
|
Details | Diff | Splinter Review |
When mozilla loads a site, _BEFORE_ it starts displaying it, it shows a whole
black screen. The problem is that when I move a window over it, it doesn't
redraw itself as it should (it redraws the menus and all, just not the area
where the site should be displayed), and it doesn't look too nice..
How it should be:
Mozilla should re-draw the black screen when it gets a redraw event (I forgot
its exact name).
Comment 1•24 years ago
|
||
Thanks for filing this bug. I've been meaning to file it myself for a while.
Target Milestone: --- → mozilla0.9
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
Here's a patch that will fill in the undrawn area of the nsWebBrowser before
pages are loaded. It's pretty simple. Valeksi or Adam can you review this?
Thanks.
Status: NEW → ASSIGNED
Hi,
I just tried this patch using the ActiveX embedding control.
Works fine runtime except the ActiveX uses the old non-painting to draw it's
own text on the control area in design mode. Now the ActiveX paints it's own
text, and clicking on it clears it.
This should probably be fixed for the ActiveX after this is checked in.
Comment 6•24 years ago
|
||
valeski? danm? Can you guys look at this patch?
Comment 7•24 years ago
|
||
r=valeski
Comment 8•24 years ago
|
||
blizzard: as per conversation on IRC, it would be great if we could do this at
the docshell level, as that would fix bug 5569, too. (I'm waving my hands
wildly, because I don't really understand most of this stuff.)
Comment 9•24 years ago
|
||
Comment 10•24 years ago
|
||
This patch just sets the window color. Since we don't get need to paint on that
window we don't ever disturb it so we can let the OS/server do the drawing for us.
Comment 11•24 years ago
|
||
I need reviews from valeski or adam or someone.
Comment 12•24 years ago
|
||
The patch looks fine, but if the original problem is that background window
isn't painting *anything*, what good will changing the window background colour
do?
Comment 13•24 years ago
|
||
If you set the background color on the window then you don't have to ever handle
paint requests for the window since the OS will handle the paints for you.
Comment 14•24 years ago
|
||
Still waiting for reviews. La la la.
Comment 15•24 years ago
|
||
If the patch works on Win32 then r=adamlock.
I'm guessing that setting the background colour affects the way NS_PAINT is
handled in the view manager or somewhere. As far as I can see in the Win32
widget there is no code associated with setting the background colour that would
affect the way the background is drawn.
Comment 16•24 years ago
|
||
I don't have a win32 box to test this out on so I'm depending on someone else to
test it.
IIRC if the PAINT method isn't handled on win32 it's automatically drawn with
the default color. But I could be wrong since I'm not a win32 expert.
Comment 17•24 years ago
|
||
Windows 2000:
I tried the last attachment 29944 [details] [diff] [review] with the ActiveX control, but it doesn't seem
to work with Win32/ActiveX: Opening a form with an ActiveX Mozilla control
doesn't paint the control. (Background showing in the control-area, and no
redraw when moving a window over it)
I tried attachment 28041 [details] [diff] [review] before and that patch did fix this for the ActiveX
control.
Comment 18•24 years ago
|
||
OK. Since windows needs to have an explicit paint I'll use the first patch.
Comment 19•24 years ago
|
||
Ok, so we're going with the original patch, right? 03/18/01 12:08?
Here's some henpeckery take it or leave it. In general, this looks fine;
sr=waterson
+NS_IMETHODIMP nsWebBrowser::FillBackground(nsRect &aRect)
Might as well make it |const nsRect& aRect|; you're not going to mutate aRect.
+ case NS_PAINT: {
+ nsRect rect = *((nsPaintEvent *)aEvent)->rect;
+ browser->FillBackground(rect);
Too much deref boggle? (I can never remeber if * or -> has precedence.) How
about:
const nsRect* rect = NS_STATIC_CAST(nsPaintEvent*, aEvent)->rect;
browser->FillBackground(*rect);
Comment 20•24 years ago
|
||
Comment 21•24 years ago
|
||
Chris, you were right. It was much cleaner looking that way. The final patch
is attached for the sake of posterity.
Comment 22•24 years ago
|
||
Fix checked in.
Checking in nsWebBrowser.cpp;
/cvsroot/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp,v <--
nsWebBrowser.cpp
new revision: 1.70; previous revision: 1.69
done
Checking in nsWebBrowser.h;
/cvsroot/mozilla/embedding/browser/webBrowser/nsWebBrowser.h,v <-- nsWebBrowser.h
new revision: 1.30; previous revision: 1.29
done
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 23•24 years ago
|
||
As discussed with hyatt, this is IMHO the wrong fix. We shouldn't be tearing
down the frames of the old page before we have frames for the new page. It
looks bad. See our prefs dialog, for an example of extreme badness. See IE for
an example of how it should work.
Hyatt said he'd fix it. Reassigning to him. Hyatt: be careful not to break
bug 5569 while you're at it...
Status: RESOLVED → REOPENED
Component: GTK Embedding Widget → Layout
QA Contact: pavlov → petersen
Resolution: FIXED → ---
Comment 24•24 years ago
|
||
reassigning...
Assignee: blizzard → hyatt
Severity: minor → normal
Status: REOPENED → NEW
OS: Linux → All
Hardware: PC → All
Summary: When loading a site, mozilla doesn't redraw the screen when needed → When loading a site, mozilla stops redrawing content area
Whiteboard: [Hixie-P4] bad user experience
Comment 25•24 years ago
|
||
I think you re-opened the wrong bug. Try bug 5569; actually, open a new one.
Comment 26•24 years ago
|
||
ok, hyatt was filing 76303 as I was reopening this one. Marking it as a dup...
*** This bug has been marked as a duplicate of 76303 ***
Status: NEW → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 27•24 years ago
|
||
Whether this is a dup of 76303 ? but this checkin caused some ugliness. Since it
went in, the area behind the content area is painted to black which is really
jarring. The code goes to the trouble of finding the background color of the
window which is good. Problem is, before filling the rect, it does not set the
color so it fills with whatever color was last used in that port. I think it
should set the color before painting:
Index: mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp
===================================================================
RCS file: /cvsroot/mozilla/embedding/browser/webBrowser/nsWebBrowser.cpp,v
retrieving revision 1.74
diff -u -2 -r1.74 nsWebBrowser.cpp
--- nsWebBrowser.cpp 2001/04/18 01:42:27 1.74
+++ nsWebBrowser.cpp 2001/04/24 03:28:51
@@ -1436,4 +1443,5 @@
NS_IMETHODIMP nsWebBrowser::FillBackground(const nsRect &aRect)
{
+ mRC->SetColor(mBackgroundColor);
mRC->FillRect(aRect);
return NS_OK;
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 28•24 years ago
|
||
What is your default background color? And what platform are you using?
Assignee | ||
Comment 29•24 years ago
|
||
It's Mac. The default background color is light gray. But, if the color is not
set before painting, that doesn't matter - it's whatever color was last set in
that rendering context - which happens to be black.
Comment 30•24 years ago
|
||
There must be something else going on here. In nsWebBrowser::Create we
initialize that value:
http://lxr.mozilla.org/seamonkey/source/embedding/browser/webBrowser/nsWebBrowser.cpp#911
Is that not the same for the mac?
Assignee | ||
Comment 31•24 years ago
|
||
Right, but anything can change the value before we actually paint - at least on Mac.
Comment 32•24 years ago
|
||
Can change the value of mBackgroundColor? It's only set in one place, in
Create(). Or are you getting a FillBackground() before Create() finishes or
something?
Assignee | ||
Comment 33•24 years ago
|
||
No, I'm not getting a FillBackground() before a Create(). Looks like, on Mac,
the underlying GrafPort is shared by different instances of rendering contexts.
The color gets set in Create(), other drawing happens, the color gets changed,
and by the time FillRect() happens, the color is black.
Comment 34•24 years ago
|
||
Interesting. I had no idea. In that case can you remove the SetColor() call
from Create() and the comment that goes with it while you are at it?
Comment 35•24 years ago
|
||
Reassigning to you guys. Hixie, if you want a bug on keeping the old page
around, make a new one.
Assignee: hyatt → ccarlen
Status: REOPENED → NEW
Assignee | ||
Comment 36•24 years ago
|
||
Assignee | ||
Comment 37•24 years ago
|
||
Can somebody r/sr the patch?
Comment 39•24 years ago
|
||
r=adamlock
Comment 40•24 years ago
|
||
who are the right people to r= sr=????
Updated•24 years ago
|
Summary: When loading a site, mozilla stops redrawing content area → When loading a site, mozilla stops redrawing content area - bad user experience
Whiteboard: [Hixie-P4] bad user experience → [Hixie-P4] need r= sr= a=
Assignee | ||
Comment 41•24 years ago
|
||
It has r=. The change (which is only the last patch) is very simple. cc'ing
waterson.
Status: NEW → ASSIGNED
Whiteboard: [Hixie-P4] need r= sr= a= → [Hixie-P4] need sr= a=
Comment 42•24 years ago
|
||
blizzard should sr=, but FWIW, it looks fine to me.
Comment 43•24 years ago
|
||
r/sr=blizzard a=blizzard for 0.9
Comment 44•24 years ago
|
||
Is this bug related to bug 60780?
Comment 45•24 years ago
|
||
has this been fixed with bug 76495 ?
Assignee | ||
Comment 46•24 years ago
|
||
No, not related and not fixed. The remaining problem is that the background
erases to black instead of the window color with embedding apps on Mac. Sorry I
let this one slip. I'll check it in today.
Assignee | ||
Comment 47•24 years ago
|
||
Fix checked into trunk and branch.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Whiteboard: [Hixie-P4] need sr= a= → [Hixie-P4]
Comment 48•24 years ago
|
||
Work on bug 78412 should fix this problem too
Comment 49•24 years ago
|
||
arrgh. this wasn't approved for checkin on the branch. no fair checking
in stuff after the final builds have already spun. drivers?
Assignee | ||
Comment 50•24 years ago
|
||
Then what's this:
> r/sr=blizzard a=blizzard for 0.9
I should have done it before but forgot about it. Sorry if it was too late.
Comment 51•24 years ago
|
||
that a= was from more than a week ago. How annoying is this problem? Is
it worth keeping the patch and respinning new builds?
Assignee | ||
Comment 52•24 years ago
|
||
No, it's a small problem. It should not require a respin because it only effects
embedding apps, only on Mac, and has no effect on Seamonkey. You can back it out
of the branch (but not the trunk please) if you want.
Comment 53•24 years ago
|
||
Well, since we're dealing with other problems this will probably end up in 0.9
anyway.
Comment 54•24 years ago
|
||
Problem doesn't reproduce on the Mac May 30th build. Marking verified.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•