From 14a8952bb9a30f38f97b66cd9f6b97578fc92454 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Fri, 25 Jun 2010 16:51:17 -0500 Subject: [PATCH] Bug 563878. Part 8. Remove workaround from ViewToWidgetOffset because it is not needed anymore. r=roc --- view/public/nsIView.h | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/view/public/nsIView.h b/view/public/nsIView.h index 081238a7ee79..4c07bf6880ac 100644 --- a/view/public/nsIView.h +++ b/view/public/nsIView.h @@ -362,20 +362,7 @@ public: // This is an app unit offset to add when converting view coordinates to // widget coordinates. It is the offset in view coordinates from widget // top-left to view top-left. - nsPoint ViewToWidgetOffset() const { - nsIView* parent = reinterpret_cast(mParent); - if (parent && parent->GetViewManager() != GetViewManager()) { - // The document root view's mViewToWidgetOffset is always (0,0). - // If it has a parent view, the parent view must be the inner view - // for an nsSubdocumentFrame; its top-left position in appunits - // is always positioned at that inner view's top-left, and its - // widget top-left is always positioned at that inner view's widget's - // top-left, so its ViewToWidgetOffset is actually the same as - // its parent's. - return parent->ViewToWidgetOffset(); - } - return mViewToWidgetOffset; - } + nsPoint ViewToWidgetOffset() const { return mViewToWidgetOffset; } protected: friend class nsWeakView;