Closed
Bug 168116
Opened 22 years ago
Closed 19 years ago
Need to implement nsIWidget::SetParent on GTK
Categories
(Core Graveyard :: GFX, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: kmcclusk, Assigned: MatsPalmgren_bugz)
References
()
Details
(Keywords: helpwanted, testcase, top100, Whiteboard: whitebox)
Attachments
(2 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
roc
:
review+
roc
:
superreview+
asa
:
approval1.8b4+
|
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•22 years ago
|
URL: www.news.com
Keywords: top100
Updated•22 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
This patch assumes that what we really need to reparent is either mShell or
mMozArea. Rod, do you have a test case that you can apply this patch to? I'd
suggest having blizzard or bryner look at this patch (I cc'd him and bryner)
and see if my assumptions about mShell and mMozArea in this context are
correct.
Comment 3•22 years ago
|
||
In your build open this testcase:
mozilla/layout/html/tests/printer/iframe_2nd_page/index.html
The IFrame should show correct on the 2nd page in PP
Comment 4•22 years ago
|
||
I just applied the fix and looked at the test in PP and the IFrame is still on
the 1st page. BUT! I am now updating my tree to make sure I have all the other
checkins for this.
Comment 5•22 years ago
|
||
Comment on attachment 99699 [details] [diff] [review]
possible patch for this
I don't think it makes sense to reparent mShell, since mShell represents a
toplevel window. I think what we want to do here is reparent mSuperWin, if we
have one. I'll let blizzard give a definitive answer though.
Attachment #99699 -
Flags: needs-work+
Comment 6•22 years ago
|
||
There are a few things to worry about here:
o If the widget that you are reparenting has an mMozArea or an mShell it's going
to be tough. The mMozArea and mSuperWin in that case are linked and you can't
just unparent the superwin from the mozarea and go.
o Reparenting the superwin isn't as easy as it sounds, I don't think that I've
ever tried it, frankly. You have to worry about the focus changes and you have
to worry about making sure that it's properly destroyed.
Comment 7•22 years ago
|
||
At the moment it will only be called for Print Preview so in this case the focus
won't matter.
Reporter | ||
Comment 8•22 years ago
|
||
I don't know if this will help simplify the solution. The SetParent will only be
called for a child window. In addition, the child window will specify a new
parent which will always be a descendant of the same top level window the child
was originally placed in. We will never move a window between top-level windows
and we will never reparent a top-level window to be a child of another top-level
window.
Comment 9•22 years ago
|
||
That does help a bit, yeah.
Updated•22 years ago
|
Target Milestone: mozilla1.2beta → mozilla1.3alpha
Updated•22 years ago
|
Whiteboard: whitebox
Reporter | ||
Comment 10•22 years ago
|
||
nsbeta1-.
This needs to be fixed to fix print preview bugs. (And eventually, to fix column
layout bugs.)
Assignee: rods → caillon
Status: ASSIGNED → NEW
Assignee | ||
Comment 12•19 years ago
|
||
Assignee | ||
Comment 13•19 years ago
|
||
This fixes the first testcase on GTK1 and GTK2.
Robert, you said something about column layout - do you have a suggestion for a
testcase I can try?
Attachment #99699 -
Attachment is obsolete: true
Attachment #190270 -
Flags: superreview?(roc)
Attachment #190270 -
Flags: review?(bryner)
Assignee | ||
Updated•19 years ago
|
URL: www.news.com → http://www.news.com
Keywords: testcase
Comment on attachment 190270 [details] [diff] [review]
Like so?
This won't be necessary in 1.9 because we'll move to no-child-windows but for
1.8 this is probably worth having. It's low risk because in the rare cases
where this gets called we currently just do something really really stupid.
Attachment #190270 -
Flags: superreview?(roc)
Attachment #190270 -
Flags: superreview+
Attachment #190270 -
Flags: review?(bryner)
Attachment #190270 -
Flags: review+
Assignee | ||
Updated•19 years ago
|
Attachment #190270 -
Flags: approval1.8b4?
Assignee | ||
Updated•19 years ago
|
Assignee: caillon → mats.palmgren
Updated•19 years ago
|
Attachment #190270 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 15•19 years ago
|
||
Checked in to trunk at 2005-08-08 19:40 PDT.
-> FIXED
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•