mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1228125 (part 3) - Remove nsIWidget::GetClientBoundsUntyped(). r=botond.
This commit is contained in:
parent
d5979752f7
commit
eca93c623a
@ -1205,10 +1205,10 @@ CompositorD3D11::PrepareViewport(const gfx::IntSize& aSize,
|
||||
void
|
||||
CompositorD3D11::EnsureSize()
|
||||
{
|
||||
IntRect rect;
|
||||
mWidget->GetClientBoundsUntyped(rect);
|
||||
LayoutDeviceIntRect rect;
|
||||
mWidget->GetClientBounds(rect);
|
||||
|
||||
mSize = rect.Size();
|
||||
mSize = rect.Size().ToUnknownSize();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -702,10 +702,10 @@ CompositorD3D9::PrepareViewport(const gfx::IntSize& aSize)
|
||||
void
|
||||
CompositorD3D9::EnsureSize()
|
||||
{
|
||||
IntRect rect;
|
||||
mWidget->GetClientBoundsUntyped(rect);
|
||||
LayoutDeviceIntRect rect;
|
||||
mWidget->GetClientBounds(rect);
|
||||
|
||||
mSize = rect.Size();
|
||||
mSize = rect.Size().ToUnknownSize();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -298,13 +298,13 @@ void nsView::DoResetWidgetBounds(bool aMoveOnly,
|
||||
|
||||
// Stash a copy of these and use them so we can handle this being deleted (say
|
||||
// from sync painting/flushing from Show/Move/Resize on the widget).
|
||||
nsIntRect newBounds;
|
||||
LayoutDeviceIntRect newBounds;
|
||||
RefPtr<nsDeviceContext> dx = mViewManager->GetDeviceContext();
|
||||
|
||||
nsWindowType type = widget->WindowType();
|
||||
|
||||
nsIntRect curBounds;
|
||||
widget->GetClientBoundsUntyped(curBounds);
|
||||
LayoutDeviceIntRect curBounds;
|
||||
widget->GetClientBounds(curBounds);
|
||||
bool invisiblePopup = type == eWindowType_popup &&
|
||||
((curBounds.IsEmpty() && mDimBounds.IsEmpty()) ||
|
||||
mVis == nsViewVisibility_kHide);
|
||||
@ -312,7 +312,7 @@ void nsView::DoResetWidgetBounds(bool aMoveOnly,
|
||||
if (invisiblePopup) {
|
||||
// We're going to hit the early exit below, avoid calling CalcWidgetBounds.
|
||||
} else {
|
||||
newBounds = CalcWidgetBounds(type);
|
||||
newBounds = LayoutDeviceIntRect::FromUnknownRect(CalcWidgetBounds(type));
|
||||
}
|
||||
|
||||
bool curVisibility = widget->IsVisible();
|
||||
|
@ -850,19 +850,10 @@ class nsIWidget : public nsISupports {
|
||||
* position of the client area relative to the client area of the parent
|
||||
* widget (for root widgets and popup widgets it is in screen coordinates).
|
||||
*
|
||||
* The untyped version exists temporarily to ease conversion to typed
|
||||
* coordinates.
|
||||
*
|
||||
* @param aRect On return it holds the x. y, width and height of
|
||||
* the client area of this widget.
|
||||
*/
|
||||
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect& aRect) = 0;
|
||||
NS_IMETHOD GetClientBoundsUntyped(nsIntRect& aRect) {
|
||||
LayoutDeviceIntRect tmp;
|
||||
nsresult rv = GetClientBounds(tmp);
|
||||
aRect = tmp.ToUnknownRect();
|
||||
return rv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the non-client area dimensions of the window.
|
||||
|
@ -145,8 +145,8 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
|
||||
|
||||
// XXX: need to get the default window size from prefs...
|
||||
// Doesn't come from prefs... will come from CSS/XUL/RDF
|
||||
nsIntRect r(initialX, initialY, aInitialWidth, aInitialHeight);
|
||||
|
||||
LayoutDeviceIntRect r(initialX, initialY, aInitialWidth, aInitialHeight);
|
||||
|
||||
// Create top level window
|
||||
mWindow = do_CreateInstance(kWindowCID, &rv);
|
||||
if (NS_OK != rv) {
|
||||
@ -173,9 +173,9 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
|
||||
mWindow->SetWidgetListener(this);
|
||||
mWindow->Create((nsIWidget *)parentWidget, // Parent nsIWidget
|
||||
nullptr, // Native parent widget
|
||||
r, // Widget dimensions
|
||||
r.ToUnknownRect(), // Widget dimensions
|
||||
&widgetInitData); // Widget initialization data
|
||||
mWindow->GetClientBoundsUntyped(r);
|
||||
mWindow->GetClientBounds(r);
|
||||
// Match the default background color of content. Important on windows
|
||||
// since we no longer use content child widgets.
|
||||
mWindow->SetBackgroundColor(NS_RGB(255,255,255));
|
||||
|
Loading…
Reference in New Issue
Block a user