[review]Page layout sets font in window manager port -- BAD!

RESOLVED FIXED in mozilla0.9.8

Status

()

Core
Layout
P3
minor
RESOLVED FIXED
18 years ago
17 years ago

People

(Reporter: Mike Pinkerton (not reading bugmail), Assigned: Pierre Saslawsky)

Tracking

Trunk
mozilla0.9.8
PowerPC
All
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
Go to above url. See all the asserts about setting the window manager port font:

###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114
###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114
###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114
###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114
###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114
###!!! ASSERTION: Setting window manager port font: '!CurrentPortIsWMPort()', 
file nsGfxUtils.h, line 114

These are bad and mean that we're trying to use the WM port to draw on, not our 
own. cc'ing other mac folks
(Reporter)

Comment 1

18 years ago
nominating for beta3
Keywords: nsbeta3
Summary: Page layout sets font in window manager port -- BAD! → Page layout sets font in window manager port -- BAD!

Comment 2

18 years ago
I also see us drawing frequently on top of the windows of other applications, 
when we're in the background. This is extremely bad! Our GrafPort management is 
screwed up somewhere.

Comment 3

18 years ago
Over to rendering team..
Assignee: clayton → kmcclusk

Comment 4

18 years ago
waqar, could you take a look at this one?
Assignee: kmcclusk → waqar

Comment 5

18 years ago
Adding "NEEDINFO" until we have a better idea of what is going on
Whiteboard: [NEEDINFO]
Marking nsbeta3+
Whiteboard: [NEEDINFO] → [nsbeta3+]

Comment 7

18 years ago
I talked to sfraser, I understand what the problem is and I am working on the fix 
for it. Since it needs to go into beta3, the priority needs to be changed to P2?
Status: NEW → ASSIGNED
Changing from P3 to P2 based on Simon's comment: 

"I also see us drawing frequently on top of the windows of other applications, 
when we're in the background. This is extremely bad! Our GrafPort management is 
screwed up somewhere."
Priority: P3 → P2

Comment 9

18 years ago
Yeah, we dont have a GrafPort when we are staring up when we try to get fonts, so 
we use finders, we can just create some where off screen and use that.

Comment 10

18 years ago
pdt agrees p2.
Whiteboard: [nsbeta3+] → [nsbeta3+][pdtp2]
Target Milestone: --- → M18

Comment 11

18 years ago
I have narrowed down the problem to this:
<html>
<head>
<title>Foo</title>
</head>
<body>
<APPLET></APPLET>
<b>Foo</b>
<h6>Bar</h6>
<h4>foobar</h4>
</body>
</html>

If you take out APPLET tag, the problem goes away. Applet is causing our GrafPtr
to get messed up.

If you take out the APPLET tag the problem goes away. This could be that it
prompts the user to download the Plugin finder plugin, that dialog might be
causing the problem.

For each of those B, H6 and H4 tag I get an assert.

Comment 12

18 years ago
I'm pretty sure I've seen Mozilla draw over finder windows when displaying 
www.mozilla.org, so I don't think this is just an issue with APPLET tags.

Comment 13

18 years ago
Are there any other test cases that I can look at?

Comment 14

18 years ago
Not holding PR3 for this, so marking nsbeta3-. If you think this is serious 
enough to fix after PR3, please nominate for rtm.
Whiteboard: [nsbeta3+][pdtp2] → [nsbeta3-][pdtp2]
Nominating for rtm, and marking [rtm need info].
Keywords: rtm
Whiteboard: [nsbeta3-][pdtp2] → [rtm need info][nsbeta3-][pdtp2]
Marking rtm-. Not a crasher.
OS: All
Whiteboard: [rtm need info][nsbeta3-][pdtp2] → [rtm-][nsbeta3-][pdtp2]

Updated

18 years ago
Keywords: donttest

Comment 17

18 years ago
Here's a patch:

