diff --git a/view/nsView.cpp b/view/nsView.cpp index dc4a27b0875..49cb2085144 100644 --- a/view/nsView.cpp +++ b/view/nsView.cpp @@ -697,11 +697,9 @@ nsresult nsView::AttachToTopLevelWidget(nsIWidget* aWidget) } } - nsRefPtr dx = mViewManager->GetDeviceContext(); - // Note, the previous device context will be released. Detaching // will not restore the old one. - nsresult rv = aWidget->AttachViewToTopLevel(!nsIWidget::UsePuppetWidgets(), dx); + nsresult rv = aWidget->AttachViewToTopLevel(!nsIWidget::UsePuppetWidgets()); if (NS_FAILED(rv)) return rv; diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 682cf179d53..f76678e7f2c 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -342,8 +342,7 @@ nsBaseWidget::CreateChild(const nsIntRect &aRect, // Attach a view to our widget which we'll send events to. NS_IMETHODIMP -nsBaseWidget::AttachViewToTopLevel(bool aUseAttachedEvents, - nsDeviceContext *aContext) +nsBaseWidget::AttachViewToTopLevel(bool aUseAttachedEvents) { NS_ASSERTION((mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog || diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h index b8721223222..79cb52c5e55 100644 --- a/widget/nsBaseWidget.h +++ b/widget/nsBaseWidget.h @@ -215,7 +215,7 @@ public: nsDeviceContext *aContext, nsWidgetInitData *aInitData = nullptr, bool aForceUseIWidgetParent = false) MOZ_OVERRIDE; - NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents, nsDeviceContext *aContext) MOZ_OVERRIDE; + NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents) MOZ_OVERRIDE; virtual nsIWidgetListener* GetAttachedWidgetListener() MOZ_OVERRIDE; virtual void SetAttachedWidgetListener(nsIWidgetListener* aListener) MOZ_OVERRIDE; NS_IMETHOD RegisterTouchWindow() MOZ_OVERRIDE; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index dd0b60683d7..9d9fd53539e 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -838,10 +838,8 @@ class nsIWidget : public nsISupports { * * aUseAttachedEvents if true, events are sent to the attached listener * instead of the normal listener. - * aContext The new device context for the view */ - NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents, - nsDeviceContext *aContext) = 0; + NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents) = 0; /** * Accessor functions to get and set the attached listener. Used by