diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /view | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'view')
-rw-r--r-- | view/nsView.cpp | 25 | ||||
-rw-r--r-- | view/nsView.h | 10 | ||||
-rw-r--r-- | view/nsViewManager.cpp | 4 | ||||
-rw-r--r-- | view/nsViewManager.h | 6 |
4 files changed, 4 insertions, 41 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(); } } diff --git a/view/nsView.h b/view/nsView.h index 832c6358ad..7e1617265f 100644 --- a/view/nsView.h +++ b/view/nsView.h @@ -219,13 +219,6 @@ class nsView final : public nsIWidgetListener { nsPoint GetOffsetToWidget(nsIWidget* aWidget) const; /** - * Takes a point aPt that is in the coordinate system of |this|'s parent view - * and converts it to be in the coordinate system of |this| taking into - * account the offset and any app unit per dev pixel ratio differences. - */ - nsPoint ConvertFromParentCoords(nsPoint aPt) const; - - /** * Called to query the visibility state of a view. * @result current visibility state */ @@ -525,9 +518,6 @@ class nsView final : public nsIWidgetListener { // parent, if we can) void DropMouseGrabbing(); - // Same as GetBounds but converts to parent appunits if they are different. - nsRect GetBoundsInParentUnits() const; - bool HasNonEmptyDirtyRegion() { return mDirtyRegion && !mDirtyRegion->IsEmpty(); } diff --git a/view/nsViewManager.cpp b/view/nsViewManager.cpp index edc05230db..dd2f6c77cf 100644 --- a/view/nsViewManager.cpp +++ b/view/nsViewManager.cpp @@ -455,6 +455,7 @@ void nsViewManager::PostPendingUpdate() { nsViewManager* rootVM = RootViewManager(); rootVM->mHasPendingWidgetGeometryChanges = true; if (rootVM->mPresShell) { + rootVM->mPresShell->SetNeedLayoutFlush(); rootVM->mPresShell->ScheduleViewManagerFlush(); } } @@ -789,8 +790,7 @@ void nsViewManager::MoveViewTo(nsView* aView, nscoord aX, nscoord aY) { aView->SetPosition(aX, aY); } -void nsViewManager::ResizeView(nsView* aView, const nsRect& aRect, - bool aRepaintExposedAreaOnly) { +void nsViewManager::ResizeView(nsView* aView, const nsRect& aRect) { NS_ASSERTION(aView->GetViewManager() == this, "wrong view manager"); nsRect oldDimensions = aView->GetDimensions(); diff --git a/view/nsViewManager.h b/view/nsViewManager.h index 332d1c2f9a..3b217ae2a3 100644 --- a/view/nsViewManager.h +++ b/view/nsViewManager.h @@ -180,12 +180,8 @@ class nsViewManager final { * The view manager generates the appropriate dirty regions. * @param aView view to move * @param the new bounds relative to the current position - * @param RepaintExposedAreaOnly - * if true Repaint only the expanded or contracted region, - * if false Repaint the union of the old and new rectangles. */ - void ResizeView(nsView* aView, const nsRect& aRect, - bool aRepaintExposedAreaOnly = false); + void ResizeView(nsView* aView, const nsRect& aRect); /** * Set the visibility of a view. Hidden views have the effect of hiding |