Index: mozilla/webshell/tests/viewer/nsMacMain.cpp
===================================================================
RCS file: /cvsroot/mozilla/webshell/tests/viewer/nsMacMain.cpp,v
retrieving revision 1.43
diff -b -u -2 -r1.43 nsMacMain.cpp
--- nsMacMain.cpp	2000/09/13 23:55:23	1.43
+++ nsMacMain.cpp	2001/02/16 00:26:28
@@ -211,5 +211,4 @@
 }
 
-
 nsresult
 nsNativeBrowserWindow::InitNativeWindow()
@@ -248,4 +247,10 @@
 	AppendResMenu(GetMenuHandle(menu_Apple), 'DRVR');
 	DrawMenuBar();
+	
+	// set the port to the window here
+	WindowPtr		wind = (WindowPtr)mWindow->GetNativeData(NS_NATIVE_DISPLAY);
+  if (wind)
+    SetPortWindowPort(wind);
+
 	return NS_OK;
 }

Comment 18

18 years ago
that patch looks fine to me except the tabbing/spaces seem to be inconsistent/off

Comment 19

18 years ago
changing milestone.
Target Milestone: M18 → Future
Don, can you apply the patch Simon created for viewer?
Assignee: waqar → dcone
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla0.9.1

Comment 21

17 years ago
looks good to me r=peterl

Updated

17 years ago
Keywords: nsbeta3

Comment 22

17 years ago
Don, I'm taking this so I can help resurrect Viewer.
Assignee: dcone → attinasi

Comment 23

17 years ago
Wait. That patch I pasted above will fix the assertions in viewer, but not the 
URL that this bug was filed on. I thought we had a different bug for the viewer 
assertion...

Comment 24

17 years ago
Moving P2 and P3 bugs to 0.9.2
Target Milestone: mozilla0.9.1 → mozilla0.9.2

Comment 25

17 years ago
by mandate, moving non-crashers and non-datalossers to 0.9.3 (though I will try
and get this in since it has a patch and I want to explore the Mac-specific
stuff a bit ;)
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Target Milestone: mozilla0.9.3 → mozilla0.9.4

Updated

17 years ago
Target Milestone: mozilla0.9.4 → mozilla1.0

Comment 26

17 years ago
Removing adequated PDT grafitti.  

Comment 27

17 years ago
Removing adequated PDT grafitti.
Whiteboard: [rtm-][nsbeta3-][pdtp2]

Updated

17 years ago
Target Milestone: mozilla1.0 → mozilla1.2
(Assignee)

Comment 28

17 years ago
Taking off Marc's list
Assignee: attinasi → pierre
Status: ASSIGNED → NEW
(Assignee)

Comment 29

17 years ago
I looked into this bug and bug 93217 again because of bug 105946...

It doesn't assert anymore with the URL above, nor with the sample code from 
comment #11.  Also I don't remember having seen the assertion in MozillaDebug for 
a long time.  I'll attach a updated version of the patch for Viewer.

peterl/sfraser: please r/sr
Severity: major → minor
Status: NEW → ASSIGNED
Priority: P2 → P3
Target Milestone: mozilla1.2 → mozilla0.9.7
(Assignee)

Comment 30

17 years ago
Created attachment 61058 [details] [diff] [review]
patch for viewer
(Assignee)

Updated

17 years ago
Summary: Page layout sets font in window manager port -- BAD! → [review]Page layout sets font in window manager port -- BAD!

Comment 31

17 years ago
Comment on attachment 61058 [details] [diff] [review]
patch for viewer

r=brade
Attachment #61058 - Flags: review+

Comment 32

17 years ago
Comment on attachment 61058 [details] [diff] [review]
patch for viewer

sr=sfraser
Attachment #61058 - Flags: superreview+
(Assignee)

Comment 33

17 years ago
fixed on the trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Target Milestone: mozilla0.9.7 → mozilla0.9.8
You need to log in before you can comment on or make changes to this bug.