Bug 1223310 (part 2) - Use LayoutDeviceIntRect for bounds-related functions in nsIWidget. r=kats.

The patch renames the existing functions (GetBounds(), GetClientBounds(), etc)
by adding an |Untyped| suffix. It then adds typed equivalents, and uses those
typed equivalents in all the call sites where it's easy to do so. The trickier
remaining call sites are converted to use the Untyped-suffix version.

--HG--
extra : rebase_source : 6bfb15bfc4698e2eba7d4db55497299d3dffcd51
This commit is contained in:
Nicholas Nethercote 2015-11-09 21:37:32 -08:00
Родитель 9895f2b525
Коммит ad0dd8414a
52 изменённых файлов: 176 добавлений и 132 удалений

Просмотреть файл

@ -535,7 +535,7 @@ Accessible::ChildAtPoint(int32_t aX, int32_t aY,
nsIWidget* rootWidget = rootFrame->GetView()->GetNearestWidget(nullptr);
NS_ENSURE_TRUE(rootWidget, nullptr);
nsIntRect rootRect;
LayoutDeviceIntRect rootRect;
rootWidget->GetScreenBounds(rootRect);
WidgetMouseEvent dummyEvent(true, eMouseMove, rootWidget,

Просмотреть файл

@ -5788,7 +5788,7 @@ nsDocShell::GetPositionAndSize(int32_t* aX, int32_t* aY, int32_t* aWidth,
{
if (mParentWidget) {
// ensure size is up-to-date if window has changed resolution
nsIntRect r;
LayoutDeviceIntRect r;
mParentWidget->GetClientBounds(r);
SetPositionAndSize(mBounds.x, mBounds.y, r.width, r.height, false);
}

Просмотреть файл

@ -1859,16 +1859,14 @@ nsDOMWindowUtils::SendQueryContentEvent(uint32_t aType,
nsIFrame* popupFrame =
nsLayoutUtils::GetPopupFrameForEventCoordinates(presContext->GetRootPresContext(), &dummyEvent);
nsIntRect widgetBounds;
LayoutDeviceIntRect widgetBounds;
nsresult rv = widget->GetClientBounds(widgetBounds);
NS_ENSURE_SUCCESS(rv, rv);
widgetBounds.MoveTo(0, 0);
// There is no popup frame at the point and the point isn't in our widget,
// we cannot process this request.
NS_ENSURE_TRUE(popupFrame ||
widgetBounds.Contains(LayoutDeviceIntPoint::ToUntyped(pt)),
NS_ERROR_FAILURE);
NS_ENSURE_TRUE(popupFrame || widgetBounds.Contains(pt), NS_ERROR_FAILURE);
// Fire the event on the widget at the point
if (popupFrame) {

Просмотреть файл

@ -13327,7 +13327,7 @@ nsGlobalWindow::NotifyDefaultButtonLoaded(Element& aDefaultButton,
return;
}
nsIntRect widgetRect;
aError = widget->GetScreenBounds(widgetRect);
aError = widget->GetScreenBoundsUntyped(widgetRect);
if (aError.Failed()) {
return;
}

Просмотреть файл

@ -4144,7 +4144,7 @@ GetWindowInnerRectCenter(nsPIDOMWindow* aWindow,
int32_t innerHeight = window->GetInnerHeightOuter(dummy);
dummy.SuppressException();
nsIntRect screen;
LayoutDeviceIntRect screen;
aWidget->GetScreenBounds(screen);
int32_t cssScreenX = aContext->DevPixelsToIntCSSPixels(screen.x);

Просмотреть файл

@ -845,7 +845,7 @@ NPBool nsPluginInstanceOwner::ConvertPointPuppet(PuppetWidget *widget,
// Window size is tab size + chrome size.
nsIntRect tabContentBounds;
NS_ENSURE_SUCCESS(puppetWidget->GetBounds(tabContentBounds), false);
NS_ENSURE_SUCCESS(puppetWidget->GetBoundsUntyped(tabContentBounds), false);
tabContentBounds.ScaleInverseRoundOut(scaleFactor);
int32_t windowH = tabContentBounds.height + int(chromeSize.y);
@ -951,7 +951,7 @@ NPBool nsPluginInstanceOwner::ConvertPointNoPuppet(nsIWidget *widget,
screen->GetRect(&screenX, &screenY, &screenWidth, &screenHeight);
screenHeight /= scaleFactor;
nsIntRect windowScreenBounds;
LayoutDeviceIntRect windowScreenBounds;
NS_ENSURE_SUCCESS(widget->GetScreenBounds(windowScreenBounds), false);
windowScreenBounds.ScaleInverseRoundOut(scaleFactor);
int32_t windowX = windowScreenBounds.x;

Просмотреть файл

@ -1375,7 +1375,7 @@ nsWebBrowser::GetPositionAndSize(int32_t* aX, int32_t* aY,
*aCY = mInitInfo->cy;
}
} else if (mInternalWidget) {
nsIntRect bounds;
LayoutDeviceIntRect bounds;
NS_ENSURE_SUCCESS(mInternalWidget->GetBounds(bounds), NS_ERROR_FAILURE);
if (aX) {

Просмотреть файл

@ -203,7 +203,7 @@ ClientLayerManager::BeginTransactionWithTarget(gfxContext* aTarget)
hal::GetCurrentScreenConfiguration(&currentConfig);
orientation = currentConfig.orientation();
}
IntRect targetBounds = mWidget->GetNaturalBounds();
IntRect targetBounds = mWidget->GetNaturalBoundsUntyped();
targetBounds.x = targetBounds.y = 0;
mForwarder->BeginTransaction(targetBounds, mTargetRotation, orientation);
@ -492,7 +492,7 @@ ClientLayerManager::MakeSnapshotIfRequired()
// when there's a rotation. Instead we rotate the result
// when drawing into dt
IntRect outerBounds;
mWidget->GetBounds(outerBounds);
mWidget->GetBoundsUntyped(outerBounds);
IntRect bounds = ToOutsideIntRect(mShadowTarget->GetClipExtents());
if (mTargetRotation) {

Просмотреть файл

@ -969,7 +969,7 @@ LayerManagerComposite::RenderToPresentationSurface()
}
GLContext* gl = compositor->gl();
GLContextEGL* egl = GLContextEGL::Cast(gl);
const IntSize windowSize = mirrorScreen->GetNaturalBounds().Size();
const IntSize windowSize = mirrorScreen->GetNaturalBoundsUntyped().Size();
#endif
if ((windowSize.width <= 0) || (windowSize.height <= 0)) {

Просмотреть файл

@ -1202,7 +1202,7 @@ void
CompositorD3D11::EnsureSize()
{
IntRect rect;
mWidget->GetClientBounds(rect);
mWidget->GetClientBoundsUntyped(rect);
mSize = rect.Size();
}

Просмотреть файл

@ -703,7 +703,7 @@ void
CompositorD3D9::EnsureSize()
{
IntRect rect;
mWidget->GetClientBounds(rect);
mWidget->GetClientBoundsUntyped(rect);
mSize = rect.Size();
}

Просмотреть файл

@ -1390,9 +1390,9 @@ CompositorOGL::EndFrame()
#ifdef MOZ_DUMP_PAINTING
if (gfxEnv::DumpCompositorTextures()) {
IntRect rect;
LayoutDeviceIntRect rect;
if (mUseExternalSurfaceSize) {
rect = IntRect(0, 0, mSurfaceSize.width, mSurfaceSize.height);
rect = LayoutDeviceIntRect(0, 0, mSurfaceSize.width, mSurfaceSize.height);
} else {
mWidget->GetBounds(rect);
}

Просмотреть файл

@ -34,11 +34,13 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD GetClientBounds(IntRect &aRect) override {
NS_IMETHOD GetClientBoundsUntyped(IntRect &aRect) override {
aRect = IntRect(0, 0, gCompWidth, gCompHeight);
return NS_OK;
}
NS_IMETHOD GetBounds(IntRect &aRect) override { return GetClientBounds(aRect); }
NS_IMETHOD GetBoundsUntyped(IntRect &aRect) override {
return GetClientBoundsUntyped(aRect);
}
void* GetNativeData(uint32_t aDataType) override {
if (aDataType == NS_NATIVE_OPENGL_CONTEXT) {

Просмотреть файл

@ -2889,9 +2889,9 @@ static LayoutDeviceIntPoint GetWidgetOffset(nsIWidget* aWidget, nsIWidget*& aRoo
if (!parent) {
break;
}
nsIntRect bounds;
LayoutDeviceIntRect bounds;
aWidget->GetBounds(bounds);
offset += LayoutDeviceIntPoint::FromUntyped(bounds.TopLeft());
offset += bounds.TopLeft();
aWidget = parent;
}
aRootWidget = aWidget;
@ -7979,7 +7979,7 @@ UpdateCompositionBoundsForRCDRSF(ParentLayerRect& aCompBounds,
if (widget) {
nsIntRect widgetBounds;
widget->GetBounds(widgetBounds);
widget->GetBoundsUntyped(widgetBounds);
widgetBounds.MoveTo(0, 0);
aCompBounds = ParentLayerRect(ViewAs<ParentLayerPixel>(widgetBounds));
return true;
@ -8104,7 +8104,7 @@ nsLayoutUtils::CalculateRootCompositionSize(nsIFrame* aFrame,
} else {
nsIWidget* widget = aFrame->GetNearestWidget();
nsIntRect widgetBounds;
widget->GetBounds(widgetBounds);
widget->GetBoundsUntyped(widgetBounds);
rootCompositionSize = ScreenSize(ViewAs<ScreenPixel>(widgetBounds.Size()));
}

Просмотреть файл

@ -3128,7 +3128,7 @@ SortConfigurations(nsTArray<nsIWidget::Configuration>* aConfigurations)
if (i == j)
continue;
nsIntRect bounds;
pluginsToMove[j].mChild->GetBounds(bounds);
pluginsToMove[j].mChild->GetBoundsUntyped(bounds);
nsAutoTArray<nsIntRect,1> clipRects;
pluginsToMove[j].mChild->GetWindowClipRegion(&clipRects);
if (HasOverlap(bounds.TopLeft(), clipRects,

Просмотреть файл

@ -9683,8 +9683,8 @@ CompareTrees(nsPresContext* aFirstPresContext, nsIFrame* aFirstFrame,
LogVerifyMessage(k1, k2, "child widgets are not matched\n");
}
else if (nullptr != w1) {
w1->GetBounds(r1);
w2->GetBounds(r2);
w1->GetBoundsUntyped(r1);
w2->GetBoundsUntyped(r2);
if (!r1.IsEqualEdges(r2)) {
LogVerifyMessage(k1, k2, "(widget rects)", r1, r2);
}

Просмотреть файл

@ -5056,11 +5056,12 @@ nsIFrame::GetTransformMatrix(const nsIFrame* aStopAtAncestor,
if (widget && rootPresContext) {
nsIWidget* toplevel = rootPresContext->GetNearestWidget();
if (toplevel) {
nsIntRect screenBounds;
LayoutDeviceIntRect screenBounds;
widget->GetClientBounds(screenBounds);
nsIntRect toplevelScreenBounds;
LayoutDeviceIntRect toplevelScreenBounds;
toplevel->GetClientBounds(toplevelScreenBounds);
nsIntPoint translation = screenBounds.TopLeft() - toplevelScreenBounds.TopLeft();
LayoutDeviceIntPoint translation =
screenBounds.TopLeft() - toplevelScreenBounds.TopLeft();
Matrix4x4 transformToTop;
transformToTop._41 = translation.x;

Просмотреть файл

@ -284,7 +284,7 @@ PopupBoxObject::GetOuterScreenRect()
nsIWidget* widget = view->GetWidget();
if (widget) {
nsIntRect screenRect;
widget->GetScreenBounds(screenRect);
widget->GetScreenBoundsUntyped(screenRect);
int32_t pp = menuPopupFrame->PresContext()->AppUnitsPerDevPixel();
rect->SetLayoutRect(ToAppUnits(screenRect, pp));

Просмотреть файл

@ -245,7 +245,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
appUnitsRect.height = mRect.height;
nsIntRect cssRect = appUnitsRect.ToInsidePixels(nsPresContext::AppUnitsPerCSSPixel());
nsIntRect oldRect;
LayoutDeviceIntRect oldRect;
nsWeakFrame weakFrame(menuPopupFrame);
if (menuPopupFrame) {
nsCOMPtr<nsIWidget> widget = menuPopupFrame->GetWidget();

Просмотреть файл

@ -125,10 +125,10 @@ nsTitleBarFrame::HandleEvent(nsPresContext* aPresContext,
if (parent) {
nsMenuPopupFrame* menuPopupFrame = static_cast<nsMenuPopupFrame*>(parent);
nsCOMPtr<nsIWidget> widget = menuPopupFrame->GetWidget();
nsIntRect bounds;
LayoutDeviceIntRect bounds;
widget->GetScreenBounds(bounds);
CSSPoint cssPos = (LayoutDeviceIntPoint::FromUntyped(bounds.TopLeft()) + nsMoveBy)
CSSPoint cssPos = (bounds.TopLeft() + nsMoveBy)
/ aPresContext->CSSToDevPixelScale();
menuPopupFrame->MoveTo(RoundedToInt(cssPos), false);
}

Просмотреть файл

@ -304,7 +304,7 @@ void nsView::DoResetWidgetBounds(bool aMoveOnly,
nsWindowType type = widget->WindowType();
nsIntRect curBounds;
widget->GetClientBounds(curBounds);
widget->GetClientBoundsUntyped(curBounds);
bool invisiblePopup = type == eWindowType_popup &&
((curBounds.IsEmpty() && mDimBounds.IsEmpty()) ||
mVis == nsViewVisibility_kHide);
@ -802,9 +802,9 @@ void nsView::List(FILE* out, int32_t aIndent) const
if (nullptr != mWindow) {
nscoord p2a = mViewManager->AppUnitsPerDevPixel();
nsIntRect rect;
mWindow->GetClientBounds(rect);
mWindow->GetClientBoundsUntyped(rect);
nsRect windowBounds = ToAppUnits(rect, p2a);
mWindow->GetBounds(rect);
mWindow->GetBoundsUntyped(rect);
nsRect nonclientBounds = ToAppUnits(rect, p2a);
nsrefcnt widgetRefCnt = mWindow.get()->AddRef() - 1;
mWindow.get()->Release();

Просмотреть файл

@ -586,7 +586,7 @@ nsViewManager::InvalidateWidgetArea(nsView *aWidgetView,
#ifndef XP_MACOSX
// GetBounds should compensate for chrome on a toplevel widget
nsIntRect bounds;
childWidget->GetBounds(bounds);
childWidget->GetBoundsUntyped(bounds);
nsTArray<nsIntRect> clipRects;
childWidget->GetWindowClipRegion(&clipRects);

Просмотреть файл

@ -241,7 +241,7 @@ PuppetWidget::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
"Configured widget is not a child");
w->SetWindowClipRegion(configuration.mClipRegion, true);
nsIntRect bounds;
w->GetBounds(bounds);
w->GetBoundsUntyped(bounds);
if (bounds.Size() != configuration.mBounds.Size()) {
w->Resize(configuration.mBounds.x, configuration.mBounds.y,
configuration.mBounds.width, configuration.mBounds.height,
@ -1171,8 +1171,8 @@ PuppetWidget::GetWindowPosition()
}
NS_METHOD
PuppetWidget::GetScreenBounds(nsIntRect &aRect) {
aRect.MoveTo(LayoutDeviceIntPoint::ToUntyped(WidgetToScreenOffset()));
PuppetWidget::GetScreenBoundsUntyped(nsIntRect &aRect) {
aRect.MoveTo(WidgetToScreenOffsetUntyped());
aRect.SizeTo(mBounds.Size());
return NS_OK;
}

Просмотреть файл

@ -212,7 +212,7 @@ public:
// Get the screen position of the application window.
nsIntPoint GetWindowPosition();
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD StartPluginIME(const mozilla::WidgetKeyboardEvent& aKeyboardEvent,
int32_t aPanelX, int32_t aPanelY,

Просмотреть файл

@ -952,7 +952,7 @@ nsWindow::BringToFront()
}
NS_IMETHODIMP
nsWindow::GetScreenBounds(nsIntRect &aRect)
nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
LayoutDeviceIntPoint p = WidgetToScreenOffset();

Просмотреть файл

@ -104,7 +104,7 @@ public:
virtual bool IsEnabled() const override;
NS_IMETHOD Invalidate(const nsIntRect &aRect) override;
NS_IMETHOD SetFocus(bool aRaise = false) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
virtual mozilla::LayoutDeviceIntPoint WidgetToScreenOffset() override;
NS_IMETHOD DispatchEvent(mozilla::WidgetGUIEvent* aEvent,
nsEventStatus& aStatus) override;

Просмотреть файл

@ -378,9 +378,9 @@ public:
NS_IMETHOD Enable(bool aState) override;
virtual bool IsEnabled() const override;
NS_IMETHOD SetFocus(bool aRaise) override;
NS_IMETHOD GetBounds(nsIntRect &aRect) override;
NS_IMETHOD GetClientBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
// Returns the "backing scale factor" of the view's window, which is the
// ratio of pixels in the window's backing store to Cocoa points. Prior to

Просмотреть файл

@ -906,7 +906,7 @@ NS_IMETHODIMP nsChildView::SetCursor(imgIContainer* aCursor,
#pragma mark -
// Get this component dimension
NS_IMETHODIMP nsChildView::GetBounds(nsIntRect &aRect)
NS_IMETHODIMP nsChildView::GetBoundsUntyped(nsIntRect &aRect)
{
if (!mView) {
aRect = mBounds;
@ -916,9 +916,9 @@ NS_IMETHODIMP nsChildView::GetBounds(nsIntRect &aRect)
return NS_OK;
}
NS_IMETHODIMP nsChildView::GetClientBounds(nsIntRect &aRect)
NS_IMETHODIMP nsChildView::GetClientBoundsUntyped(nsIntRect &aRect)
{
GetBounds(aRect);
GetBoundsUntyped(aRect);
if (!mParentWidget) {
// For top level widgets we want the position on screen, not the position
// of this view inside the window.
@ -927,9 +927,9 @@ NS_IMETHODIMP nsChildView::GetClientBounds(nsIntRect &aRect)
return NS_OK;
}
NS_IMETHODIMP nsChildView::GetScreenBounds(nsIntRect &aRect)
NS_IMETHODIMP nsChildView::GetScreenBoundsUntyped(nsIntRect &aRect)
{
GetBounds(aRect);
GetBoundsUntyped(aRect);
aRect.MoveTo(WidgetToScreenOffsetUntyped());
return NS_OK;
}
@ -3672,7 +3672,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
return;
#ifdef DEBUG_UPDATE
nsIntRect geckoBounds;
LayoutDeviceIntRect geckoBounds;
mGeckoChild->GetBounds(geckoBounds);
fprintf (stderr, "---- Update[%p][%p] [%f %f %f %f] cgc: %p\n gecko bounds: [%d %d %d %d]\n",
@ -3821,7 +3821,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
mWaitingForPaint = NO;
nsIntRect geckoBounds;
mGeckoChild->GetBounds(geckoBounds);
mGeckoChild->GetBoundsUntyped(geckoBounds);
nsIntRegion region(geckoBounds);
mGeckoChild->PaintWindow(region);

Просмотреть файл

@ -307,8 +307,8 @@ public:
NS_IMETHOD Resize(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetClientBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
void ReportMoveEvent();
void ReportSizeEvent();
NS_IMETHOD SetCursor(nsCursor aCursor) override;

Просмотреть файл

@ -1550,7 +1550,7 @@ NS_IMETHODIMP nsCocoaWindow::Resize(double aWidth, double aHeight, bool aRepaint
aWidth, aHeight, aRepaint, true);
}
NS_IMETHODIMP nsCocoaWindow::GetClientBounds(nsIntRect &aRect)
NS_IMETHODIMP nsCocoaWindow::GetClientBoundsUntyped(nsIntRect &aRect)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
@ -1585,7 +1585,7 @@ nsCocoaWindow::UpdateBounds()
mBounds = nsCocoaUtils::CocoaRectToGeckoRectDevPix(frame, BackingScaleFactor());
}
NS_IMETHODIMP nsCocoaWindow::GetScreenBounds(nsIntRect &aRect)
NS_IMETHODIMP nsCocoaWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
@ -1914,7 +1914,7 @@ nsCocoaWindow::ReportSizeEvent()
UpdateBounds();
if (mWidgetListener) {
nsIntRect innerBounds;
LayoutDeviceIntRect innerBounds;
GetClientBounds(innerBounds);
mWidgetListener->WindowResized(this, innerBounds.width, innerBounds.height);
}
@ -1983,7 +1983,7 @@ nsIntPoint nsCocoaWindow::GetClientOffset()
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
nsIntRect clientRect;
GetClientBounds(clientRect);
GetClientBoundsUntyped(clientRect);
return clientRect.TopLeft() - mBounds.TopLeft();

Просмотреть файл

@ -770,7 +770,7 @@ HwcComposer2D::Render(nsIWidget* aWidget)
mList->hwLayers[mList->numHwLayers - 1].acquireFenceFd = dispSurface->GetPrevDispAcquireFd();
} else {
// Update screen rect to handle a case that TryRenderWithHwc() is not called.
mScreenRect = screen->GetNaturalBounds();
mScreenRect = screen->GetNaturalBoundsUntyped();
mList->flags = HWC_GEOMETRY_CHANGED;
mList->numHwLayers = 2;
@ -892,7 +892,7 @@ HwcComposer2D::TryRenderWithHwc(Layer* aRoot,
// reallocated. We may want to avoid this if possible
mVisibleRegions.clear();
mScreenRect = screen->GetNaturalBounds();
mScreenRect = screen->GetNaturalBoundsUntyped();
MOZ_ASSERT(mHwcLayerMap.IsEmpty());
if (!PrepareLayerList(aRoot,
mScreenRect,

Просмотреть файл

@ -580,7 +580,7 @@ GeckoInputReaderPolicy::setDisplayInfo()
uint32_t rotation = nsIScreen::ROTATION_0_DEG;
DebugOnly<nsresult> rv = screen->GetRotation(&rotation);
MOZ_ASSERT(NS_SUCCEEDED(rv));
nsIntRect screenBounds = screen->GetNaturalBounds();
nsIntRect screenBounds = screen->GetNaturalBoundsUntyped();
DisplayViewport viewport;
viewport.displayId = 0;

Просмотреть файл

@ -282,7 +282,7 @@ nsScreenGonk::SetRotation(uint32_t aRotation)
}
nsIntRect
nsScreenGonk::GetNaturalBounds()
nsScreenGonk::GetNaturalBoundsUntyped()
{
return mNaturalBounds;
}

Просмотреть файл

@ -69,7 +69,7 @@ public:
float GetDpi();
int32_t GetSurfaceFormat();
ANativeWindow* GetNativeWindow();
nsIntRect GetNaturalBounds();
nsIntRect GetNaturalBoundsUntyped();
uint32_t EffectiveScreenRotation();
ScreenConfiguration GetConfiguration();
bool IsPrimaryScreen();

Просмотреть файл

@ -852,9 +852,9 @@ nsWindow::GetGLFrameBufferFormat()
}
nsIntRect
nsWindow::GetNaturalBounds()
nsWindow::GetNaturalBoundsUntyped()
{
return mScreen->GetNaturalBounds();
return mScreen->GetNaturalBoundsUntyped();
}
nsScreenGonk*

Просмотреть файл

@ -123,7 +123,7 @@ public:
virtual uint32_t GetGLFrameBufferFormat() override;
virtual nsIntRect GetNaturalBounds() override;
virtual nsIntRect GetNaturalBoundsUntyped() override;
virtual bool NeedsPaint();
virtual Composer2D* GetComposer2D() override;

Просмотреть файл

@ -1470,7 +1470,7 @@ nsWindow::SetFocus(bool aRaise)
}
NS_IMETHODIMP
nsWindow::GetScreenBounds(nsIntRect &aRect)
nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
if (mIsTopLevel && mContainer) {
// use the point including window decorations
@ -1486,7 +1486,7 @@ nsWindow::GetScreenBounds(nsIntRect &aRect)
// frame bounds, but mBounds.Size() is returned here for consistency
// with Resize.
aRect.SizeTo(mBounds.Size());
LOG(("GetScreenBounds %d,%d | %dx%d\n",
LOG(("GetScreenBoundsUntyped %d,%d | %dx%d\n",
aRect.x, aRect.y, aRect.width, aRect.height));
return NS_OK;
}
@ -1498,12 +1498,12 @@ nsWindow::GetClientSize()
}
NS_IMETHODIMP
nsWindow::GetClientBounds(nsIntRect &aRect)
nsWindow::GetClientBoundsUntyped(nsIntRect &aRect)
{
// GetBounds returns a rect whose top left represents the top left of the
// outer bounds, but whose width/height represent the size of the inner
// bounds (which is messed up).
GetBounds(aRect);
GetBoundsUntyped(aRect);
aRect.MoveBy(GetClientOffset());
return NS_OK;
@ -2187,7 +2187,7 @@ nsWindow::OnExposeEvent(cairo_t *cr)
nsAutoTArray<nsIntRect,1> clipRects;
kid->GetWindowClipRegion(&clipRects);
nsIntRect bounds;
kid->GetBounds(bounds);
kid->GetBoundsUntyped(bounds);
for (uint32_t i = 0; i < clipRects.Length(); ++i) {
nsIntRect r = clipRects[i] + bounds.TopLeft();
region.Sub(region, r);
@ -2363,7 +2363,7 @@ nsWindow::OnConfigureEvent(GtkWidget *aWidget, GdkEventConfigure *aEvent)
aEvent->x, aEvent->y, aEvent->width, aEvent->height));
nsIntRect screenBounds;
GetScreenBounds(screenBounds);
GetScreenBoundsUntyped(screenBounds);
if (mWindowType == eWindowType_toplevel || mWindowType == eWindowType_dialog) {
// This check avoids unwanted rollup on spurious configure events from

Просмотреть файл

@ -131,8 +131,8 @@ public:
NS_IMETHOD SetSizeMode(nsSizeMode aMode) override;
NS_IMETHOD Enable(bool aState) override;
NS_IMETHOD SetFocus(bool aRaise = false) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetClientBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) override;
virtual mozilla::gfx::IntSize GetClientSize() override;
virtual nsIntPoint GetClientOffset() override;
NS_IMETHOD SetCursor(nsCursor aCursor) override;

Просмотреть файл

@ -862,7 +862,7 @@ CompositorParent* nsBaseWidget::NewCompositorParent(int aSurfaceWidth,
void nsBaseWidget::CreateCompositor()
{
nsIntRect rect;
LayoutDeviceIntRect rect;
GetBounds(rect);
CreateCompositor(rect.width, rect.height);
}
@ -1259,7 +1259,7 @@ NS_METHOD nsBaseWidget::ResizeClient(double aWidth,
NS_ASSERTION((aWidth >=0) , "Negative width passed to ResizeClient");
NS_ASSERTION((aHeight >=0), "Negative height passed to ResizeClient");
nsIntRect clientBounds;
LayoutDeviceIntRect clientBounds;
GetClientBounds(clientBounds);
// GetClientBounds and mBounds are device pixels; scale back to display pixels
@ -1283,7 +1283,7 @@ NS_METHOD nsBaseWidget::ResizeClient(double aX,
NS_ASSERTION((aWidth >=0) , "Negative width passed to ResizeClient");
NS_ASSERTION((aHeight >=0), "Negative height passed to ResizeClient");
nsIntRect clientBounds;
LayoutDeviceIntRect clientBounds;
GetClientBounds(clientBounds);
double scale = BoundsUseDisplayPixels() ? 1.0 / GetDefaultScale().scale : 1.0;
@ -1307,16 +1307,16 @@ NS_METHOD nsBaseWidget::ResizeClient(double aX,
* If the implementation of nsWindow supports borders this method MUST be overridden
*
**/
NS_METHOD nsBaseWidget::GetClientBounds(nsIntRect &aRect)
NS_METHOD nsBaseWidget::GetClientBoundsUntyped(nsIntRect &aRect)
{
return GetBounds(aRect);
return GetBoundsUntyped(aRect);
}
/**
* If the implementation of nsWindow supports borders this method MUST be overridden
*
**/
NS_METHOD nsBaseWidget::GetBounds(nsIntRect &aRect)
NS_METHOD nsBaseWidget::GetBoundsUntyped(nsIntRect &aRect)
{
aRect = mBounds;
return NS_OK;
@ -1327,17 +1327,17 @@ NS_METHOD nsBaseWidget::GetBounds(nsIntRect &aRect)
* this method must be overridden
*
**/
NS_METHOD nsBaseWidget::GetScreenBounds(nsIntRect &aRect)
NS_METHOD nsBaseWidget::GetScreenBoundsUntyped(nsIntRect &aRect)
{
return GetBounds(aRect);
return GetBoundsUntyped(aRect);
}
NS_METHOD nsBaseWidget::GetRestoredBounds(nsIntRect &aRect)
NS_METHOD nsBaseWidget::GetRestoredBoundsUntyped(nsIntRect &aRect)
{
if (SizeMode() != nsSizeMode_Normal) {
return NS_ERROR_FAILURE;
}
return GetScreenBounds(aRect);
return GetScreenBoundsUntyped(aRect);
}
nsIntPoint nsBaseWidget::GetClientOffset()
@ -1725,7 +1725,7 @@ nsIntRect
nsBaseWidget::GetScaledScreenBounds()
{
nsIntRect bounds;
GetScreenBounds(bounds);
GetScreenBoundsUntyped(bounds);
CSSToLayoutDeviceScale scale = GetDefaultScale();
bounds.x = NSToIntRound(bounds.x / scale.scale);
bounds.y = NSToIntRound(bounds.y / scale.scale);
@ -1969,7 +1969,7 @@ nsIWidget::SnapshotWidgetOnScreen()
return nullptr;
}
nsIntRect bounds;
LayoutDeviceIntRect bounds;
GetBounds(bounds);
if (bounds.IsEmpty()) {
return nullptr;

Просмотреть файл

@ -187,10 +187,10 @@ public:
NS_IMETHOD MoveClient(double aX, double aY) override;
NS_IMETHOD ResizeClient(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD ResizeClient(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetBounds(nsIntRect &aRect) override;
NS_IMETHOD GetClientBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetRestoredBounds(nsIntRect &aRect) override;
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 GetNonClientMargins(nsIntMargin &margins) override;
NS_IMETHOD SetNonClientMargins(nsIntMargin &margins) override;
virtual nsIntPoint GetClientOffset() override;

Просмотреть файл

@ -802,19 +802,37 @@ class nsIWidget : public nsISupports {
* popup widgets the returned rect is in screen coordinates and not
* relative to its parent widget.
*
* 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 GetBounds(nsIntRect &aRect) = 0;
NS_IMETHOD GetBounds(mozilla::LayoutDeviceIntRect &aRect) {
nsIntRect tmp;
nsresult rv = GetBoundsUntyped(tmp);
aRect = mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
return rv;
}
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect) = 0;
/**
* Get this widget's outside dimensions in global coordinates. This
* includes any title bar on the window.
*
* 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 GetScreenBounds(nsIntRect &aRect) = 0;
NS_IMETHOD GetScreenBounds(mozilla::LayoutDeviceIntRect &aRect) {
nsIntRect tmp;
nsresult rv = GetScreenBoundsUntyped(tmp);
aRect = mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
return rv;
}
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) = 0;
/**
* Similar to GetScreenBounds except that this function will always
@ -825,10 +843,19 @@ 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(nsIntRect &aRect) = 0;
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;
/**
* Get this widget's client area bounds, if the window has a 3D border
@ -836,10 +863,19 @@ 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(nsIntRect &aRect) = 0;
NS_IMETHOD GetClientBounds(mozilla::LayoutDeviceIntRect &aRect) {
nsIntRect tmp;
nsresult rv = GetClientBoundsUntyped(tmp);
aRect = mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
return rv;
}
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect) = 0;
/**
* Get the non-client area dimensions of the window.
@ -876,7 +912,7 @@ class nsIWidget : public nsISupports {
virtual mozilla::gfx::IntSize GetClientSize() {
// Dependeing on the backend, overloading this method may be useful if
// if requesting the client offset is expensive.
nsIntRect rect;
mozilla::LayoutDeviceIntRect rect;
GetClientBounds(rect);
return mozilla::gfx::IntSize(rect.width, rect.height);
}
@ -1917,7 +1953,7 @@ public:
if (!IsVisible()) {
return false;
}
nsIntRect bounds;
mozilla::LayoutDeviceIntRect bounds;
nsresult rv = GetBounds(bounds);
NS_ENSURE_SUCCESS(rv, false);
return !bounds.IsEmpty();
@ -1934,10 +1970,17 @@ public:
* No code outside of the composition pipeline should know or care
* about this. If you're not an agent of the compositor, you
* probably shouldn't call this method.
*
* The untyped version exists temporarily to ease conversion to typed
* coordinates.
*/
virtual nsIntRect GetNaturalBounds() {
virtual mozilla::LayoutDeviceIntRect GetNaturalBounds() {
nsIntRect tmp = GetNaturalBoundsUntyped();
return mozilla::LayoutDeviceIntRect::FromUnknownRect(tmp);
}
virtual nsIntRect GetNaturalBoundsUntyped() {
nsIntRect bounds;
GetBounds(bounds);
GetBoundsUntyped(bounds);
return bounds;
}

Просмотреть файл

@ -594,7 +594,7 @@ nsNativeTheme::IsSubmenu(nsIFrame* aFrame, bool* aLeftOfParent)
while ((parent = parent->GetParent())) {
if (parent->GetContent() == parentContent) {
if (aLeftOfParent) {
nsIntRect selfBounds, parentBounds;
LayoutDeviceIntRect selfBounds, parentBounds;
aFrame->GetNearestWidget()->GetScreenBounds(selfBounds);
parent->GetNearestWidget()->GetScreenBounds(parentBounds);
*aLeftOfParent = selfBounds.x < parentBounds.x;

Просмотреть файл

@ -908,7 +908,7 @@ nsWindow::resizeEvent(QResizeEvent* aEvent)
nsIntRect rect;
// Generate XPFE resize event
GetBounds(rect);
GetBoundsUntyped(rect);
rect.width = aEvent->size().width();
rect.height = aEvent->size().height();
@ -1495,7 +1495,7 @@ void find_first_visible_parent(QWindow* aItem, QWindow*& aVisibleItem)
}
NS_IMETHODIMP
nsWindow::GetScreenBounds(nsIntRect &aRect)
nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
aRect = gfx::IntRect(gfx::IntPoint(0, 0), mBounds.Size());
if (mIsTopLevel) {

Просмотреть файл

@ -202,7 +202,7 @@ public:
nsIWidget *aWidget,
bool aActivate);
NS_IMETHOD SetSizeMode(nsSizeMode aMode);
NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect);
NS_IMETHOD SetHasTransparentBackground(bool aTransparent);
NS_IMETHOD GetHasTransparentBackground(bool& aTransparent);
NS_IMETHOD HideWindowChrome(bool aShouldHide);

Просмотреть файл

@ -61,7 +61,7 @@ public:
void EnteredFullScreen(bool aFullScreen);
NS_IMETHOD Resize(double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD Resize(double aX, double aY, double aWidth, double aHeight, bool aRepaint) override;
NS_IMETHOD GetScreenBounds(nsIntRect &aRect) override;
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect) override;
void ReportMoveEvent();
void ReportSizeEvent();
void ReportSizeModeEvent(nsSizeMode aMode);

Просмотреть файл

@ -279,7 +279,7 @@ private:
mWaitingForPaint = NO;
nsIntRect geckoBounds;
mGeckoChild->GetBounds(geckoBounds);
mGeckoChild->GetBoundsUntyped(geckoBounds);
nsIntRegion region(geckoBounds);
mGeckoChild->PaintWindow(region);
@ -305,7 +305,7 @@ private:
- (void)drawRect:(CGRect)aRect inContext:(CGContextRef)aContext
{
#ifdef DEBUG_UPDATE
nsIntRect geckoBounds;
LayoutDeviceIntRect geckoBounds;
mGeckoChild->GetBounds(geckoBounds);
fprintf (stderr, "---- Update[%p][%p] [%f %f %f %f] cgc: %p\n gecko bounds: [%d %d %d %d]\n",
@ -772,14 +772,14 @@ void nsWindow::ReportSizeModeEvent(nsSizeMode aMode)
void nsWindow::ReportSizeEvent()
{
if (mWidgetListener) {
nsIntRect innerBounds;
LayoutDeviceIntRect innerBounds;
GetClientBounds(innerBounds);
mWidgetListener->WindowResized(this, innerBounds.width, innerBounds.height);
}
}
NS_IMETHODIMP
nsWindow::GetScreenBounds(nsIntRect &aRect)
nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
LayoutDeviceIntPoint p = WidgetToScreenOffset();

Просмотреть файл

@ -2391,7 +2391,7 @@ IMMHandler::SetIMERelatedWindowsPosOnPlugin(nsWindow* aWindow,
nsWindow* toplevelWindow = aWindow->GetTopLevelWindow(false);
LayoutDeviceIntRect pluginRectInScreen =
editorRectEvent.mReply.mRect + toplevelWindow->WidgetToScreenOffset();
nsIntRect winRectInScreen;
LayoutDeviceIntRect winRectInScreen;
aWindow->GetClientBounds(winRectInScreen);
// composition window cannot be positioned on the edge of client area.
winRectInScreen.width--;

Просмотреть файл

@ -3751,7 +3751,7 @@ TSFTextStore::GetScreenExtInternal(RECT& aScreenExt)
return false;
}
nsIntRect boundRect;
LayoutDeviceIntRect boundRect;
if (NS_FAILED(refWindow->GetClientBounds(boundRect))) {
MOZ_LOG(sTextStoreLog, LogLevel::Error,
("TSF: 0x%p TSFTextStore::GetScreenExtInternal() FAILED due to "
@ -3762,9 +3762,9 @@ TSFTextStore::GetScreenExtInternal(RECT& aScreenExt)
boundRect.MoveTo(0, 0);
// Clip frame rect to window rect
boundRect.IntersectRect(LayoutDevicePixel::ToUntyped(event.mReply.mRect), boundRect);
boundRect.IntersectRect(event.mReply.mRect, boundRect);
if (!boundRect.IsEmpty()) {
boundRect.MoveBy(refWindow->WidgetToScreenOffsetUntyped());
boundRect.MoveBy(refWindow->WidgetToScreenOffset());
::SetRect(&aScreenExt, boundRect.x, boundRect.y,
boundRect.XMost(), boundRect.YMost());
} else {

Просмотреть файл

@ -1864,7 +1864,7 @@ NS_METHOD nsWindow::SetFocus(bool aRaise)
// Return the window's full dimensions in screen coordinates.
// If the window has a parent, converts the origin to an offset
// of the parent's screen origin.
NS_METHOD nsWindow::GetBounds(nsIntRect &aRect)
NS_METHOD nsWindow::GetBoundsUntyped(nsIntRect &aRect)
{
if (mWnd) {
RECT r;
@ -1932,14 +1932,14 @@ NS_METHOD nsWindow::GetBounds(nsIntRect &aRect)
}
// Get this component dimension
NS_METHOD nsWindow::GetClientBounds(nsIntRect &aRect)
NS_METHOD nsWindow::GetClientBoundsUntyped(nsIntRect &aRect)
{
if (mWnd) {
RECT r;
VERIFY(::GetClientRect(mWnd, &r));
nsIntRect bounds;
GetBounds(bounds);
GetBoundsUntyped(bounds);
aRect.MoveTo(bounds.TopLeft() + GetClientOffset());
aRect.width = r.right - r.left;
aRect.height = r.bottom - r.top;
@ -1951,7 +1951,7 @@ NS_METHOD nsWindow::GetClientBounds(nsIntRect &aRect)
}
// Like GetBounds, but don't offset by the parent
NS_METHOD nsWindow::GetScreenBounds(nsIntRect &aRect)
NS_METHOD nsWindow::GetScreenBoundsUntyped(nsIntRect &aRect)
{
if (mWnd) {
RECT r;
@ -1967,10 +1967,10 @@ NS_METHOD nsWindow::GetScreenBounds(nsIntRect &aRect)
return NS_OK;
}
NS_METHOD nsWindow::GetRestoredBounds(nsIntRect &aRect)
NS_METHOD nsWindow::GetRestoredBoundsUntyped(nsIntRect &aRect)
{
if (SizeMode() == nsSizeMode_Normal) {
return GetScreenBounds(aRect);
return GetScreenBoundsUntyped(aRect);
}
if (!mWnd) {
return NS_ERROR_FAILURE;
@ -2667,12 +2667,12 @@ void nsWindow::UpdateOpaqueRegion(const nsIntRegion &aOpaqueRegion)
if (child->IsPlugin()) {
// Collect the bounds of all plugins for GetLargestRectangle.
nsIntRect childBounds;
child->GetBounds(childBounds);
child->GetBoundsUntyped(childBounds);
pluginBounds.UnionRect(pluginBounds, childBounds);
}
}
nsIntRect clientBounds;
LayoutDeviceIntRect clientBounds;
GetClientBounds(clientBounds);
// Find the largest rectangle and use that to calculate the inset. Our top
@ -3572,7 +3572,7 @@ nsWindow::OnDefaultButtonLoaded(const nsIntRect &aButtonRect)
}
nsIntRect widgetRect;
nsresult rv = GetScreenBounds(widgetRect);
nsresult rv = GetScreenBoundsUntyped(widgetRect);
NS_ENSURE_SUCCESS(rv, rv);
nsIntRect buttonRect(aButtonRect + widgetRect.TopLeft());
@ -4205,12 +4205,12 @@ nsWindow::DispatchMouseEvent(EventMessage aEventMessage, WPARAM wParam,
if (nsToolkit::gMouseTrailer && !sIsInMouseCapture) {
nsToolkit::gMouseTrailer->SetMouseTrailerWindow(mWnd);
}
nsIntRect rect;
LayoutDeviceIntRect rect;
GetBounds(rect);
rect.x = 0;
rect.y = 0;
if (rect.Contains(LayoutDeviceIntPoint::ToUntyped(event.refPoint))) {
if (rect.Contains(event.refPoint)) {
if (sCurrentWindow == nullptr || sCurrentWindow != this) {
if ((nullptr != sCurrentWindow) && (!sCurrentWindow->mInDtor)) {
LPARAM pos = sCurrentWindow->lParamToClient(lParamToScreen(lParam));
@ -6531,7 +6531,7 @@ nsWindow::ConfigureChildren(const nsTArray<Configuration>& aConfigurations)
nsresult rv = w->SetWindowClipRegion(configuration.mClipRegion, true);
NS_ENSURE_SUCCESS(rv, rv);
nsIntRect bounds;
w->GetBounds(bounds);
w->GetBoundsUntyped(bounds);
if (bounds.Size() != configuration.mBounds.Size()) {
w->Resize(configuration.mBounds.x, configuration.mBounds.y,
configuration.mBounds.width, configuration.mBounds.height,

Просмотреть файл

@ -116,10 +116,10 @@ public:
NS_IMETHOD Enable(bool aState);
virtual bool IsEnabled() const;
NS_IMETHOD SetFocus(bool aRaise);
NS_IMETHOD GetBounds(nsIntRect &aRect);
NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
NS_IMETHOD GetRestoredBounds(nsIntRect &aRect) override;
NS_IMETHOD GetClientBounds(nsIntRect &aRect);
NS_IMETHOD GetBoundsUntyped(nsIntRect &aRect);
NS_IMETHOD GetScreenBoundsUntyped(nsIntRect &aRect);
NS_IMETHOD GetRestoredBoundsUntyped(nsIntRect &aRect) override;
NS_IMETHOD GetClientBoundsUntyped(nsIntRect &aRect);
virtual nsIntPoint GetClientOffset();
void SetBackgroundColor(const nscolor &aColor);
NS_IMETHOD SetCursor(imgIContainer* aCursor,

Просмотреть файл

@ -175,7 +175,7 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
nullptr, // Native parent widget
r, // Widget dimensions
&widgetInitData); // Widget initialization data
mWindow->GetClientBounds(r);
mWindow->GetClientBoundsUntyped(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));

Просмотреть файл

@ -651,7 +651,7 @@ NS_IMETHODIMP nsXULWindow::SetPositionAndSize(int32_t aX, int32_t aY,
NS_IMETHODIMP nsXULWindow::GetPositionAndSize(int32_t* x, int32_t* y, int32_t* cx,
int32_t* cy)
{
nsIntRect rect;
LayoutDeviceIntRect rect;
if (!mWindow)
return NS_ERROR_FAILURE;
@ -1487,7 +1487,7 @@ NS_IMETHODIMP nsXULWindow::SavePersistentAttributes()
}
// get our size, position and mode to persist
nsIntRect rect;
LayoutDeviceIntRect rect;
bool gotRestoredBounds = NS_SUCCEEDED(mWindow->GetRestoredBounds(rect));
CSSToLayoutDeviceScale scale = mWindow->GetDefaultScale();