Cocoa changes to GFX/layout/view

RESOLVED FIXED

Status

RESOLVED FIXED
17 years ago
14 years ago

People

(Reporter: hyatt, Assigned: hyatt)

Tracking

({topembed+})

Trunk
PowerPC
Mac OS X
topembed+

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

17 years ago
This bug tracks changes to GFX/layout/view for Cocoa.
(Assignee)

Comment 1

17 years ago
These changes keep Chimera from crashing, turn off double buffering for 
our views, and fix the caret blinking problem in Chimera.
Status: NEW → ASSIGNED
(Assignee)

Comment 2

17 years ago
Created attachment 73409 [details] [diff] [review]
Ignore the silly WS stuff.
(Assignee)

Comment 3

17 years ago
Created attachment 73581 [details] [diff] [review]
Better patch.
(Assignee)

Updated

17 years ago
Attachment #73409 - Attachment is obsolete: true
Keywords: topembed

Updated

17 years ago
Keywords: topembed → topembed+
(Assignee)

Comment 4

17 years ago
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.
(Assignee)

Comment 6

17 years ago
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.
(Assignee)

Comment 7

17 years ago
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+
(Assignee)

Comment 12

17 years ago
Fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 13

17 years ago
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.