Closed
Bug 312208
Opened 21 years ago
Closed 21 years ago
Carbon menu code cleanup
Categories
(Core Graveyard :: Widget: Mac, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jaas, Assigned: jaas)
Details
Attachments
(1 file, 1 obsolete file)
|
11.37 KB,
patch
|
mark
:
review+
bent.mozilla
:
review+
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
When I was writing the Cocoa menus, I found a bunch of Carbon menu code that can
be cleaned up. Even though we're not going to use it for much longer, it'll
probably be a reference for some time to come. This bug is for landing some of
the cleanup that can be done.
Attachment #199325 -
Flags: review?(mark)
Comment 2•21 years ago
|
||
Comment on attachment 199325 [details] [diff] [review]
patch v1.0
In both headers, you have:
+#import <Carbon/Carbon.h>
#include, please.
More importantly, in nsMenuBarX.cpp, you have:
@@ -720,22 +691,16 @@
nsMenuBarX::ContentAppended( nsIDocument * aDocument, nsIContent *
aContainer,
PRInt32 aNewIndexInContainer)
{
- if ( aContainer == mMenuBarContent ) {
- //Register(aContainer, );
- //InsertMenu ( aNewIndexInContainer );
- }
+ nsCOMPtr<nsIChangeObserver> obs;
+ Lookup(aContainer, getter_AddRefs(obs));
+ if (obs)
+ obs->ContentInserted(aDocument, aContainer, aNewIndexInContainer);
else {
- nsCOMPtr<nsIChangeObserver> obs;
- Lookup ( aContainer, getter_AddRefs(obs) );
- if ( obs )
- obs->ContentInserted ( aDocument, aContainer, aNewIndexInContainer );
[...]
You're now doing Lookup even if aContainer == mMenuBarContent. That doesn't
seem right.
Attachment #199325 -
Flags: review?(mark) → review-
nice catch
Attachment #199325 -
Attachment is obsolete: true
Attachment #199354 -
Flags: review?(mark)
Comment 4•21 years ago
|
||
Comment on attachment 199354 [details] [diff] [review]
patch v1.1
Much better.
Attachment #199354 -
Flags: review?(mark) → review+
Attachment #199354 -
Flags: superreview?(mikepinkerton)
Updated•21 years ago
|
Attachment #199354 -
Flags: review?(bent.mozilla)
Updated•21 years ago
|
Attachment #199354 -
Flags: review?(bent.mozilla) → review+
Comment 5•21 years ago
|
||
Comment on attachment 199354 [details] [diff] [review]
patch v1.1
sr=pink
Attachment #199354 -
Flags: superreview?(mikepinkerton) → superreview+
Landed on trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•