forked from mirrors/gecko-dev
Bug 1756621 - Allow nsBaseWidget::mBorderStyle to be set via constructor r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D139741
This commit is contained in:
parent
459804828f
commit
7e87f3a1d2
4 changed files with 12 additions and 5 deletions
|
|
@ -132,12 +132,14 @@ NS_IMPL_ISUPPORTS(nsBaseWidget, nsIWidget, nsISupportsWeakReference)
|
||||||
//
|
//
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
nsBaseWidget::nsBaseWidget()
|
nsBaseWidget::nsBaseWidget() : nsBaseWidget(eBorderStyle_none) {}
|
||||||
|
|
||||||
|
nsBaseWidget::nsBaseWidget(nsBorderStyle aBorderStyle)
|
||||||
: mWidgetListener(nullptr),
|
: mWidgetListener(nullptr),
|
||||||
mAttachedWidgetListener(nullptr),
|
mAttachedWidgetListener(nullptr),
|
||||||
mPreviouslyAttachedWidgetListener(nullptr),
|
mPreviouslyAttachedWidgetListener(nullptr),
|
||||||
mCompositorVsyncDispatcher(nullptr),
|
mCompositorVsyncDispatcher(nullptr),
|
||||||
mBorderStyle(eBorderStyle_none),
|
mBorderStyle(aBorderStyle),
|
||||||
mBounds(0, 0, 0, 0),
|
mBounds(0, 0, 0, 0),
|
||||||
mOriginalBounds(nullptr),
|
mOriginalBounds(nullptr),
|
||||||
mSizeMode(nsSizeMode_Normal),
|
mSizeMode(nsSizeMode_Normal),
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,8 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
||||||
public:
|
public:
|
||||||
nsBaseWidget();
|
nsBaseWidget();
|
||||||
|
|
||||||
|
explicit nsBaseWidget(nsBorderStyle aBorderStyle);
|
||||||
|
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
|
|
||||||
// nsIWidget interface
|
// nsIWidget interface
|
||||||
|
|
|
||||||
|
|
@ -635,14 +635,14 @@ class InitializeVirtualDesktopManagerTask : public Task {
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
|
|
||||||
nsWindow::nsWindow(bool aIsChildWindow)
|
nsWindow::nsWindow(bool aIsChildWindow)
|
||||||
: mBrush(::CreateSolidBrush(NSRGB_2_COLOREF(::GetSysColor(COLOR_BTNFACE)))),
|
: nsWindowBase(eBorderStyle_default),
|
||||||
|
mBrush(::CreateSolidBrush(NSRGB_2_COLOREF(::GetSysColor(COLOR_BTNFACE)))),
|
||||||
mIsChildWindow(aIsChildWindow),
|
mIsChildWindow(aIsChildWindow),
|
||||||
mLastPaintEndTime(TimeStamp::Now()),
|
mLastPaintEndTime(TimeStamp::Now()),
|
||||||
mCachedHitTestTime(TimeStamp::Now()),
|
mCachedHitTestTime(TimeStamp::Now()),
|
||||||
mSizeConstraintsScale(GetDefaultScale().scale),
|
mSizeConstraintsScale(GetDefaultScale().scale),
|
||||||
mDesktopId("DesktopIdMutex") {
|
mDesktopId("DesktopIdMutex") {
|
||||||
mWindowType = eWindowType_child;
|
MOZ_ASSERT(mWindowType == eWindowType_child);
|
||||||
mBorderStyle = eBorderStyle_default;
|
|
||||||
|
|
||||||
if (!gInitializedVirtualDesktopManager) {
|
if (!gInitializedVirtualDesktopManager) {
|
||||||
TaskController::Get()->AddTask(
|
TaskController::Get()->AddTask(
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,9 @@ class nsWindowBase : public nsBaseWidget {
|
||||||
public:
|
public:
|
||||||
typedef mozilla::WidgetEventTime WidgetEventTime;
|
typedef mozilla::WidgetEventTime WidgetEventTime;
|
||||||
|
|
||||||
|
explicit nsWindowBase(nsBorderStyle aBorderStyle)
|
||||||
|
: nsBaseWidget(aBorderStyle) {}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return the HWND or null for this widget.
|
* Return the HWND or null for this widget.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue