From 66ff344afd8a805c4a5f8242f8f22922fb77c2b2 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Fri, 25 Jun 2010 16:51:17 -0500 Subject: [PATCH] Bug 563878. Part 9. Remove nsIView::GetScreenPosition because it is unused. r=mats --- view/public/nsIView.h | 7 ------- view/src/nsView.cpp | 19 ------------------- 2 files changed, 26 deletions(-) diff --git a/view/public/nsIView.h b/view/public/nsIView.h index 4c07bf6880ac..2292fa1f80d1 100644 --- a/view/public/nsIView.h +++ b/view/public/nsIView.h @@ -187,13 +187,6 @@ public: */ nsPoint GetOffsetTo(const nsIView* aOther) const; - /** - * Get the screen position of the view. - * @return the pixel position of the top-left of the view in screen - * coordinates. - */ - nsIntPoint GetScreenPosition() const; - /** * Called to query the visibility state of a view. * @result current visibility state diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index 2f142223c8cf..d6d5a8a05116 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -932,25 +932,6 @@ nsPoint nsIView::GetOffsetTo(const nsIView* aOther) const return offset; } -nsIntPoint nsIView::GetScreenPosition() const -{ - nsIntPoint screenPoint(0,0); - nsPoint toWidgetOffset(0,0); - nsIWidget* widget = GetNearestWidget(&toWidgetOffset); - if (widget) { - nsCOMPtr dx; - mViewManager->GetDeviceContext(*getter_AddRefs(dx)); - PRInt32 p2a = dx->AppUnitsPerDevPixel(); - nsIntPoint ourPoint(NSAppUnitsToIntPixels(toWidgetOffset.x, p2a), - NSAppUnitsToIntPixels(toWidgetOffset.y, p2a)); - // WidgetToScreenOffset is at the origin of the client area of - // the widget. - screenPoint = ourPoint + widget->WidgetToScreenOffset(); - } - - return screenPoint; -} - nsIWidget* nsIView::GetNearestWidget(nsPoint* aOffset) const { // aOffset is based on the view's position, which ignores any chrome on