Closed
Bug 168117
Opened 23 years ago
Closed 17 years ago
Need to implement nsIWidget::SetParent on the Mac
Categories
(Core Graveyard :: Widget: Mac, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.9.1b2
People
(Reporter: kmcclusk, Assigned: zwol)
References
()
Details
(Keywords: top100, Whiteboard: whitebox)
Attachments
(1 file, 5 obsolete files)
2.14 KB,
patch
|
jaas
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
this bug was broken off from bug 129034.
The platform specific widget library needs to support reparenting existing
nsIWidget's by implementing the nsIWidget::SetParent method. Until this is
Mozilla's print preview will sometimes display iframes and other elements which
require native widgets on the wrong page.
CC'ing peterl since plugin's also need this capability.
Reporter | ||
Updated•23 years ago
|
URL: www.news.com
Updated•23 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla1.3alpha
Updated•23 years ago
|
Whiteboard: whitebox
Reporter | ||
Comment 1•23 years ago
|
||
-> sfraser
Assignee: dcone → sfraser
Target Milestone: mozilla1.3alpha → mozilla1.4beta
Reporter | ||
Comment 3•23 years ago
|
||
The testcase in bug 129034 can be used. If you load the test and go into print
preview it will attempt to reparent the widget.
http://bugzilla.mozilla.org/attachment.cgi?id=98057&action=view
Comment 4•22 years ago
|
||
How does SetParent play with AddChild/RemoveChild? I don't see the Windows code
updating the child list when SetParent is called. Is this a bug?
Comment 5•22 years ago
|
||
Comment 6•22 years ago
|
||
Attachment #119232 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #119235 -
Flags: superreview?(bryner)
Attachment #119235 -
Flags: review?(pinkerton)
Comment 7•22 years ago
|
||
Comment on attachment 119235 [details] [diff] [review]
Implement SetParent for carbon and cocoa widgets
r=pink
Attachment #119235 -
Flags: review?(pinkerton) → review+
Updated•22 years ago
|
Attachment #119235 -
Flags: superreview?(bryner) → superreview+
Updated•20 years ago
|
Component: GFX → Widget: Mac
Target Milestone: mozilla1.4beta → ---
Comment 10•18 years ago
|
||
Did this just never land? As Mats asks, is this patch still valid? Simon, can you comment or close this bug, whichever is more relevant?
QA Contact: chrispetersen → mac
Comment 11•18 years ago
|
||
Inspection shows that this never landed. Over to default owner.
Assignee: sfraser_bugs → joshmoz
Status: ASSIGNED → NEW
Assignee | ||
Comment 12•17 years ago
|
||
The patch here seems to have been forgotten for several years. As it's on the critical path for bug 90268 (although only on Mac), it would be nice to land it ASAP.
The current widget/src/cocoa code looks to be unchanged since 2003, so I've rediffed against tip of m-c and dropped the widget/src/mac changes (since Carbon is dead).
Attachment #119235 -
Attachment is obsolete: true
Assignee | ||
Comment 13•17 years ago
|
||
I am tagging this bug for checkin, on the assumption that the reviews from 2003 are still valid. (The only difference between my new patch and Simon's original patch is I threw out the chunks that applied to code that no longer exists.) Note however that I do not have a Mac so I cannot test this at all.
Keywords: checkin-needed
Updated•17 years ago
|
Assignee: nobody → sfraser_bugs
Comment 14•17 years ago
|
||
Status: NEW → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b2
Comment 15•17 years ago
|
||
Comment on attachment 343993 [details] [diff] [review]
rediffed against m-c, carbon dropped
That patch was *way* too old, we need to re-review it.
Attachment #343993 -
Flags: review?(smichaud)
Attachment #343993 -
Flags: review?(joshmoz)
Comment 16•17 years ago
|
||
Comment on attachment 343993 [details] [diff] [review]
rediffed against m-c, carbon dropped
This lacks obj-c exception guards in "nsChildView::SetParent".
Comment 18•17 years ago
|
||
Comment on attachment 343993 [details] [diff] [review]
rediffed against m-c, carbon dropped
This is basically fine.
But (as Josh pointed out) you need to add the following ObjC exception
guards at the beginning and end:
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
And I think you should add the following before the kungFuDeathGrip:
if (mOnDestroyCalled)
return NS_OK;
Assignee | ||
Comment 19•17 years ago
|
||
revised as requested. I still can't even compile this, though.
Assignee: sfraser_bugs → zweinberg
Attachment #343993 -
Attachment is obsolete: true
Attachment #344101 -
Flags: review?(smichaud)
Attachment #343993 -
Flags: review?(smichaud)
Attachment #343993 -
Flags: review?(joshmoz)
Assignee | ||
Comment 20•17 years ago
|
||
I noticed only after uploading that the patch had some unnecessary formatting churn in it, so this takes that out.
Attachment #344101 -
Attachment is obsolete: true
Attachment #344102 -
Flags: review?(smichaud)
Attachment #344101 -
Flags: review?(smichaud)
Comment 21•17 years ago
|
||
Comment on attachment 344102 [details] [diff] [review]
same code as 344101, cosmetic cleanups
Can you compile this one? :-)
Assignee | ||
Comment 22•17 years ago
|
||
Not personally, but I've been informed that it's now possible to use the try server for this sort of thing. (I had been under the impression that with my level of access, I could only use the try server to test CVS patches, not moz-central patches.) There's no label yet, but I think the cycle that started at 9:14:15 is this patch.
Assignee: zweinberg → sfraser_bugs
Comment 23•17 years ago
|
||
So you mean that you don't have a Mac to compile this on? (And don't
mean that you tried and failed to compile this patch?)
By the way, you need to specify a "Patch level" of '1' when telling
the tryserver to process a Mercurial patch.
Assignee | ||
Comment 24•17 years ago
|
||
(In reply to comment #23)
> So you mean that you don't have a Mac to compile this on? (And don't
> mean that you tried and failed to compile this patch?)
Correct. I only have Linux installations to hand.
I wouldn't post a patch that I had gotten compile errors on!
> By the way, you need to specify a "Patch level" of '1' when telling
> the tryserver to process a Mercurial patch.
Yes, I did. Builds are now at
https://build.mozilla.org/tryserver-builds/2008-10-21_09:14-zweinberg@mozilla.com-mac-setparent/
so it looks like compilation went fine on all platforms, and I guess we'll find out what Talos thinks of them in a couple hours.
Comment 25•17 years ago
|
||
Comment on attachment 344102 [details] [diff] [review]
same code as 344101, cosmetic cleanups
This looks fine to me.
If the tryserver Talos builds indicate any problems (which I think is
highly unlikely), we can deal with that later.
Attachment #344102 -
Flags: review?(smichaud) → review+
Assignee | ||
Comment 26•17 years ago
|
||
Does this need sr or shall I just go ahead and tag it for checkin again?
Comment 27•17 years ago
|
||
Comment on attachment 344102 [details] [diff] [review]
same code as 344101, cosmetic cleanups
This still needs review from me and sr.
Attachment #344102 -
Flags: review?(joshmoz)
Comment 28•17 years ago
|
||
Comment on attachment 344102 [details] [diff] [review]
same code as 344101, cosmetic cleanups
+ [mView removeFromSuperview]; // we hold a ref to mView, so this is OK
Kill the space between the code and this comment or put the comment above the code.
+ mParentView = (NSView*)aNewParent->GetNativeData(NS_NATIVE_WIDGET);
I don't think there is any guarantee that this won't be nil no matter how unlikely. Please nil check it and return NS_ERROR_FAILURE if it is false. Perhaps you should do that check before the actual swap so that if it fails you leave things in a clean state.
Assignee | ||
Comment 29•17 years ago
|
||
here's the requested changes, will kick off another try server build shortly.
Assignee: sfraser_bugs → zweinberg
Attachment #344102 -
Attachment is obsolete: true
Status: REOPENED → ASSIGNED
Attachment #344222 -
Flags: review?(joshmoz)
Attachment #344102 -
Flags: review?(joshmoz)
Assignee | ||
Comment 30•17 years ago
|
||
builds are at https://build.mozilla.org/tryserver-builds/2008-10-21_09:14-zweinberg@mozilla.com-mac-setparent/
talos is green, but it would be nice if someone with a mac could try the test described in comment 3 on this build.
Attachment #344222 -
Flags: review?(joshmoz) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #344222 -
Flags: superreview?(roc)
Attachment #344222 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 31•17 years ago
|
||
Comment on attachment 344222 [details] [diff] [review]
(rev 4) make sure parent native widget exists, more formatting
[Checkin: Comment 31]
http://hg.mozilla.org/mozilla-central/rev/f226385376aa
Attachment #344222 -
Attachment description: (rev 4) make sure parent native widget exists, more formatting → (rev 4) make sure parent native widget exists, more formatting
[Checkin: Comment 31]
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago → 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•