Bug 615256 warning: 'PRBool FramesOnSameLineHaveZeroHeight(nsIFrame*)' defined but not used; r=mats a=ehsan landing on a CLOSED TREE instead of a white-space change to get a Windows debug X test run
authortimeless@mozdev.org
Tue, 30 Nov 2010 00:00:38 -0500
changeset 58361 5d92ead2065bcd190c103902df4d7aac3c35fd7b
parent 58360 e57dc7264ff5f2c6940c860b60c5087592cd1239
child 58362 a8cccc6bf4a2d342533e8ae48554cb60c6272262
child 58692 322c34dc7c285b5ac4b917daa1b4f4e48f48cfd2
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersmats, ehsan
bugs615256
milestone2.0b8pre
Bug 615256 warning: 'PRBool FramesOnSameLineHaveZeroHeight(nsIFrame*)' defined but not used; r=mats a=ehsan landing on a CLOSED TREE instead of a white-space change to get a Windows debug X test run
layout/base/nsCaret.cpp
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -141,31 +141,16 @@ AdjustCaretFrameForLineEnd(nsIFrame** aF
       *aFrame = r;
       NS_ASSERTION(r->GetType() == nsGkAtoms::textFrame, "Expected text frame");
       *aOffset = (static_cast<nsTextFrame*>(r))->GetContentEnd();
       return;
     }
   }
 }
 
-static PRBool
-FramesOnSameLineHaveZeroHeight(nsIFrame* aFrame)
-{
-  nsLineBox* line = FindContainingLine(aFrame);
-  if (!line)
-    return aFrame->GetRect().height == 0;
-  PRInt32 count = line->GetChildCount();
-  for (nsIFrame* f = line->mFirstChild; count > 0; --count, f = f->GetNextSibling())
-  {
-   if (f->GetRect().height != 0)
-     return PR_FALSE;
-  }
-  return PR_TRUE;
-}
-
 //-----------------------------------------------------------------------------
 
 nsCaret::nsCaret()
 : mPresShell(nsnull)
 , mBlinkRate(500)
 , mVisible(PR_FALSE)
 , mDrawn(PR_FALSE)
 , mPendingDraw(PR_FALSE)