Bug 1129774. Part 5: Remove aContext parameter from nsIWidget::Create. r=jmathies
This commit is contained in:
@@ -1096,8 +1096,7 @@ TabChild::Init()
|
||||
mWidget->Create(
|
||||
nullptr, 0, // no parents
|
||||
nsIntRect(nsIntPoint(0, 0), nsIntSize(0, 0)),
|
||||
nullptr, // HandleWidgetEvent
|
||||
nullptr // nsDeviceContext
|
||||
nullptr // HandleWidgetEvent
|
||||
);
|
||||
|
||||
baseWindow->InitWindow(0, mWidget, 0, 0, 0, 0);
|
||||
@@ -3503,7 +3502,7 @@ TabChild::CreatePluginWidget(nsIWidget* aParent, nsIWidget** aOut)
|
||||
initData.clipChildren = true;
|
||||
initData.clipSiblings = true;
|
||||
nsresult rv = pluginWidget->Create(aParent, nullptr, nsIntRect(nsIntPoint(0, 0),
|
||||
nsIntSize(0, 0)), nullptr, &initData);
|
||||
nsIntSize(0, 0)), &initData);
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Creating native plugin widget on the chrome side failed.");
|
||||
}
|
||||
|
||||
@@ -2891,7 +2891,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::CreateWidget(void)
|
||||
initData.clipChildren = true;
|
||||
initData.clipSiblings = true;
|
||||
rv = mWidget->Create(parentWidget.get(), nullptr, nsIntRect(0,0,0,0),
|
||||
nullptr, &initData);
|
||||
&initData);
|
||||
if (NS_FAILED(rv)) {
|
||||
mWidget->Destroy();
|
||||
mWidget = nullptr;
|
||||
|
||||
@@ -133,7 +133,7 @@ PluginWidgetParent::RecvCreate(nsresult* aResult)
|
||||
initData.clipChildren = true;
|
||||
initData.clipSiblings = true;
|
||||
*aResult = mWidget->Create(parentWidget.get(), nullptr, nsIntRect(0,0,0,0),
|
||||
nullptr, &initData);
|
||||
&initData);
|
||||
if (NS_FAILED(*aResult)) {
|
||||
mWidget->Destroy();
|
||||
mWidget = nullptr;
|
||||
|
||||
@@ -1112,7 +1112,7 @@ NS_IMETHODIMP nsWebBrowser::Create()
|
||||
nsIntRect bounds(mInitInfo->x, mInitInfo->y, mInitInfo->cx, mInitInfo->cy);
|
||||
|
||||
mInternalWidget->SetWidgetListener(this);
|
||||
mInternalWidget->Create(nullptr, mParentNativeWindow, bounds, nullptr, &widgetInit);
|
||||
mInternalWidget->Create(nullptr, mParentNativeWindow, bounds, &widgetInit);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShell> docShell(do_CreateInstance("@mozilla.org/docshell;1", &rv));
|
||||
|
||||
@@ -54,7 +54,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr) MOZ_OVERRIDE { return NS_OK; }
|
||||
NS_IMETHOD Show(bool aState) MOZ_OVERRIDE { return NS_OK; }
|
||||
virtual bool IsVisible() const MOZ_OVERRIDE { return true; }
|
||||
|
||||
@@ -50,7 +50,6 @@ NS_IMETHODIMP
|
||||
PluginWidgetProxy::Create(nsIWidget* aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect& aRect,
|
||||
nsDeviceContext* aContext,
|
||||
nsWidgetInitData* aInitData)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
|
||||
// nsIWidget
|
||||
NS_IMETHOD Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
||||
const nsIntRect& aRect, nsDeviceContext* aContext,
|
||||
const nsIntRect& aRect,
|
||||
nsWidgetInitData* aInitData = nullptr) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Destroy() MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetFocus(bool aRaise = false) MOZ_OVERRIDE;
|
||||
|
||||
@@ -96,7 +96,6 @@ NS_IMETHODIMP
|
||||
PuppetWidget::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
MOZ_ASSERT(!aNativeParent, "got a non-Puppet native parent");
|
||||
@@ -147,7 +146,7 @@ PuppetWidget::CreateChild(const nsIntRect &aRect,
|
||||
nsCOMPtr<nsIWidget> widget = nsIWidget::CreatePuppetWidget(mTabChild);
|
||||
return ((widget &&
|
||||
NS_SUCCEEDED(widget->Create(isPopup ? nullptr: this, nullptr, aRect,
|
||||
aContext, aInitData))) ?
|
||||
aInitData))) ?
|
||||
widget.forget() : nullptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget* aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect& aRect,
|
||||
nsDeviceContext* aContext,
|
||||
nsWidgetInitData* aInitData = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
void InitIMEState();
|
||||
|
||||
@@ -211,7 +211,6 @@ NS_IMETHODIMP
|
||||
nsWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
ALOG("nsWindow[%p]::Create %p [%d %d %d %d]", (void*)this, (void*)aParent, aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
|
||||
@@ -66,7 +66,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData);
|
||||
NS_IMETHOD Destroy(void);
|
||||
NS_IMETHOD ConfigureChildren(const nsTArray<nsIWidget::Configuration>&);
|
||||
|
||||
@@ -355,7 +355,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Destroy() MOZ_OVERRIDE;
|
||||
|
||||
@@ -465,7 +465,6 @@ nsChildView::ReleaseTitlebarCGContext()
|
||||
nsresult nsChildView::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
@@ -258,7 +258,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget* aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD Destroy() MOZ_OVERRIDE;
|
||||
@@ -372,8 +371,7 @@ protected:
|
||||
nsresult CreateNativeWindow(const NSRect &aRect,
|
||||
nsBorderStyle aBorderStyle,
|
||||
bool aRectIsFrameRect);
|
||||
nsresult CreatePopupContentView(const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext);
|
||||
nsresult CreatePopupContentView(const nsIntRect &aRect);
|
||||
void DestroyNativeWindow();
|
||||
void AdjustWindowShadow();
|
||||
void SetWindowBackgroundBlur();
|
||||
|
||||
@@ -253,7 +253,6 @@ static bool UseNativePopupWindows()
|
||||
nsresult nsCocoaWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
@@ -300,7 +299,7 @@ nsresult nsCocoaWindow::Create(nsIWidget *aParent,
|
||||
newBounds.y *= scale;
|
||||
newBounds.width *= scale;
|
||||
newBounds.height *= scale;
|
||||
return CreatePopupContentView(newBounds, aContext);
|
||||
return CreatePopupContentView(newBounds);
|
||||
}
|
||||
|
||||
mIsAnimationSuppressed = aInitData->mIsAnimationSuppressed;
|
||||
@@ -486,8 +485,7 @@ nsresult nsCocoaWindow::CreateNativeWindow(const NSRect &aRect,
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK_NSRESULT;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext)
|
||||
NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
@@ -499,7 +497,7 @@ NS_IMETHODIMP nsCocoaWindow::CreatePopupContentView(const nsIntRect &aRect,
|
||||
NS_ADDREF(mPopupContentView);
|
||||
|
||||
nsIWidget* thisAsWidget = static_cast<nsIWidget*>(this);
|
||||
mPopupContentView->Create(thisAsWidget, nullptr, aRect, aContext, nullptr);
|
||||
mPopupContentView->Create(thisAsWidget, nullptr, aRect, nullptr);
|
||||
|
||||
ChildView* newContentView = (ChildView*)mPopupContentView->GetNativeData(NS_NATIVE_WIDGET);
|
||||
[mWindow setContentView:newContentView];
|
||||
|
||||
@@ -352,7 +352,6 @@ NS_IMETHODIMP
|
||||
nsWindow::Create(nsIWidget *aParent,
|
||||
void *aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
BaseCreate(aParent, IS_TOPLEVEL() ? sVirtualBounds : aRect,
|
||||
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
void *aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData);
|
||||
NS_IMETHOD Destroy(void);
|
||||
|
||||
|
||||
@@ -3441,7 +3441,6 @@ nsresult
|
||||
nsWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
// only set the base parent if we're going to be a dialog or a
|
||||
|
||||
@@ -92,7 +92,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData) MOZ_OVERRIDE;
|
||||
NS_IMETHOD Destroy(void) MOZ_OVERRIDE;
|
||||
virtual nsIWidget *GetParent() MOZ_OVERRIDE;
|
||||
|
||||
@@ -332,8 +332,7 @@ nsBaseWidget::CreateChild(const nsIntRect &aRect,
|
||||
}
|
||||
|
||||
if (widget &&
|
||||
NS_SUCCEEDED(widget->Create(parent, nativeParent, aRect,
|
||||
aContext, aInitData))) {
|
||||
NS_SUCCEEDED(widget->Create(parent, nativeParent, aRect, aInitData))) {
|
||||
return widget.forget();
|
||||
}
|
||||
|
||||
|
||||
@@ -793,14 +793,12 @@ class nsIWidget : public nsISupports {
|
||||
* @param aParent parent nsIWidget
|
||||
* @param aNativeParent native parent widget
|
||||
* @param aRect the widget dimension
|
||||
* @param aContext
|
||||
* @param aInitData data that is used for widget initialization
|
||||
*
|
||||
*/
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr) = 0;
|
||||
|
||||
/**
|
||||
|
||||
@@ -134,7 +134,6 @@ nsresult
|
||||
nsWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
// only set the base parent if we're not going to be a dialog or a
|
||||
|
||||
@@ -91,7 +91,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData);
|
||||
NS_IMETHOD Destroy(void);
|
||||
|
||||
|
||||
@@ -465,7 +465,6 @@ nsresult
|
||||
nsWindow::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
nsWidgetInitData defaultInitData;
|
||||
|
||||
@@ -94,7 +94,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr);
|
||||
NS_IMETHOD Destroy();
|
||||
NS_IMETHOD SetParent(nsIWidget *aNewParent);
|
||||
|
||||
@@ -205,7 +205,6 @@ NS_IMETHODIMP
|
||||
MetroWidget::Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData)
|
||||
{
|
||||
LogFunction();
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
NS_IMETHOD Create(nsIWidget *aParent,
|
||||
nsNativeWidget aNativeParent,
|
||||
const nsIntRect &aRect,
|
||||
nsDeviceContext *aContext,
|
||||
nsWidgetInitData *aInitData = nullptr);
|
||||
NS_IMETHOD Destroy();
|
||||
NS_IMETHOD EnableDragDrop(bool aEnable);
|
||||
|
||||
@@ -393,7 +393,7 @@ nsAppShellService::CreateWindowlessBrowser(bool aIsChrome, nsIWebNavigation **aR
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
widget->Create(nullptr, 0, nsIntRect(nsIntPoint(0, 0), nsIntSize(0, 0)),
|
||||
nullptr, nullptr);
|
||||
nullptr);
|
||||
nsCOMPtr<nsIBaseWindow> window = do_QueryInterface(navigation);
|
||||
window->InitWindow(0, widget, 0, 0, 0, 0);
|
||||
window->Create();
|
||||
|
||||
@@ -172,7 +172,6 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
|
||||
mWindow->Create((nsIWidget *)parentWidget, // Parent nsIWidget
|
||||
nullptr, // Native parent widget
|
||||
r, // Widget dimensions
|
||||
nullptr, // Device context
|
||||
&widgetInitData); // Widget initialization data
|
||||
mWindow->GetClientBounds(r);
|
||||
// Match the default background color of content. Important on windows
|
||||
|
||||
Reference in New Issue
Block a user