зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1293596 (part 1) - Don't use NS_IMETHOD for nsIWidget::AttachViewToTopLevel. r=karlt.
This commit is contained in:
Родитель
335980d902
Коммит
8e6f32c5b4
|
@ -691,9 +691,7 @@ nsresult nsView::AttachToTopLevelWidget(nsIWidget* aWidget)
|
|||
|
||||
// Note, the previous device context will be released. Detaching
|
||||
// will not restore the old one.
|
||||
nsresult rv = aWidget->AttachViewToTopLevel(!nsIWidget::UsePuppetWidgets());
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
aWidget->AttachViewToTopLevel(!nsIWidget::UsePuppetWidgets());
|
||||
|
||||
mWindow = aWidget;
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ nsBaseWidget::CreateChild(const LayoutDeviceIntRect& aRect,
|
|||
}
|
||||
|
||||
// Attach a view to our widget which we'll send events to.
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
nsBaseWidget::AttachViewToTopLevel(bool aUseAttachedEvents)
|
||||
{
|
||||
NS_ASSERTION((mWindowType == eWindowType_toplevel ||
|
||||
|
@ -485,8 +485,6 @@ nsBaseWidget::AttachViewToTopLevel(bool aUseAttachedEvents)
|
|||
"Can't attach to window of that type");
|
||||
|
||||
mUseAttachedEvents = aUseAttachedEvents;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIWidgetListener* nsBaseWidget::GetAttachedWidgetListener()
|
||||
|
|
|
@ -262,7 +262,7 @@ public:
|
|||
CreateChild(const LayoutDeviceIntRect& aRect,
|
||||
nsWidgetInitData* aInitData = nullptr,
|
||||
bool aForceUseIWidgetParent = false) override;
|
||||
NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents) override;
|
||||
virtual void AttachViewToTopLevel(bool aUseAttachedEvents) override;
|
||||
virtual nsIWidgetListener* GetAttachedWidgetListener() override;
|
||||
virtual void SetAttachedWidgetListener(nsIWidgetListener* aListener) override;
|
||||
virtual nsIWidgetListener* GetPreviouslyAttachedWidgetListener() override;
|
||||
|
|
|
@ -479,7 +479,7 @@ class nsIWidget : public nsISupports
|
|||
* aUseAttachedEvents if true, events are sent to the attached listener
|
||||
* instead of the normal listener.
|
||||
*/
|
||||
NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents) = 0;
|
||||
virtual void AttachViewToTopLevel(bool aUseAttachedEvents) = 0;
|
||||
|
||||
/**
|
||||
* Accessor functions to get and set the attached listener. Used by
|
||||
|
|
Загрузка…
Ссылка в новой задаче