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 id17264
push usereakhgari@mozilla.com
push dateTue, 30 Nov 2010 05:00:52 +0000
treeherdermozilla-central@5d92ead2065b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats, ehsan
bugs615256
milestone2.0b8pre
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 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)