Bug 825866. Part 2: Remove nsIView::ExternalIsRoot, as it's not needed anymore. r=tnikkel
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 04 Jan 2013 02:23:09 +1300
changeset 117494 a428bfec3539bf79477dfba1e3f81c91ac1e1ce2
parent 117493 4e644276c092d46ab8dcb9b69f8393cc2cc83b6d
child 117495 638d614c55a54504fd798092b77cdec7b1bd9c7b
push id24101
push usereakhgari@mozilla.com
push dateFri, 04 Jan 2013 17:24:40 +0000
treeherdermozilla-central@259982750c29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs825866
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 825866. Part 2: Remove nsIView::ExternalIsRoot, as it's not needed anymore. r=tnikkel
view/public/nsIView.h
view/src/nsView.cpp
--- a/view/public/nsIView.h
+++ b/view/public/nsIView.h
@@ -108,19 +108,17 @@ public:
    * Called to get the position of a view.
    * The specified coordinates are relative to the parent view's origin, but
    * are in appunits of this.
    * This is the (0, 0) origin of the coordinate space established by this view.
    * @param x out parameter for x position
    * @param y out parameter for y position
    */
   nsPoint GetPosition() const {
-    // Call ExternalIsRoot here so that we can get to it from other
-    // components
-    NS_ASSERTION(!ExternalIsRoot() || (mPosX == 0 && mPosY == 0),
+    NS_ASSERTION(!IsRoot() || (mPosX == 0 && mPosY == 0),
                  "root views should always have explicit position of (0,0)");
     return nsPoint(mPosX, mPosY);
   }
 
   /**
    * Called to get the dimensions and position of the view's bounds.
    * The view's bounds (x,y) are relative to the origin of the parent view, but
    * are in appunits of this.
@@ -336,18 +334,16 @@ public:
   virtual void List(FILE* out, int32_t aIndent = 0) const;
 #endif // DEBUG
 
   /**
    * @result true iff this is the root view for its view manager
    */
   bool IsRoot() const;
 
-  virtual bool ExternalIsRoot() const;
-
   nsIntRect CalcWidgetBounds(nsWindowType aType);
 
   bool IsEffectivelyVisible();
 
   // This is an app unit offset to add when converting view coordinates to
   // widget coordinates.  It is the offset in view coordinates from widget
   // origin (unlike views, widgets can't extend above or to the left of their
   // origin) to view origin expressed in appunits of this.
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -883,21 +883,16 @@ nsIWidget* nsIView::GetNearestWidget(nsP
 }
 
 bool nsIView::IsRoot() const
 {
   NS_ASSERTION(mViewManager != nullptr," View manager is null in nsIView::IsRoot()");
   return mViewManager->GetRootViewImpl() == this;
 }
 
-bool nsIView::ExternalIsRoot() const
-{
-  return nsIView::IsRoot();
-}
-
 nsRect
 nsIView::GetBoundsInParentUnits() const
 {
   nsIView* parent = GetParent();
   nsViewManager* VM = GetViewManagerInternal();
   if (this != VM->GetRootViewImpl() || !parent) {
     return mDimBounds;
   }