зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
459804828f
Коммит
7e87f3a1d2
|
@ -132,12 +132,14 @@ NS_IMPL_ISUPPORTS(nsBaseWidget, nsIWidget, nsISupportsWeakReference)
|
|||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
nsBaseWidget::nsBaseWidget()
|
||||
nsBaseWidget::nsBaseWidget() : nsBaseWidget(eBorderStyle_none) {}
|
||||
|
||||
nsBaseWidget::nsBaseWidget(nsBorderStyle aBorderStyle)
|
||||
: mWidgetListener(nullptr),
|
||||
mAttachedWidgetListener(nullptr),
|
||||
mPreviouslyAttachedWidgetListener(nullptr),
|
||||
mCompositorVsyncDispatcher(nullptr),
|
||||
mBorderStyle(eBorderStyle_none),
|
||||
mBorderStyle(aBorderStyle),
|
||||
mBounds(0, 0, 0, 0),
|
||||
mOriginalBounds(nullptr),
|
||||
mSizeMode(nsSizeMode_Normal),
|
||||
|
|
|
@ -159,6 +159,8 @@ class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
|
|||
public:
|
||||
nsBaseWidget();
|
||||
|
||||
explicit nsBaseWidget(nsBorderStyle aBorderStyle);
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
// nsIWidget interface
|
||||
|
|
|
@ -635,14 +635,14 @@ class InitializeVirtualDesktopManagerTask : public Task {
|
|||
**************************************************************/
|
||||
|
||||
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),
|
||||
mLastPaintEndTime(TimeStamp::Now()),
|
||||
mCachedHitTestTime(TimeStamp::Now()),
|
||||
mSizeConstraintsScale(GetDefaultScale().scale),
|
||||
mDesktopId("DesktopIdMutex") {
|
||||
mWindowType = eWindowType_child;
|
||||
mBorderStyle = eBorderStyle_default;
|
||||
MOZ_ASSERT(mWindowType == eWindowType_child);
|
||||
|
||||
if (!gInitializedVirtualDesktopManager) {
|
||||
TaskController::Get()->AddTask(
|
||||
|
|
|
@ -21,6 +21,9 @@ class nsWindowBase : public nsBaseWidget {
|
|||
public:
|
||||
typedef mozilla::WidgetEventTime WidgetEventTime;
|
||||
|
||||
explicit nsWindowBase(nsBorderStyle aBorderStyle)
|
||||
: nsBaseWidget(aBorderStyle) {}
|
||||
|
||||
/*
|
||||
* Return the HWND or null for this widget.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче