Closed Bug 683085 Opened 8 years ago Closed 8 years ago

NativeParentWidget used incorrectly in Widget Qt port

Categories

(Core Graveyard :: Widget: Qt, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla9

People

(Reporter: romaxa, Assigned: romaxa)

Details

Attachments

(1 file, 1 obsolete file)

Currently we are casting aNativeParent widget to MozQWidget and trying to get Receiver in createQWidget function, which is going to be incorrect in case of embedding (when nativeParent will be just QGraphicsWidget from 3rd party embedding application)
Also created Magic parent widget handle, in order to make it possible to init mozqwidget without any parent (windowless embedding).
Assignee: nobody → romaxa
Status: NEW → ASSIGNED
Attachment #556753 - Flags: review?(doug.turner)
Comment on attachment 556753 [details] [diff] [review]
Fix embedding widget initialization in Qt port

Review of attachment 556753 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/src/qt/nsWindow.cpp
@@ +136,5 @@
>  #define GLdouble_defined 1
>  #include "Layers.h"
>  #include "LayerManagerOGL.h"
>  
> +#define PARENTLESS_WIDGET (void*)0x13579

What the hell is this? ;D
it is the hack, in order to allow to create nsIWidget without native and non-native parent,
Current code like this: http://mxr.mozilla.org/mozilla-central/source/embedding/browser/webBrowser/nsWebBrowser.cpp#1120
does not allow us to create BaseWindow without any parent, but that would be useful for windowless embedding or creating simple rendering base and get rendered layout from Layout::RenderDocument API...

This hack simply allow to pass that narrow place and detect this mode.
Comment on attachment 556753 [details] [diff] [review]
Fix embedding widget initialization in Qt port

Review of attachment 556753 [details] [diff] [review]:
-----------------------------------------------------------------

r+ if you add a comment about that value.

::: widget/src/qt/nsWindow.cpp
@@ +136,5 @@
>  #define GLdouble_defined 1
>  #include "Layers.h"
>  #include "LayerManagerOGL.h"
>  
> +#define PARENTLESS_WIDGET (void*)0x13579

You need to comment why this value is picked.
Attachment #556753 - Flags: review?(doug.turner) → review+
Moving r+
Attachment #556753 - Attachment is obsolete: true
Attachment #560857 - Flags: review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.