зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1325234 (part 6) - Streamline nsIWidget::SetTitle. r=jimm.
This patch changes it from |NS_IMETHOD| to |virtual nsresult| because some call sites are checked and others aren't. --HG-- extra : rebase_source : 6723b9db709d1506dd394b1e85572309c1c2e2cf
This commit is contained in:
Родитель
ea1e2ca6ce
Коммит
e52b19470c
|
@ -78,7 +78,7 @@ public:
|
|||
virtual nsresult SetFocus(bool aRaise) override { return NS_OK; }
|
||||
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override { return NS_OK; }
|
||||
virtual void Invalidate(const LayoutDeviceIntRect& aRect) override {}
|
||||
NS_IMETHOD SetTitle(const nsAString& title) override { return NS_OK; }
|
||||
virtual nsresult SetTitle(const nsAString& title) override { return NS_OK; }
|
||||
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override { return LayoutDeviceIntPoint(0, 0); }
|
||||
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
|
||||
nsEventStatus& aStatus) override { return NS_OK; }
|
||||
|
|
|
@ -128,7 +128,7 @@ public:
|
|||
#endif
|
||||
|
||||
// PuppetWidgets don't have any concept of titles.
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override
|
||||
{ return NS_ERROR_UNEXPECTED; }
|
||||
|
||||
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
NS_IMETHOD GetHasTransparentBackground(bool& aTransparent) { aTransparent = false; return NS_OK; }
|
||||
void* GetNativeData(uint32_t aDataType) override;
|
||||
void SetNativeData(uint32_t aDataType, uintptr_t aVal) override;
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override { return NS_OK; }
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override { return NS_OK; }
|
||||
virtual MOZ_MUST_USE nsresult GetAttention(int32_t aCycleCount) override { return NS_ERROR_NOT_IMPLEMENTED; }
|
||||
|
||||
NS_IMETHOD_(void) SetInputContext(const InputContext& aContext,
|
||||
|
|
|
@ -366,7 +366,7 @@ public:
|
|||
virtual nsresult SetCursor(imgIContainer* aCursor,
|
||||
uint32_t aHotspotX, uint32_t aHotspotY) override;
|
||||
|
||||
NS_IMETHOD SetTitle(const nsAString& title) override;
|
||||
virtual nsresult SetTitle(const nsAString& title) override;
|
||||
|
||||
virtual MOZ_MUST_USE nsresult
|
||||
GetAttention(int32_t aCycleCount) override;
|
||||
|
|
|
@ -1610,7 +1610,8 @@ LayoutDeviceIntPoint nsChildView::WidgetToScreenOffset()
|
|||
NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(LayoutDeviceIntPoint(0,0));
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsChildView::SetTitle(const nsAString& title)
|
||||
nsresult
|
||||
nsChildView::SetTitle(const nsAString& title)
|
||||
{
|
||||
// child views don't have titles
|
||||
return NS_OK;
|
||||
|
|
|
@ -299,7 +299,7 @@ public:
|
|||
return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
|
||||
}
|
||||
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override;
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override;
|
||||
|
||||
virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
|
||||
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override;
|
||||
|
|
|
@ -1797,7 +1797,8 @@ nsCocoaWindow::SetCursor(imgIContainer* aCursor,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::SetTitle(const nsAString& aTitle)
|
||||
nsresult
|
||||
nsCocoaWindow::SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public:
|
|||
virtual void Invalidate(const LayoutDeviceIntRect& aRect);
|
||||
virtual void* GetNativeData(uint32_t aDataType);
|
||||
virtual void SetNativeData(uint32_t aDataType, uintptr_t aVal);
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle)
|
||||
virtual nsresult SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1772,7 +1772,7 @@ nsWindow::SetNativeData(uint32_t aDataType, uintptr_t aVal)
|
|||
mPluginNativeWindow = (nsPluginNativeWindowGtk*)aVal;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsresult
|
||||
nsWindow::SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
if (!mShell)
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
|
||||
virtual void* GetNativeData(uint32_t aDataType) override;
|
||||
void SetNativeData(uint32_t aDataType, uintptr_t aVal) override;
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override;
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override;
|
||||
virtual void SetIcon(const nsAString& aIconSpec) override;
|
||||
virtual void SetWindowClass(const nsAString& xulWinType) override;
|
||||
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
|
||||
|
|
|
@ -1311,7 +1311,7 @@ class nsIWidget : public nsISupports
|
|||
*
|
||||
* @param aTitle string displayed as the title of the widget
|
||||
*/
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) = 0;
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) = 0;
|
||||
|
||||
/**
|
||||
* Set the widget's icon.
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
}
|
||||
virtual int32_t RoundsWidgetCoordinatesTo() override;
|
||||
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override {
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -3529,7 +3529,8 @@ void nsWindow::FreeNativeData(void * data, uint32_t aDataType)
|
|||
*
|
||||
**************************************************************/
|
||||
|
||||
NS_IMETHODIMP nsWindow::SetTitle(const nsAString& aTitle)
|
||||
nsresult
|
||||
nsWindow::SetTitle(const nsAString& aTitle)
|
||||
{
|
||||
const nsString& strTitle = PromiseFlatString(aTitle);
|
||||
AutoRestore<bool> sendingText(mSendingSetText);
|
||||
|
|
|
@ -161,7 +161,7 @@ public:
|
|||
virtual void* GetNativeData(uint32_t aDataType) override;
|
||||
void SetNativeData(uint32_t aDataType, uintptr_t aVal) override;
|
||||
virtual void FreeNativeData(void * data, uint32_t aDataType) override;
|
||||
NS_IMETHOD SetTitle(const nsAString& aTitle) override;
|
||||
virtual nsresult SetTitle(const nsAString& aTitle) override;
|
||||
virtual void SetIcon(const nsAString& aIconSpec) override;
|
||||
virtual LayoutDeviceIntPoint WidgetToScreenOffset() override;
|
||||
virtual LayoutDeviceIntSize ClientToWindowSize(const LayoutDeviceIntSize& aClientSize) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче