зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1224403 (part 9) - Remove GetRestoredBoundsUntyped(). r=kats.
The typed version can be used everywhere without difficulty. --HG-- extra : rebase_source : 841d7202126e8be16f47ed2c14c4ec20fe101b28
This commit is contained in:
Родитель
a62e6ee5b7
Коммит
9c6cbed1d0
|
@ -1332,12 +1332,12 @@ NS_METHOD nsBaseWidget::GetScreenBoundsUntyped(nsIntRect &aRect)
|
|||
return GetBoundsUntyped(aRect);
|
||||
}
|
||||
|
||||
NS_METHOD nsBaseWidget::GetRestoredBoundsUntyped(nsIntRect &aRect)
|
||||
NS_METHOD nsBaseWidget::GetRestoredBounds(LayoutDeviceIntRect &aRect)
|
||||
{
|
||||
if (SizeMode() != nsSizeMode_Normal) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return GetScreenBoundsUntyped(aRect);
|
||||
return GetScreenBounds(aRect);
|
||||
}
|
||||
|
||||
nsIntPoint
|
||||
|
|
|
@ -190,7 +190,7 @@ public:
|
|||
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect) override;
|
||||
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) override;
|
||||
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
|
||||
NS_IMETHOD GetRestoredBoundsUntyped(nsIntRect &aRect) override;
|
||||
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) override;
|
||||
NS_IMETHOD GetNonClientMargins(
|
||||
mozilla::LayoutDeviceIntMargin &margins) override;
|
||||
NS_IMETHOD SetNonClientMargins(
|
||||
|
|
|
@ -843,19 +843,10 @@ class nsIWidget : public nsISupports {
|
|||
* This method will always succeed if the current size mode is
|
||||
* nsSizeMode_Normal.
|
||||
*
|
||||
* The untyped version exists temporarily to ease conversion to typed
|
||||
* coordinates.
|
||||
*
|
||||
* @param aRect On return it holds the x, y, width and height of
|
||||
* this widget.
|
||||
*/
|
||||
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) {
|
||||
nsIntRect tmp;
|
||||
nsresult rv = GetRestoredBoundsUntyped(tmp);
|
||||
aRect = mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
|
||||
return rv;
|
||||
}
|
||||
NS_IMETHOD GetRestoredBoundsUntyped(nsIntRect &aRect) = 0;
|
||||
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) = 0;
|
||||
|
||||
/**
|
||||
* Get this widget's client area bounds, if the window has a 3D border
|
||||
|
|
|
@ -1967,10 +1967,10 @@ NS_METHOD nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsWindow::GetRestoredBoundsUntyped(nsIntRect &aRect)
|
||||
NS_METHOD nsWindow::GetRestoredBounds(LayoutDeviceIntRect &aRect)
|
||||
{
|
||||
if (SizeMode() == nsSizeMode_Normal) {
|
||||
return GetScreenBoundsUntyped(aRect);
|
||||
return GetScreenBounds(aRect);
|
||||
}
|
||||
if (!mWnd) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -118,7 +118,7 @@ public:
|
|||
NS_IMETHOD SetFocus(bool aRaise);
|
||||
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect);
|
||||
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect);
|
||||
NS_IMETHOD GetRestoredBoundsUntyped(nsIntRect &aRect) override;
|
||||
NS_IMETHOD GetRestoredBounds(mozilla::LayoutDeviceIntRect &aRect) override;
|
||||
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect);
|
||||
virtual nsIntPoint GetClientOffsetUntyped() override;
|
||||
void SetBackgroundColor(const nscolor &aColor);
|
||||
|
|
Загрузка…
Ссылка в новой задаче