The default bug view has changed. See this FAQ.

NativeParentWidget used incorrectly in Widget Qt port

RESOLVED FIXED in mozilla9

Status

Core Graveyard
Widget: Qt
RESOLVED FIXED
6 years ago
9 months ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla9
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

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

Comment 1

6 years ago
Created attachment 556753 [details] [diff] [review]
Fix embedding widget initialization in Qt port

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 2

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

Comment 3

6 years ago
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 4

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

Comment 5

6 years ago
Created attachment 560857 [details] [diff] [review]
Added comment, to push

Moving r+
Attachment #556753 - Attachment is obsolete: true
Attachment #560857 - Flags: review+
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/22ae18b4d013

Updated

6 years ago
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/22ae18b4d013
Target Milestone: --- → mozilla9

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.