Closed Bug 129893 Opened 22 years ago Closed 22 years ago

Cocoa changes to GFX/layout/view

Categories

(SeaMonkey :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: hyatt, Assigned: hyatt)

Details

(Keywords: topembed+)

Attachments

(1 file, 1 obsolete file)

This bug tracks changes to GFX/layout/view for Cocoa.
These changes keep Chimera from crashing, turn off double buffering for 
our views, and fix the caret blinking problem in Chimera.
Status: NEW → ASSIGNED
Attached patch Ignore the silly WS stuff. (obsolete) — Splinter Review
Attached patch Better patch.Splinter Review
Attachment #73409 - Attachment is obsolete: true
Keywords: topembedtopembed+
Ok, since this got + (yay), can I get r/sr here?  Pink? Simon? Saari?
+#ifdef MOZ_WIDGET_COCOA
     WindowPtr firstWindow = GetTheWindowList();
     if (firstWindow)
       ::SetGWorld(::GetWindowPort(firstWindow), ::GetMainDevice());
+#else
+    static GrafPtr gGoodPort = nsnull;
+    if (!gGoodPort) {
+      Rect macRect;
+      ::SetRect(&macRect, 0, 0, 2, 2);
+      ::NewGWorld(&gGoodPort, 16, &macRect, nsnull, nsnull, 0);
+    }
+    ::SetGWorld(gGoodPort, nsnull);
+#endif

isn't this backwards? why is the _existing_ code wrapped in MOZ_WIDGET_COCOA?

+#ifndef MOZ_WIDGET_COCOA
        ::SetOrigin(-mGS->mOffx, -mGS->mOffy);          // line order...
+#endif

can you explain this with a comment in the code (and here as well)?

+#ifdef MOZ_WIDGET_COCOA
+   // Emulate the Mac IE behavior of scrolling 2 lines instead of 1
+   // on a button press.  This makes scrolling appear smoother and
+   // keeps us competitive with IE.
+   increment *= 2;
+#endif

shouldn't we, um, try to find out why scrolling is so slow? is this a problem 
with mozilla as well as chimchim?

+++ view/src/nsView.cpp 11 Mar 2002 22:45:53 -0000
@@ -803,13 +803,13 @@
-  }
+    }

did a tab get introduced here by accident?

-//#define NO_DOUBLE_BUFFER
+#ifdef MOZ_WIDGET_COCOA
+#define NO_DOUBLE_BUFFER
+#endif

I'd leave the uncommented version there because a lot of people use that line to 
toggle DB on/off. It's what they're used to looking for.
Hahahah, good grief.  No wonder that good port stuff was behaving so 
oddly.  I had it backwards!  I need to try that out now and see if I still need 
all the code in nsImageMac.cpp.
Ok, so I fixed the ifdef to be #ifndef, and once I did that, I was able to 
simplify the code in nsImageMac to not have to ask IsValidPort (I was 
being an idiot).  All that remains in nsImageMac is the call to set the port 
to a known good port (which now works properly with the #ifndef fixup).

Seeking r/sr now with that modification and with leaving the commented 
out code in nsViewManager.cpp.
Comment on attachment 73581 [details] [diff] [review]
Better patch.

I still want to see a comment on 

+#ifndef MOZ_WIDGET_COCOA
	::SetOrigin(-mGS->mOffx, -mGS->mOffy);		// line order...
+#endif

both in the code and here in the bug. just so i know what's going on.
oops, forgot r=pink
Comment on attachment 73581 [details] [diff] [review]
Better patch.

a=rjesup@wgate.com

Please send email to drivers next time
Attachment #73581 - Flags: approval+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
I checked the changes to

gfx/src/mac/nsGfxUtils.h
gfx/src/mac/nsImageMac.cpp
gfx/src/mac/nsRenderingContextMac.cpp
gfx/src/mac/nsRenderingContextMac.h

into CHIMERA_M1_0_BRANCH.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: