Bug 1129774. Part 6: Remove aContext parameter from nsIWidget::CreateChild. r=jmathies

--HG--
extra : rebase_source : cbe3decbca5f4a212a3ed6cbcd5132729a8b3cd3
This commit is contained in:
Robert O'Callahan 2015-02-05 18:38:47 +13:00
parent 74edebf611
commit b5425a3820
6 changed files with 4 additions and 18 deletions

View File

@ -566,8 +566,6 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsRefPtr<nsDeviceContext> dx = mViewManager->GetDeviceContext();
nsIWidget* parentWidget =
GetParent() ? GetParent()->GetNearestWidget(nullptr) : nullptr;
if (!parentWidget) {
@ -577,8 +575,7 @@ nsresult nsView::CreateWidget(nsWidgetInitData *aWidgetInitData,
// XXX: using aForceUseIWidgetParent=true to preserve previous
// semantics. It's not clear that it's actually needed.
mWindow = parentWidget->CreateChild(trect, dx, aWidgetInitData,
true).take();
mWindow = parentWidget->CreateChild(trect, aWidgetInitData, true).take();
if (!mWindow) {
return NS_ERROR_FAILURE;
}
@ -604,10 +601,8 @@ nsresult nsView::CreateWidgetForParent(nsIWidget* aParentWidget,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsRefPtr<nsDeviceContext> dx = mViewManager->GetDeviceContext();
mWindow =
aParentWidget->CreateChild(trect, dx, aWidgetInitData).take();
aParentWidget->CreateChild(trect, aWidgetInitData).take();
if (!mWindow) {
return NS_ERROR_FAILURE;
}
@ -629,8 +624,6 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
nsIntRect trect = CalcWidgetBounds(aWidgetInitData->mWindowType);
nsRefPtr<nsDeviceContext> dx = mViewManager->GetDeviceContext();
// XXX/cjones: having these two separate creation cases seems ... um
// ... unnecessary, but it's the way the old code did it. Please
// unify them by first finding a suitable parent nsIWidget, then
@ -638,8 +631,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
if (aParentWidget) {
// XXX: using aForceUseIWidgetParent=true to preserve previous
// semantics. It's not clear that it's actually needed.
mWindow = aParentWidget->CreateChild(trect, dx, aWidgetInitData,
true).take();
mWindow = aParentWidget->CreateChild(trect, aWidgetInitData, true).take();
}
else {
nsIWidget* nearestParent = GetParent() ? GetParent()->GetNearestWidget(nullptr)
@ -650,8 +642,7 @@ nsresult nsView::CreateWidgetForPopup(nsWidgetInitData *aWidgetInitData,
return NS_ERROR_FAILURE;
}
mWindow =
nearestParent->CreateChild(trect, dx, aWidgetInitData).take();
mWindow = nearestParent->CreateChild(trect, aWidgetInitData).take();
}
if (!mWindow) {
return NS_ERROR_FAILURE;

View File

@ -138,7 +138,6 @@ PuppetWidget::InitIMEState()
already_AddRefed<nsIWidget>
PuppetWidget::CreateChild(const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData,
bool aForceUseIWidgetParent)
{

View File

@ -65,7 +65,6 @@ public:
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData = nullptr,
bool aForceUseIWidgetParent = false) MOZ_OVERRIDE;

View File

@ -307,7 +307,6 @@ void nsBaseWidget::SetWidgetListener(nsIWidgetListener* aWidgetListener)
already_AddRefed<nsIWidget>
nsBaseWidget::CreateChild(const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData,
bool aForceUseIWidgetParent)
{

View File

@ -212,7 +212,6 @@ public:
double& aOverriddenDeltaY) MOZ_OVERRIDE;
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData = nullptr,
bool aForceUseIWidgetParent = false) MOZ_OVERRIDE;
NS_IMETHOD AttachViewToTopLevel(bool aUseAttachedEvents) MOZ_OVERRIDE;

View File

@ -819,7 +819,6 @@ class nsIWidget : public nsISupports {
*/
virtual already_AddRefed<nsIWidget>
CreateChild(const nsIntRect &aRect,
nsDeviceContext *aContext,
nsWidgetInitData *aInitData = nullptr,
bool aForceUseIWidgetParent = false) = 0;