Bug 1129774. Part 4: Remove aContext parameter from AttachViewToTopLevel. r=jmathies

--HG--
extra : rebase_source : e9fd43e7754223f469e2a97315c3d6bd1c6bbca3
This commit is contained in:
Robert O'Callahan 2015-02-05 18:33:49 +13:00
parent 378416b9f9
commit 45f4974998
4 changed files with 4 additions and 9 deletions

View File

@ -697,11 +697,9 @@ nsresult nsView::AttachToTopLevelWidget(nsIWidget* aWidget)
}
}
nsRefPtr<nsDeviceContext> 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;

View File

@ -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 ||

View File

@ -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;

View File

@ -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