diff options
Diffstat (limited to 'view/nsView.cpp')
-rw-r--r-- | view/nsView.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/view/nsView.cpp b/view/nsView.cpp index aebc236883..41988da30c 100644 --- a/view/nsView.cpp +++ b/view/nsView.cpp @@ -902,28 +902,6 @@ bool nsView::IsRoot() const { return mViewManager->GetRootView() == this; } -nsRect nsView::GetBoundsInParentUnits() const { - nsView* parent = GetParent(); - nsViewManager* VM = GetViewManager(); - if (this != VM->GetRootView() || !parent) { - return mDimBounds; - } - int32_t ourAPD = VM->AppUnitsPerDevPixel(); - int32_t parentAPD = parent->GetViewManager()->AppUnitsPerDevPixel(); - return mDimBounds.ScaleToOtherAppUnitsRoundOut(ourAPD, parentAPD); -} - -nsPoint nsView::ConvertFromParentCoords(nsPoint aPt) const { - const nsView* parent = GetParent(); - if (parent) { - aPt = aPt.ScaleToOtherAppUnits( - parent->GetViewManager()->AppUnitsPerDevPixel(), - GetViewManager()->AppUnitsPerDevPixel()); - } - aPt -= GetPosition(); - return aPt; -} - static bool IsPopupWidget(nsIWidget* aWidget) { return aWidget->GetWindowType() == WindowType::Popup; } @@ -1103,8 +1081,7 @@ void nsView::DidCompositeWindow(mozilla::layers::TransactionId aTransactionId, } void nsView::RequestRepaint() { - PresShell* presShell = mViewManager->GetPresShell(); - if (presShell) { + if (PresShell* presShell = mViewManager->GetPresShell()) { presShell->ScheduleViewManagerFlush(); } } |