Skip to content

Commit 15d89ee

Browse files
committedApr 24, 2024
Bug 1892867. Remove some unused view/ code. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D208289
1 parent fcd2826 commit 15d89ee

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed
 

‎view/nsView.cpp

-22
Original file line numberDiff line numberDiff line change
@@ -902,28 +902,6 @@ bool nsView::IsRoot() const {
902902
return mViewManager->GetRootView() == this;
903903
}
904904

905-
nsRect nsView::GetBoundsInParentUnits() const {
906-
nsView* parent = GetParent();
907-
nsViewManager* VM = GetViewManager();
908-
if (this != VM->GetRootView() || !parent) {
909-
return mDimBounds;
910-
}
911-
int32_t ourAPD = VM->AppUnitsPerDevPixel();
912-
int32_t parentAPD = parent->GetViewManager()->AppUnitsPerDevPixel();
913-
return mDimBounds.ScaleToOtherAppUnitsRoundOut(ourAPD, parentAPD);
914-
}
915-
916-
nsPoint nsView::ConvertFromParentCoords(nsPoint aPt) const {
917-
const nsView* parent = GetParent();
918-
if (parent) {
919-
aPt = aPt.ScaleToOtherAppUnits(
920-
parent->GetViewManager()->AppUnitsPerDevPixel(),
921-
GetViewManager()->AppUnitsPerDevPixel());
922-
}
923-
aPt -= GetPosition();
924-
return aPt;
925-
}
926-
927905
static bool IsPopupWidget(nsIWidget* aWidget) {
928906
return aWidget->GetWindowType() == WindowType::Popup;
929907
}

‎view/nsView.h

-10
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,6 @@ class nsView final : public nsIWidgetListener {
218218
*/
219219
nsPoint GetOffsetToWidget(nsIWidget* aWidget) const;
220220

221-
/**
222-
* Takes a point aPt that is in the coordinate system of |this|'s parent view
223-
* and converts it to be in the coordinate system of |this| taking into
224-
* account the offset and any app unit per dev pixel ratio differences.
225-
*/
226-
nsPoint ConvertFromParentCoords(nsPoint aPt) const;
227-
228221
/**
229222
* Called to query the visibility state of a view.
230223
* @result current visibility state
@@ -525,9 +518,6 @@ class nsView final : public nsIWidgetListener {
525518
// parent, if we can)
526519
void DropMouseGrabbing();
527520

528-
// Same as GetBounds but converts to parent appunits if they are different.
529-
nsRect GetBoundsInParentUnits() const;
530-
531521
bool HasNonEmptyDirtyRegion() {
532522
return mDirtyRegion && !mDirtyRegion->IsEmpty();
533523
}

0 commit comments

Comments
 (0)
Failed to load comments.