Bug 556446: Remove dead code in layout. r=roc,bz

This commit is contained in:
Ehren Metcalfe 2010-04-03 07:36:19 -04:00
parent 48b662ae1f
commit e0ac5d5547
67 changed files with 11 additions and 1002 deletions

View File

@ -170,40 +170,6 @@ nsBidi::nsBidi()
mMayAllocateRuns=PR_TRUE;
}
nsBidi::nsBidi(PRUint32 aMaxLength, PRUint32 aMaxRunCount)
{
Init();
nsresult rv = NS_OK;
/* allocate memory for arrays as requested */
if(aMaxLength>0) {
if( !GETINITIALDIRPROPSMEMORY(aMaxLength) ||
!GETINITIALLEVELSMEMORY(aMaxLength)
) {
mMayAllocateText=PR_FALSE;
rv = NS_ERROR_OUT_OF_MEMORY;
}
} else {
mMayAllocateText=PR_TRUE;
}
if(aMaxRunCount>0) {
if(aMaxRunCount==1) {
/* use simpleRuns[] */
mRunsSize=sizeof(Run);
} else if(!GETINITIALRUNSMEMORY(aMaxRunCount)) {
mMayAllocateRuns=PR_FALSE;
rv = NS_ERROR_OUT_OF_MEMORY;
}
} else {
mMayAllocateRuns=PR_TRUE;
}
if(NS_FAILED(rv)) {
Free();
}
}
nsBidi::~nsBidi()
{
Free();

View File

@ -443,41 +443,6 @@ public:
*/
nsBidi();
/** @brief Preallocating constructor
* Allocate an <code>nsBidi</code>
* object with preallocated memory for internal structures. This
* constructor provides an <code>nsBidi</code> object like
* the default constructor, but it also
* preallocates memory for internal structures according to the sizings
* supplied by the caller.<p> Subsequent functions will not allocate
* any more memory, and are thus guaranteed not to fail because of lack
* of memory.<p> The preallocation can be limited to some of the
* internal memory by setting some values to 0 here. That means that
* if, e.g., <code>aMaxRunCount</code> cannot be reasonably
* predetermined and should not be set to <code>aMaxLength</code> (the
* only failproof value) to avoid wasting memory, then
* <code>aMaxRunCount</code> could be set to 0 here and the internal
* structures that are associated with it will be allocated on demand,
* just like with the default constructor.
*
* If sufficient memory could not be allocated, no exception is thrown.
* Test whether mDirPropsSize == aMaxLength and/or mRunsSize == aMaxRunCount.
*
* @param aMaxLength is the maximum paragraph or line length that internal memory
* will be preallocated for. An attempt to associate this object with a
* longer text will fail, unless this value is 0, which leaves the allocation
* up to the implementation.
*
* @param aMaxRunCount is the maximum anticipated number of same-level runs
* that internal memory will be preallocated for. An attempt to access
* visual runs on an object that was not preallocated for as many runs
* as the text was actually resolved to will fail,
* unless this value is 0, which leaves the allocation up to the implementation.<p>
* The number of runs depends on the actual text and maybe anywhere between
* 1 and <code>aMaxLength</code>. It is typically small.<p>
*/
nsBidi(PRUint32 aMaxLength, PRUint32 aMaxRunCount);
/** @brief Destructor. */
virtual ~nsBidi();

View File

@ -1397,16 +1397,6 @@ nsBidiPresUtils::CalculateCharType(PRInt32& aOffset,
aOffset = offset;
}
nsresult nsBidiPresUtils::GetBidiEngine(nsBidi** aBidiEngine)
{
nsresult rv = NS_ERROR_FAILURE;
if (mBidiEngine) {
*aBidiEngine = mBidiEngine;
rv = NS_OK;
}
return rv;
}
nsresult nsBidiPresUtils::ProcessText(const PRUnichar* aText,
PRInt32 aLength,
nsBidiDirection aBaseDirection,

View File

@ -198,11 +198,6 @@ public:
nsCharType aCharType,
PRBool aIsOddLevel);
/**
* Return our nsBidi object (bidi reordering engine)
*/
nsresult GetBidiEngine(nsBidi** aBidiEngine);
/**
* Reorder plain text using the Unicode Bidi algorithm and send it to
* a rendering context for rendering.

View File

@ -878,13 +878,6 @@ nsDisplayItem* nsDisplayList::RemoveBottom() {
return item;
}
void nsDisplayList::DeleteBottom() {
nsDisplayItem* item = RemoveBottom();
if (item) {
item->~nsDisplayItem();
}
}
void nsDisplayList::DeleteAll() {
nsDisplayItem* item;
while ((item = RemoveBottom()) != nsnull) {

View File

@ -767,10 +767,6 @@ public:
*/
nsDisplayItem* RemoveBottom();
/**
* Remove an item from the bottom of the list and call its destructor.
*/
void DeleteBottom();
/**
* Remove all items from the list and call their destructors.
*/

View File

@ -261,31 +261,6 @@ nsFrameManager::Destroy()
mPresShell = nsnull;
}
nsIFrame*
nsFrameManager::GetCanvasFrame()
{
if (mRootFrame) {
// walk the children of the root frame looking for a frame with type==canvas
// start at the root
nsIFrame* childFrame = mRootFrame;
while (childFrame) {
// get each sibling of the child and check them, startig at the child
nsIFrame *siblingFrame = childFrame;
while (siblingFrame) {
if (siblingFrame->GetType() == nsGkAtoms::canvasFrame) {
// this is it
return siblingFrame;
} else {
siblingFrame = siblingFrame->GetNextSibling();
}
}
// move on to the child's child
childFrame = childFrame->GetFirstChild(nsnull);
}
}
return nsnull;
}
//----------------------------------------------------------------------
// Placeholder frame functions
@ -492,19 +467,6 @@ nsFrameManager::ClearAllUndisplayedContentIn(nsIContent* aParentContent)
}
}
void
nsFrameManager::ClearUndisplayedContentMap()
{
#ifdef DEBUG_UNDISPLAYED_MAP
static int i = 0;
printf("ClearUndisplayedContentMap(%d)\n", i++);
#endif
if (mUndisplayedMap) {
mUndisplayedMap->Clear();
}
}
//----------------------------------------------------------------------
nsresult

View File

@ -91,12 +91,6 @@ public:
*/
NS_HIDDEN_(void) Destroy();
/*
* Get the canvas frame, searching from the root frame down.
* The canvas frame may or may not exist, so this may return null.
*/
NS_HIDDEN_(nsIFrame*) GetCanvasFrame();
// Placeholder frame functions
NS_HIDDEN_(nsPlaceholderFrame*) GetPlaceholderFrameFor(nsIFrame* aFrame);
NS_HIDDEN_(nsresult)
@ -116,7 +110,6 @@ public:
NS_HIDDEN_(void) ClearUndisplayedContentIn(nsIContent* aContent,
nsIContent* aParentContent);
NS_HIDDEN_(void) ClearAllUndisplayedContentIn(nsIContent* aParentContent);
NS_HIDDEN_(void) ClearUndisplayedContentMap();
// Functions for manipulating the frame model
NS_HIDDEN_(nsresult) AppendFrames(nsIFrame* aParentFrame,

View File

@ -741,11 +741,6 @@ public:
*/
static void SetVerifyReflowEnable(PRBool aEnabled);
/**
* Get the flags associated with the VerifyReflow debug tool
*/
static PRInt32 GetVerifyReflowFlags();
virtual nsIFrame* GetAbsoluteContainingBlock(nsIFrame* aFrame);
#ifdef MOZ_REFLOW_PERF

View File

@ -1759,63 +1759,6 @@ nsLayoutUtils::GetParentOrPlaceholderFor(nsFrameManager* aFrameManager,
return aFrame->GetParent();
}
nsIFrame*
nsLayoutUtils::GetClosestCommonAncestorViaPlaceholders(nsIFrame* aFrame1,
nsIFrame* aFrame2,
nsIFrame* aKnownCommonAncestorHint)
{
NS_PRECONDITION(aFrame1, "aFrame1 must not be null");
NS_PRECONDITION(aFrame2, "aFrame2 must not be null");
nsPresContext* presContext = aFrame1->PresContext();
if (presContext != aFrame2->PresContext()) {
// different documents, no common ancestor
return nsnull;
}
nsFrameManager* frameManager = presContext->PresShell()->FrameManager();
nsAutoTArray<nsIFrame*, 8> frame1Ancestors;
nsIFrame* f1;
for (f1 = aFrame1; f1 && f1 != aKnownCommonAncestorHint;
f1 = GetParentOrPlaceholderFor(frameManager, f1)) {
frame1Ancestors.AppendElement(f1);
}
if (!f1 && aKnownCommonAncestorHint) {
// So, it turns out aKnownCommonAncestorHint was not an ancestor of f1. Oops.
// Never mind. We can continue as if aKnownCommonAncestorHint was null.
aKnownCommonAncestorHint = nsnull;
}
nsAutoTArray<nsIFrame*, 8> frame2Ancestors;
nsIFrame* f2;
for (f2 = aFrame2; f2 && f2 != aKnownCommonAncestorHint;
f2 = GetParentOrPlaceholderFor(frameManager, f2)) {
frame2Ancestors.AppendElement(f2);
}
if (!f2 && aKnownCommonAncestorHint) {
// So, it turns out aKnownCommonAncestorHint was not an ancestor of f2.
// We need to retry with no common ancestor hint.
return GetClosestCommonAncestorViaPlaceholders(aFrame1, aFrame2, nsnull);
}
// now frame1Ancestors and frame2Ancestors give us the parent frame chain
// up to aKnownCommonAncestorHint, or if that is null, up to and including
// the root frame. We need to walk from the end (i.e., the top of the
// frame (sub)tree) down to aFrame1/aFrame2 looking for the first difference.
nsIFrame* lastCommonFrame = aKnownCommonAncestorHint;
PRInt32 last1 = frame1Ancestors.Length() - 1;
PRInt32 last2 = frame2Ancestors.Length() - 1;
while (last1 >= 0 && last2 >= 0) {
nsIFrame* frame1 = frame1Ancestors.ElementAt(last1);
if (frame1 != frame2Ancestors.ElementAt(last2))
break;
lastCommonFrame = frame1;
last1--;
last2--;
}
return lastCommonFrame;
}
nsIFrame*
nsLayoutUtils::GetNextContinuationOrSpecialSibling(nsIFrame *aFrame)
{

View File

@ -729,20 +729,6 @@ public:
static nsIFrame* GetParentOrPlaceholderFor(nsFrameManager* aFrameManager,
nsIFrame* aFrame);
/**
* Find the closest common ancestor of aFrame1 and aFrame2, following
* out of flow frames to their placeholders instead of their parents. Returns
* nsnull if the frames are in different frame trees.
*
* @param aKnownCommonAncestorHint a frame that is believed to be on the
* ancestor chain of both aFrame1 and aFrame2. If null, or a frame that is
* not in fact on both ancestor chains, then this function will still return
* the correct result, but it will be slower.
*/
static nsIFrame*
GetClosestCommonAncestorViaPlaceholders(nsIFrame* aFrame1, nsIFrame* aFrame2,
nsIFrame* aKnownCommonAncestorHint);
/**
* Get a frame's next-in-flow, or, if it doesn't have one, its special sibling.
*/

View File

@ -1092,11 +1092,6 @@ protected:
public:
virtual ~nsDelayedEvent() {};
virtual void Dispatch(PresShell* aShell) {}
// This is needed only by nsDelayedFocusBlur.
virtual PRBool Equals(nsPIDOMEventTarget* aTarget, PRUint32 aEventType)
{
return PR_FALSE;
}
};
class nsDelayedInputEvent : public nsDelayedEvent
@ -1431,16 +1426,6 @@ nsIPresShell::SetVerifyReflowEnable(PRBool aEnabled)
gVerifyReflowEnabled = aEnabled;
}
PRInt32
nsIPresShell::GetVerifyReflowFlags()
{
#ifdef NS_DEBUG
return gVerifyReflowFlags;
#else
return 0;
#endif
}
/* virtual */ void
nsIPresShell::AddWeakFrameExternal(nsWeakFrame* aWeakFrame)
{

View File

@ -349,20 +349,6 @@ nsButtonFrameRenderer::GetButtonInnerFocusBorderAndPadding()
return result;
}
nsMargin
nsButtonFrameRenderer::GetButtonOutlineBorderAndPadding()
{
nsMargin borderAndPadding(0,0,0,0);
return borderAndPadding;
}
// gets the full size of our border with all the focus borders
nsMargin
nsButtonFrameRenderer::GetFullButtonBorderAndPadding()
{
return GetAddedButtonBorderAndPadding() + GetButtonBorderAndPadding();
}
// gets all the focus borders and padding that will be added to the regular border
nsMargin
nsButtonFrameRenderer::GetAddedButtonBorderAndPadding()

View File

@ -92,8 +92,6 @@ public:
nsMargin GetButtonBorderAndPadding();
nsMargin GetButtonInnerFocusMargin();
nsMargin GetButtonInnerFocusBorderAndPadding();
nsMargin GetButtonOutlineBorderAndPadding();
nsMargin GetFullButtonBorderAndPadding();
nsMargin GetAddedButtonBorderAndPadding();
nsStyleContext* GetStyleContext(PRInt32 aIndex) const;

View File

@ -899,17 +899,6 @@ nsComboboxControlFrame::RemoveOption(PRInt32 aIndex)
return lcf->RemoveOption(aIndex);
}
NS_IMETHODIMP
nsComboboxControlFrame::GetOptionSelected(PRInt32 aIndex, PRBool* aValue)
{
NS_ASSERTION(mDropdownFrame, "No dropdown frame!");
nsISelectControlFrame* listFrame = do_QueryFrame(mDropdownFrame);
NS_ASSERTION(listFrame, "No list frame!");
return listFrame->GetOptionSelected(aIndex, aValue);
}
NS_IMETHODIMP
nsComboboxControlFrame::OnSetSelectedIndex(PRInt32 aOldIndex, PRInt32 aNewIndex)
{

View File

@ -188,7 +188,6 @@ public:
// nsISelectControlFrame
NS_IMETHOD AddOption(PRInt32 index);
NS_IMETHOD RemoveOption(PRInt32 index);
NS_IMETHOD GetOptionSelected(PRInt32 aIndex, PRBool* aValue);
NS_IMETHOD DoneAddingChildren(PRBool aIsDone);
NS_IMETHOD OnOptionSelected(PRInt32 aIndex, PRBool aSelected);
NS_IMETHOD OnSetSelectedIndex(PRInt32 aOldIndex, PRInt32 aNewIndex);

View File

@ -63,11 +63,6 @@ public:
*/
NS_IMETHOD RemoveOption(PRInt32 index) = 0;
/**
* Sets the select state of the option at index
*/
NS_IMETHOD GetOptionSelected(PRInt32 index, PRBool* value) = 0;
/**
* Sets whether the parser is done adding children
* @param aIsDone whether the parser is done adding children

View File

@ -1645,14 +1645,6 @@ nsListControlFrame::FireOnChange()
}
}
// Determine if the specified item in the listbox is selected.
NS_IMETHODIMP
nsListControlFrame::GetOptionSelected(PRInt32 aIndex, PRBool* aValue)
{
*aValue = IsContentSelectedByIndex(aIndex);
return NS_OK;
}
NS_IMETHODIMP
nsListControlFrame::OnSetSelectedIndex(PRInt32 aOldIndex, PRInt32 aNewIndex)
{

View File

@ -188,7 +188,6 @@ public:
// nsISelectControlFrame
NS_IMETHOD AddOption(PRInt32 index);
NS_IMETHOD RemoveOption(PRInt32 index);
NS_IMETHOD GetOptionSelected(PRInt32 aIndex, PRBool* aValue);
NS_IMETHOD DoneAddingChildren(PRBool aIsDone);
/**

View File

@ -2848,27 +2848,6 @@ nsBlockFrame::ShouldApplyTopMargin(nsBlockReflowState& aState,
return PR_FALSE;
}
nsIFrame*
nsBlockFrame::GetTopBlockChild(nsPresContext* aPresContext)
{
if (mLines.empty())
return nsnull;
nsLineBox *firstLine = mLines.front();
if (firstLine->IsBlock())
return firstLine->mFirstChild;
if (!firstLine->CachedIsEmpty())
return nsnull;
line_iterator secondLine = begin_lines();
++secondLine;
if (secondLine == end_lines() || !secondLine->IsBlock())
return nsnull;
return secondLine->mFirstChild;
}
nsresult
nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState,
line_iterator aLine,

View File

@ -271,12 +271,6 @@ public:
*/
PRBool CheckForCollapsedBottomMarginFromClearanceLine();
/** return the topmost block child based on y-index.
* almost always the first or second line, if there is one.
* accounts for lines that hold only compressed white space, etc.
*/
nsIFrame* GetTopBlockChild(nsPresContext *aPresContext);
static nsresult GetCurrentLine(nsBlockReflowState *aState, nsLineBox **aOutCurrentLine);
static PRBool BlockIsMarginRoot(nsIFrame* aBlock);

View File

@ -708,16 +708,6 @@ nsIFrame::ApplySkipSides(nsMargin& aMargin) const
aMargin.left = 0;
}
nsRect
nsIFrame::GetMarginRect() const
{
nsMargin m(GetUsedMargin());
ApplySkipSides(m);
nsRect r(mRect);
r.Inflate(m);
return r;
}
nsRect
nsIFrame::GetPaddingRect() const
{
@ -1203,16 +1193,6 @@ nsIFrame::OverflowClip(nsDisplayListBuilder* aBuilder,
return wrapper.WrapLists(aBuilder, this, aFromSet, aToSet);
}
nsresult
nsIFrame::Clip(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aFromSet,
const nsDisplayListSet& aToSet,
const nsRect& aClipRect)
{
nsAbsPosClipWrapper wrapper(this, aClipRect);
return wrapper.WrapLists(aBuilder, this, aFromSet, aToSet);
}
static nsresult
BuildDisplayListWithOverflowClip(nsDisplayListBuilder* aBuilder, nsIFrame* aFrame,
const nsRect& aDirtyRect, const nsDisplayListSet& aSet,

View File

@ -360,24 +360,6 @@ nsFrameList::ContainsFrame(const nsIFrame* aFrame) const
return PR_FALSE;
}
PRBool
nsFrameList::ContainsFrameBefore(const nsIFrame* aFrame, const nsIFrame* aEnd) const
{
NS_PRECONDITION(aFrame, "null ptr");
nsIFrame* frame = mFirstChild;
while (frame) {
if (frame == aEnd) {
return PR_FALSE;
}
if (frame == aFrame) {
return PR_TRUE;
}
frame = frame->GetNextSibling();
}
return PR_FALSE;
}
PRInt32
nsFrameList::GetLength() const
{
@ -429,28 +411,6 @@ class CompareByContentOrderComparator
}
};
void
nsFrameList::SortByContentOrder()
{
if (IsEmpty())
return;
nsAutoTArray<nsIFrame*, 8> array;
nsIFrame* f;
for (f = mFirstChild; f; f = f->GetNextSibling()) {
array.AppendElement(f);
}
array.Sort(CompareByContentOrderComparator());
f = mFirstChild = array.ElementAt(0);
for (PRUint32 i = 1; i < array.Length(); ++i) {
nsIFrame* ff = array.ElementAt(i);
f->SetNextSibling(ff);
f = ff;
}
f->SetNextSibling(nsnull);
mLastChild = f;
}
void
nsFrameList::ApplySetParent(nsIFrame* aParent) const
{

View File

@ -215,14 +215,6 @@ public:
*/
nsFrameList ExtractTail(FrameLinkEnumerator& aLink);
/**
* Sort the frames according to content order so that the first
* frame in the list is the first in content order. Frames for
* the same content will be ordered so that a prev in flow
* comes before its next in flow.
*/
void SortByContentOrder();
nsIFrame* FirstChild() const {
return mFirstChild;
}
@ -243,7 +235,6 @@ public:
}
PRBool ContainsFrame(const nsIFrame* aFrame) const;
PRBool ContainsFrameBefore(const nsIFrame* aFrame, const nsIFrame* aEnd) const;
PRInt32 GetLength() const;

View File

@ -93,16 +93,6 @@ nsFramesetDrag::nsFramesetDrag()
UnSet();
}
nsFramesetDrag::nsFramesetDrag(PRBool aVertical,
PRInt32 aIndex,
PRInt32 aChange,
nsHTMLFramesetFrame* aSource)
{
mVertical = aVertical;
mIndex = aIndex;
mChange = aChange;
mSource = aSource;
}
void nsFramesetDrag::Reset(PRBool aVertical,
PRInt32 aIndex,
PRInt32 aChange,

View File

@ -87,10 +87,6 @@ struct nsFramesetDrag {
PRPackedBool mActive;
nsFramesetDrag();
nsFramesetDrag(PRBool aVertical,
PRInt32 aIndex,
PRInt32 aChange,
nsHTMLFramesetFrame* aSource);
void Reset(PRBool aVertical,
PRInt32 aIndex,
PRInt32 aChange,

View File

@ -888,13 +888,7 @@ public:
/**
* Like the frame's rect (see |GetRect|), which is the border rect,
* other rectangles of the frame, in app units, relative to the parent.
*
* Note that GetMarginRect is not meaningful for blocks (anything with
* 'display:block', whether block frame or not) because of both the
* collapsing and 'auto' issues with GetUsedMargin (on which it
* depends).
*/
nsRect GetMarginRect() const;
nsRect GetPaddingRect() const;
nsRect GetContentRect() const;
@ -1033,15 +1027,6 @@ public:
PRBool aClipBorderBackground = PR_FALSE,
PRBool aClipAll = PR_FALSE);
/**
* Clips the display items of aFromSet, putting the results in aToSet.
* All items are clipped.
*/
nsresult Clip(nsDisplayListBuilder* aBuilder,
const nsDisplayListSet& aFromSet,
const nsDisplayListSet& aToSet,
const nsRect& aClipRect);
enum {
DISPLAY_CHILD_FORCE_PSEUDO_STACKING_CONTEXT = 0x01,
DISPLAY_CHILD_FORCE_STACKING_CONTEXT = 0x02,

View File

@ -108,15 +108,6 @@ public:
*/
virtual PRInt32 FindLineContaining(nsIFrame* aFrame) = 0;
/**
* Given a Y coordinate relative to the block that provided this
* line iterator, return the line that contains the Y
* coordinate. Returns -1 in aLineNumberResult if the Y coordinate
* is above the first line. Returns N (where N is the number of
* lines) if the Y coordinate is below the last line.
*/
virtual PRInt32 FindLineAt(nscoord aY) = 0;
// Given a line number and an X coordinate, find the frame on the
// line that is nearest to the X coordinate. The
// aXIsBeforeFirstFrame and aXIsAfterLastFrame flags are updated

View File

@ -83,8 +83,6 @@ public:
void HasFocus(PRBool aHasFocus);
void GetHREF(nsAString& aHref) const;
nsCOMPtr<nsIContent> mArea;
nscoord* mCoords;
PRInt32 mNumCoords;
@ -107,15 +105,6 @@ Area::~Area()
delete [] mCoords;
}
void
Area::GetHREF(nsAString& aHref) const
{
aHref.Truncate();
if (mArea) {
mArea->GetAttr(kNameSpaceID_None, nsGkAtoms::href, aHref);
}
}
#include <stdlib.h>
inline PRBool

View File

@ -97,17 +97,6 @@ void nsIntervalSet::IncludeInterval(coord_type aBegin, coord_type aEnd)
}
}
PRBool nsIntervalSet::HasPoint(coord_type aPoint) const
{
Interval *current = mList;
while (current && current->mBegin <= aPoint) {
if (current->mEnd >= aPoint)
return PR_TRUE;
current = current->mNext;
}
return PR_FALSE;
}
PRBool nsIntervalSet::Intersects(coord_type aBegin, coord_type aEnd) const
{
Interval *current = mList;

View File

@ -75,11 +75,6 @@ public:
*/
void IncludeInterval(coord_type aBegin, coord_type aEnd);
/*
* Is the point aPoint contained within the set of intervals?
*/
PRBool HasPoint(coord_type aPoint) const;
/*
* Are _some_ points in [aBegin, aEnd] contained within the set
* of intervals?

View File

@ -356,26 +356,6 @@ nsLineBox::DeleteLineList(nsPresContext* aPresContext, nsLineList& aLines,
}
}
nsLineBox*
nsLineBox::FindLineContaining(nsLineList& aLines, nsIFrame* aFrame,
PRInt32* aFrameIndexInLine)
{
NS_PRECONDITION(aFrameIndexInLine && !aLines.empty() && aFrame, "null ptr");
for (nsLineList::iterator line = aLines.begin(),
line_end = aLines.end();
line != line_end;
++line)
{
PRInt32 ix = line->IndexOf(aFrame);
if (ix >= 0) {
*aFrameIndexInLine = ix;
return line;
}
}
*aFrameIndexInLine = -1;
return nsnull;
}
PRBool
nsLineBox::RFindLineContaining(nsIFrame* aFrame,
const nsLineList::iterator& aBegin,
@ -656,23 +636,6 @@ nsLineIterator::FindLineContaining(nsIFrame* aFrame)
return -1;
}
/* virtual */ PRInt32
nsLineIterator::FindLineAt(nscoord aY)
{
nsLineBox* line = mLines[0];
if (!line || (aY < line->mBounds.y)) {
return -1;
}
PRInt32 lineNumber = 0;
while (lineNumber != mNumLines) {
if ((aY >= line->mBounds.y) && (aY < line->mBounds.YMost())) {
return lineNumber;
}
line = mLines[++lineNumber];
}
return mNumLines;
}
#ifdef IBMBIDI
NS_IMETHODIMP
nsLineIterator::CheckLineOrder(PRInt32 aLine,

View File

@ -434,11 +434,6 @@ public:
static void DeleteLineList(nsPresContext* aPresContext, nsLineList& aLines,
nsIFrame* aDestructRoot);
// search from beginning to end
// XXX Should switch to API below
static nsLineBox* FindLineContaining(nsLineList& aLines, nsIFrame* aFrame,
PRInt32* aFrameIndexInLine);
// search from end to beginning of [aBegin, aEnd)
// Returns PR_TRUE if it found the line and PR_FALSE if not.
// Moves aEnd as it searches so that aEnd points to the resulting line.
@ -1545,7 +1540,6 @@ public:
nsRect& aLineBounds,
PRUint32* aLineFlags);
virtual PRInt32 FindLineContaining(nsIFrame* aFrame);
virtual PRInt32 FindLineAt(nscoord aY);
NS_IMETHOD FindFrameAt(PRInt32 aLineNumber,
nscoord aX,
nsIFrame** aFrameFound,

View File

@ -83,9 +83,6 @@ public:
NS_IMETHOD
SetBoundingMetrics(const nsBoundingMetrics& aBoundingMetrics) = 0;
NS_IMETHOD
GetReference(nsPoint& aReference) = 0;
NS_IMETHOD
SetReference(const nsPoint& aReference) = 0;
@ -117,30 +114,20 @@ public:
nsBoundingMetrics& aContainerSize,
nsHTMLReflowMetrics& aDesiredStretchSize) = 0;
/* GetEmbellishData/SetEmbellishData :
* Get/Set the mEmbellishData member variable.
*/
/* Get the mEmbellishData member variable. */
NS_IMETHOD
GetEmbellishData(nsEmbellishData& aEmbellishData) = 0;
NS_IMETHOD
SetEmbellishData(const nsEmbellishData& aEmbellishData) = 0;
/* SUPPORT FOR SCRIPTING ELEMENTS */
/*====================================================================*/
/* GetPresentationData/SetPresentationData :
* Get/Set the mPresentationData member variable.
*/
/* Get the mPresentationData member variable. */
NS_IMETHOD
GetPresentationData(nsPresentationData& aPresentationData) = 0;
NS_IMETHOD
SetPresentationData(const nsPresentationData& aPresentationData) = 0;
/* InheritAutomaticData() / TransmitAutomaticData() :
* There are precise rules governing each MathML frame and its children.
* Properties such as the scriptlevel or the embellished nature of a frame

View File

@ -71,12 +71,6 @@ public:
return NS_OK;
}
NS_IMETHOD
GetReference(nsPoint& aReference) {
aReference = mReference;
return NS_OK;
}
NS_IMETHOD
SetReference(const nsPoint& aReference) {
mReference = aReference;
@ -100,24 +94,12 @@ public:
return NS_OK;
}
NS_IMETHOD
SetEmbellishData(const nsEmbellishData& aEmbellishData) {
mEmbellishData = aEmbellishData;
return NS_OK;
}
NS_IMETHOD
GetPresentationData(nsPresentationData& aPresentationData) {
aPresentationData = mPresentationData;
return NS_OK;
}
NS_IMETHOD
SetPresentationData(const nsPresentationData& aPresentationData) {
mPresentationData = aPresentationData;
return NS_OK;
}
NS_IMETHOD
InheritAutomaticData(nsIFrame* aParent);

View File

@ -118,12 +118,6 @@ nsCSSDeclaration::RemoveProperty(nsCSSProperty aProperty)
return NS_OK;
}
nsresult
nsCSSDeclaration::AppendComment(const nsAString& aComment)
{
return /* NS_ERROR_NOT_IMPLEMENTED, or not any longer that is */ NS_OK;
}
PRBool nsCSSDeclaration::AppendValueToString(nsCSSProperty aProperty, nsAString& aResult) const
{
nsCSSCompressedDataBlock *data = GetValueIsImportant(aProperty)

View File

@ -73,7 +73,6 @@ public:
*/
nsresult ValueAppended(nsCSSProperty aProperty);
nsresult AppendComment(const nsAString& aComment);
nsresult RemoveProperty(nsCSSProperty aProperty);
nsresult GetValue(nsCSSProperty aProperty, nsAString& aValue) const;

View File

@ -218,9 +218,9 @@ public:
PRPackedBool mIsLoading : 1;
// mIsCancelled is set to true when a sheet load is stopped by
// Stop() or StopLoadingSheet(). SheetLoadData::OnStreamComplete()
// checks this to avoid parsing sheets that have been cancelled and
// such.
// Stop() or StopLoadingSheet() (which was removed in Bug 556446).
// SheetLoadData::OnStreamComplete() checks this to avoid parsing
// sheets that have been cancelled and such.
PRPackedBool mIsCancelled : 1;
// mMustNotify is true if the load data is being loaded async and
@ -539,14 +539,6 @@ Loader::SetPreferredSheet(const nsAString& aTitle)
return NS_OK;
}
nsresult
Loader::GetPreferredSheet(nsAString& aTitle)
{
aTitle.Assign(mPreferredSheet);
return NS_OK;
}
static const char kCharsetSym[] = "@charset \"";
static nsresult GetCharsetFromData(const unsigned char* aStyleSheetData,
@ -2341,89 +2333,6 @@ Loader::Stop()
return NS_OK;
}
struct StopLoadingSheetsByURIClosure {
StopLoadingSheetsByURIClosure(nsIURI* aURI,
Loader::LoadDataArray& aArray) :
uri(aURI), array(aArray)
{}
nsIURI* uri;
Loader::LoadDataArray& array;
};
static PLDHashOperator
StopLoadingSheetByURICallback(URIAndPrincipalHashKey* aKey,
SheetLoadData*& aData,
void* aClosure)
{
NS_PRECONDITION(aData, "Must have a data!");
NS_PRECONDITION(aClosure, "Must have a loader");
StopLoadingSheetsByURIClosure* closure =
static_cast<StopLoadingSheetsByURIClosure*>(aClosure);
PRBool equal;
if (NS_SUCCEEDED(aData->mURI->Equals(closure->uri, &equal)) &&
equal) {
aData->mIsLoading = PR_FALSE; // we will handle the removal right here
aData->mIsCancelled = PR_TRUE;
closure->array.AppendElement(aData);
return PL_DHASH_REMOVE;
}
return PL_DHASH_NEXT;
}
nsresult
Loader::StopLoadingSheet(nsIURI* aURL)
{
NS_ENSURE_TRUE(aURL, NS_ERROR_NULL_POINTER);
PRUint32 pendingCount =
mPendingDatas.IsInitialized() ? mPendingDatas.Count() : 0;
PRUint32 loadingCount =
mLoadingDatas.IsInitialized() ? mLoadingDatas.Count() : 0;
LoadDataArray arr(pendingCount + loadingCount + mPostedEvents.Length());
StopLoadingSheetsByURIClosure closure(aURL, arr);
if (pendingCount) {
mPendingDatas.Enumerate(StopLoadingSheetByURICallback, &closure);
}
if (loadingCount) {
mLoadingDatas.Enumerate(StopLoadingSheetByURICallback, &closure);
}
PRUint32 i;
for (i = 0; i < mPostedEvents.Length(); ++i) {
SheetLoadData* curData = mPostedEvents[i];
PRBool equal;
if (curData->mURI && NS_SUCCEEDED(curData->mURI->Equals(aURL, &equal)) &&
equal) {
curData->mIsCancelled = PR_TRUE;
if (arr.AppendElement(curData)) {
// SheetComplete() calls Release(), so give this an extra ref.
NS_ADDREF(curData);
}
#ifdef DEBUG
else {
NS_NOTREACHED("We preallocated this memory... shouldn't really fail, "
"except we never check that preallocation succeeds.");
}
#endif
}
}
mPostedEvents.Clear();
mDatasToNotifyOn += arr.Length();
for (i = 0; i < arr.Length(); ++i) {
--mDatasToNotifyOn;
SheetComplete(arr[i], NS_BINDING_ABORTED);
}
return NS_OK;
}
PRBool
Loader::HasPendingLoads()
{

View File

@ -154,7 +154,6 @@ public:
{ mCompatMode = aCompatMode; }
nsCompatibility GetCompatibilityMode() { return mCompatMode; }
nsresult SetPreferredSheet(const nsAString& aTitle);
nsresult GetPreferredSheet(nsAString& aTitle);
// XXXbz sort out what the deal is with events! When should they fire?
@ -315,10 +314,10 @@ public:
nsresult Stop(void);
/**
* Stop loading one sheet. The nsICSSLoaderObserver involved will be
* notified with NS_BINDING_ABORTED as the status, possibly synchronously.
* nsresult Loader::StopLoadingSheet(nsIURI* aURL), which notifies the
* nsICSSLoaderObserver with NS_BINDING_ABORTED, was removed in Bug 556446.
* It can be found in revision 2c44a32052ad.
*/
nsresult StopLoadingSheet(nsIURI* aURL);
/**
* Whether the loader is enabled or not.

View File

@ -67,12 +67,6 @@ void nsCSSPseudoClasses::AddRefAtoms()
NS_ARRAY_LENGTH(CSSPseudoClasses_info));
}
PRBool nsCSSPseudoClasses::IsPseudoClass(nsIAtom *aAtom)
{
return nsAtomListUtils::IsMember(aAtom,CSSPseudoClasses_info,
NS_ARRAY_LENGTH(CSSPseudoClasses_info));
}
PRBool
nsCSSPseudoClasses::HasStringArg(nsIAtom* aAtom)
{

View File

@ -52,7 +52,6 @@ public:
static void AddRefAtoms();
static PRBool IsPseudoClass(nsIAtom *aAtom);
static PRBool HasStringArg(nsIAtom* aAtom);
static PRBool HasNthPairArg(nsIAtom* aAtom);

View File

@ -205,14 +205,6 @@ nsCSSCornerSizes::~nsCSSCornerSizes()
MOZ_COUNT_DTOR(nsCSSCornerSizes);
}
void
nsCSSCornerSizes::SetAllCornersTo(const nsCSSValue& aValue)
{
NS_FOR_CSS_FULL_CORNERS(corner) {
this->GetFullCorner(corner).SetBothValuesTo(aValue);
}
}
void
nsCSSCornerSizes::Reset()
{

View File

@ -206,7 +206,6 @@ struct nsCSSCornerSizes {
return PR_FALSE;
}
void SetAllCornersTo(const nsCSSValue& aValue);
void Reset();
nsCSSValuePair mTopLeft;

View File

@ -414,12 +414,6 @@ void nsCSSValue::SetDummyInheritValue()
mUnit = eCSSUnit_DummyInherit;
}
void nsCSSValue::SetRectIsAutoValue()
{
Reset();
mUnit = eCSSUnit_RectIsAuto;
}
void nsCSSValue::StartImageLoad(nsIDocument* aDocument) const
{
NS_PRECONDITION(eCSSUnit_URL == mUnit, "Not a URL value!");

View File

@ -341,7 +341,6 @@ public:
NS_HIDDEN_(void) SetSystemFontValue();
NS_HIDDEN_(void) SetDummyValue();
NS_HIDDEN_(void) SetDummyInheritValue();
NS_HIDDEN_(void) SetRectIsAutoValue();
NS_HIDDEN_(void) StartImageLoad(nsIDocument* aDocument)
const; // Not really const, but pretending

View File

@ -496,42 +496,6 @@ nsHTMLStyleSheet::Reset(nsIURI* aURL)
return NS_OK;
}
nsresult
nsHTMLStyleSheet::GetLinkColor(nscolor& aColor)
{
if (!mLinkRule) {
return NS_HTML_STYLE_PROPERTY_NOT_THERE;
}
else {
aColor = mLinkRule->mColor;
return NS_OK;
}
}
nsresult
nsHTMLStyleSheet::GetActiveLinkColor(nscolor& aColor)
{
if (!mActiveRule) {
return NS_HTML_STYLE_PROPERTY_NOT_THERE;
}
else {
aColor = mActiveRule->mColor;
return NS_OK;
}
}
nsresult
nsHTMLStyleSheet::GetVisitedLinkColor(nscolor& aColor)
{
if (!mVisitedRule) {
return NS_HTML_STYLE_PROPERTY_NOT_THERE;
}
else {
aColor = mVisitedRule->mColor;
return NS_OK;
}
}
nsresult
nsHTMLStyleSheet::SetLinkColor(nscolor aColor)
{

View File

@ -93,9 +93,6 @@ public:
nsresult Init(nsIURI* aURL, nsIDocument* aDocument);
nsresult Reset(nsIURI* aURL);
nsresult GetLinkColor(nscolor& aColor);
nsresult GetActiveLinkColor(nscolor& aColor);
nsresult GetVisitedLinkColor(nscolor& aColor);
nsresult SetLinkColor(nscolor aColor);
nsresult SetActiveLinkColor(nscolor aColor);
nsresult SetVisitedLinkColor(nscolor aColor);

View File

@ -912,30 +912,6 @@ PRBool nsTableCellMap::RowHasSpanningCells(PRInt32 aRowIndex,
return PR_FALSE;
}
PRBool nsTableCellMap::ColIsSpannedInto(PRInt32 aColIndex) const
{
PRBool result = PR_FALSE;
PRInt32 colCount = mCols.Length();
if ((aColIndex >= 0) && (aColIndex < colCount)) {
result = mCols.ElementAt(aColIndex).mNumCellsSpan != 0;
}
return result;
}
PRBool nsTableCellMap::ColHasSpanningCells(PRInt32 aColIndex) const
{
NS_PRECONDITION (aColIndex < GetColCount(), "bad col index arg");
nsCellMap* cellMap = mFirstMap;
while (cellMap) {
if (cellMap->ColHasSpanningCells(aColIndex)) {
return PR_TRUE;
}
cellMap = cellMap->GetNextSibling();
}
return PR_FALSE;
}
void nsTableCellMap::ExpandZeroColSpans()
{
mTableFrame.SetNeedColSpanExpansion(PR_FALSE); // mark the work done
@ -2645,15 +2621,6 @@ void nsCellMap::Dump(PRBool aIsBorderCollapse) const
}
#endif
PRBool
nsCellMap::IsZeroColSpan(PRInt32 aRowIndex,
PRInt32 aColIndex) const
{
CellData* data =
mRows.SafeElementAt(aRowIndex, *sEmptyRow).SafeElementAt(aColIndex);
return data && data->IsZeroColSpan();
}
CellData*
nsCellMap::GetDataAt(PRInt32 aMapRowIndex,
PRInt32 aColIndex) const
@ -2779,22 +2746,6 @@ PRBool nsCellMap::RowHasSpanningCells(PRInt32 aRowIndex,
return PR_FALSE;
}
PRBool nsCellMap::ColHasSpanningCells(PRInt32 aColIndex) const
{
for (PRInt32 rowIndex = 0; rowIndex < mContentRowCount; rowIndex++) {
CellData* cd = GetDataAt(rowIndex, aColIndex);
if (cd && (cd->IsOrig())) { // cell originates
CellData* cd2 = GetDataAt(rowIndex, aColIndex +1);
if (cd2 && cd2->IsColSpan()) { // cd2 is spanned by a col
if (cd->GetCellFrame() == GetCellFrame(rowIndex , aColIndex + 1, *cd2, PR_FALSE)) {
return PR_TRUE;
}
}
}
}
return PR_FALSE;
}
void nsCellMap::DestroyCellData(CellData* aData)
{
if (!aData) {

View File

@ -227,9 +227,6 @@ protected:
nsRect& aDamageArea);
public:
PRBool ColIsSpannedInto(PRInt32 aColIndex) const;
PRBool ColHasSpanningCells(PRInt32 aColIndex) const;
void ExpandZeroColSpans();
void SetNotTopStart(PRUint8 aSide,
@ -441,8 +438,6 @@ public:
PRBool RowHasSpanningCells(PRInt32 aRowIndex,
PRInt32 aNumEffCols) const;
PRBool ColHasSpanningCells(PRInt32 aColIndex) const;
void ExpandZeroColSpans(nsTableCellMap& aMap);
/** indicate whether the row has more than one cell that either originates
@ -578,9 +573,6 @@ protected:
PRInt32 GetColSpanForNewCell(nsTableCellFrame& aCellFrameToAdd,
PRBool& aIsZeroColSpan) const;
PRBool IsZeroColSpan(PRInt32 aRowIndex,
PRInt32 aColIndex) const;
// Destroy a CellData struct. This will handle the case of aData
// actually being a BCCellData properly.
void DestroyCellData(CellData* aData);

View File

@ -494,18 +494,6 @@ PRBool nsTableFrame::HasMoreThanOneCell(PRInt32 aRowIndex) const
return tableCellMap->HasMoreThanOneCell(aRowIndex);
}
PRInt32 nsTableFrame::GetEffectiveCOLSAttribute()
{
NS_PRECONDITION (GetCellMap(), "null cellMap.");
PRInt32 result;
result = GetStyleTable()->mCols;
PRInt32 numCols = GetColCount();
if (result > numCols)
result = numCols;
return result;
}
void nsTableFrame::AdjustRowIndices(PRInt32 aRowIndex,
PRInt32 aAdjustment)
{
@ -3251,17 +3239,6 @@ nsTableFrame::DistributeHeightToRows(const nsHTMLReflowState& aReflowState,
ResizeCells(*this);
}
PRBool
nsTableFrame::IsPctHeight(nsStyleContext* aStyleContext)
{
PRBool result = PR_FALSE;
if (aStyleContext) {
result = (eStyleUnit_Percent ==
aStyleContext->GetStylePosition()->mHeight.GetUnit());
}
return result;
}
PRInt32 nsTableFrame::GetColumnWidth(PRInt32 aColIndex)
{
nsTableFrame * firstInFlow = (nsTableFrame *)GetFirstInFlow();
@ -3280,25 +3257,6 @@ PRInt32 nsTableFrame::GetColumnWidth(PRInt32 aColIndex)
return result;
}
void nsTableFrame::SetColumnWidth(PRInt32 aColIndex, nscoord aWidth)
{
nsTableFrame* firstInFlow = (nsTableFrame *)GetFirstInFlow();
NS_ASSERTION(firstInFlow, "illegal state -- no first in flow");
if (this == firstInFlow) {
nsTableColFrame* colFrame = GetColFrame(aColIndex);
if (colFrame) {
colFrame->SetFinalWidth(aWidth);
}
else {
NS_ASSERTION(PR_FALSE, "null col frame");
}
}
else {
firstInFlow->SetColumnWidth(aColIndex, aWidth);
}
}
// XXX: could cache this. But be sure to check style changes if you do!
nscoord nsTableFrame::GetCellSpacingX()
{
@ -3363,21 +3321,6 @@ nsTableFrame::GetTableFrame(nsIFrame* aSourceFrame)
return nsnull;
}
PRBool
nsTableFrame::IsAutoWidth(PRBool* aIsPctWidth)
{
const nsStyleCoord& width = GetStylePosition()->mWidth;
if (aIsPctWidth) {
// XXX The old code also made the return value true for 0%, but that
// seems silly.
*aIsPctWidth = width.GetUnit() == eStyleUnit_Percent &&
width.GetPercentValue() > 0.0f;
// Should this handle -moz-available and -moz-fit-content?
}
return width.GetUnit() == eStyleUnit_Auto;
}
PRBool
nsTableFrame::IsAutoHeight()
{
@ -7199,28 +7142,6 @@ PRBool nsTableFrame::RowIsSpannedInto(PRInt32 aRowIndex, PRInt32 aNumEffCols)
return result;
}
PRBool nsTableFrame::ColHasSpanningCells(PRInt32 aColIndex)
{
PRBool result = PR_FALSE;
nsTableCellMap * cellMap = GetCellMap();
NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated.");
if (cellMap) {
result = cellMap->ColHasSpanningCells(aColIndex);
}
return result;
}
PRBool nsTableFrame::ColIsSpannedInto(PRInt32 aColIndex)
{
PRBool result = PR_FALSE;
nsTableCellMap * cellMap = GetCellMap();
NS_PRECONDITION (cellMap, "bad call, cellMap not yet allocated.");
if (cellMap) {
result = cellMap->ColIsSpannedInto(aColIndex);
}
return result;
}
/* static */
void
nsTableFrame::InvalidateFrame(nsIFrame* aFrame,

View File

@ -240,9 +240,7 @@ public:
static nsIFrame* GetFrameAtOrBefore(nsIFrame* aParentFrame,
nsIFrame* aPriorChildFrame,
nsIAtom* aChildType);
PRBool IsAutoWidth(PRBool* aIsPctWidth = nsnull);
PRBool IsAutoHeight();
static PRBool IsPctHeight(nsStyleContext* aStyleContext);
/** @return PR_TRUE if aDisplayType represents a rowgroup of any sort
* (header, footer, or body)
@ -381,9 +379,6 @@ public:
/** return the width of the column at aColIndex */
virtual PRInt32 GetColumnWidth(PRInt32 aColIndex);
/** set the width of the column at aColIndex to aWidth */
virtual void SetColumnWidth(PRInt32 aColIndex, nscoord aWidth);
/** helper to get the cell spacing X style value */
virtual nscoord GetCellSpacingX();
@ -423,11 +418,6 @@ public:
*/
PRBool HasMoreThanOneCell(PRInt32 aRowIndex) const;
/** return the value of the COLS attribute, adjusted for the
* actual number of columns in the table
*/
PRInt32 GetEffectiveCOLSAttribute();
/** return the column frame associated with aColIndex
* returns nsnull if the col frame has not yet been allocated, or if
* aColIndex is out of range
@ -656,14 +646,6 @@ public:
// columns limits the search up to that column
PRBool RowHasSpanningCells(PRInt32 aRowIndex, PRInt32 aNumEffCols);
// Returns PR_TRUE if there are any cells to the left of the column at
// aColIndex and spanning into the column at aColIndex
PRBool ColIsSpannedInto(PRInt32 aColIndex);
// Returns PR_TRUE if there is a cell originating in aColIndex
// which spans into the next col
PRBool ColHasSpanningCells(PRInt32 aColIndex);
protected:
PRBool HaveReflowedColGroups() const;

View File

@ -701,71 +701,6 @@ nsTableOuterFrame::SetDesiredSize(PRUint8 aCaptionSide,
}
// XXX This is now unused, but it probably should be used!
void
nsTableOuterFrame::BalanceLeftRightCaption(PRUint8 aCaptionSide,
const nsMargin& aInnerMargin,
const nsMargin& aCaptionMargin,
nscoord& aInnerWidth,
nscoord& aCaptionWidth)
{
/* balance the caption and inner table widths to ensure space for percent widths
* Percent widths for captions or the inner table frame can determine how much of the
* available width is used and how the available width is distributed between those frames
* The inner table frame has already a quite sophisticated treatment of percentage widths
* (see BasicTableLayoutStrategy.cpp). So it acts as master in the below computations.
* There are four possible scenarios
* a) None of the frames have a percentage width - then the aInnerWidth and aCaptionwidth will not change
* b) Only the inner frame has a percentage width - this is handled in BasicTableLayoutStrategy.cpp,
* both widths will not change
* c) Only the caption has a percentage width - then the overall width (ow) will be different depending on
* the caption side. For the left side
* ow = aCaptionMargin.left + aCaptionWidth + aCaptionMargin.right + aInnerwidth + aInnerMargin.right
* aCaptionWidth = capPercent * ow
* solving this equation for aCaptionWidth gives:
* aCaptionWidth = capPercent/(1-capPercent) *
* (aCaptionMargin.left + aCaptionMargin.right + aInnerwidth + aInnerMargin.right)
* this result will cause problems for capPercent >= 1, in these cases the algorithm will now bail out
* a similar expression can be found for the right case
* d) both frames have percent widths in this case the caption width will be the inner width multiplied
* by the weight capPercent/innerPercent
*/
float capPercent = -1.0;
float innerPercent = -1.0;
const nsStylePosition* position = mCaptionFrame->GetStylePosition();
if (eStyleUnit_Percent == position->mWidth.GetUnit()) {
capPercent = position->mWidth.GetPercentValue();
if (capPercent >= 1.0)
return;
}
position = mInnerTableFrame->GetStylePosition();
if (eStyleUnit_Percent == position->mWidth.GetUnit()) {
innerPercent = position->mWidth.GetPercentValue();
if (innerPercent >= 1.0)
return;
}
if ((capPercent <= 0.0) && (innerPercent <= 0.0))
return;
if (innerPercent <= 0.0) {
if (NS_STYLE_CAPTION_SIDE_LEFT == aCaptionSide)
aCaptionWidth= (nscoord) ((capPercent / (1.0 - capPercent)) * (aCaptionMargin.left + aCaptionMargin.right +
aInnerWidth + aInnerMargin.right));
else
aCaptionWidth= (nscoord) ((capPercent / (1.0 - capPercent)) * (aCaptionMargin.left + aCaptionMargin.right +
aInnerWidth + aInnerMargin.left));
}
else {
aCaptionWidth = (nscoord) ((capPercent / innerPercent) * aInnerWidth);
}
}
nsresult
nsTableOuterFrame::GetCaptionOrigin(PRUint32 aCaptionSide,
const nsSize& aContainBlockSize,

View File

@ -220,12 +220,6 @@ protected:
nscoord& aWidth,
nscoord& aHeight);
void BalanceLeftRightCaption(PRUint8 aCaptionSide,
const nsMargin& aInnerMargin,
const nsMargin& aCaptionMargin,
nscoord& aInnerWidth,
nscoord& aCaptionWidth);
nsresult GetCaptionOrigin(PRUint32 aCaptionSide,
const nsSize& aContainBlockSize,
const nsSize& aInnerSize,

View File

@ -1695,13 +1695,6 @@ nsTableRowGroupFrame::FindLineContaining(nsIFrame* aFrame)
return rowFrame->GetRowIndex() - GetStartRowIndex();
}
PRInt32
nsTableRowGroupFrame::FindLineAt(nscoord aY)
{
NS_NOTREACHED("Not implemented");
return NS_ERROR_NOT_IMPLEMENTED;
}
#ifdef IBMBIDI
NS_IMETHODIMP
nsTableRowGroupFrame::CheckLineOrder(PRInt32 aLine,

View File

@ -263,11 +263,6 @@ public:
*/
virtual PRInt32 FindLineContaining(nsIFrame* aFrame);
/** not implemented
* the function is also not called in our tree
*/
virtual PRInt32 FindLineAt(nscoord aY);
/** Find the orginating cell frame on a row that is the nearest to the
* coordinate X.
* @param aLineNumber - the index of the row relative to the row group

View File

@ -512,20 +512,6 @@ nsGrid::DirtyRows(nsIBox* aRowBox, nsBoxLayoutState& aState)
mMarkingDirty = PR_FALSE;
}
nsGridRow* nsGrid::GetColumns()
{
RebuildIfNeeded();
return mColumns;
}
nsGridRow* nsGrid::GetRows()
{
RebuildIfNeeded();
return mRows;
}
nsGridRow*
nsGrid::GetColumnAt(PRInt32 aIndex, PRBool aIsHorizontal)
{

View File

@ -101,8 +101,6 @@ public:
nsIBox* GetBox() { return mBox; }
nsIBox* GetRowsBox() { return mRowsBox; }
nsIBox* GetColumnsBox() { return mColumnsBox; }
nsGridRow* GetColumns();
nsGridRow* GetRows();
PRInt32 GetRowCount(PRInt32 aIsHorizontal = PR_TRUE);
PRInt32 GetColumnCount(PRInt32 aIsHorizontal = PR_TRUE);

View File

@ -81,22 +81,6 @@ nsGridRow::~nsGridRow()
MOZ_COUNT_DTOR(nsGridRow);
}
void
nsGridRow::MarkDirty(nsBoxLayoutState& aState)
{
mPref = -1;
mMin = -1;
mMax = -1;
mFlex = -1;
mTop = -1;
mBottom = -1;
if (mBox) {
aState.PresShell()->FrameNeedsReflow(mBox, nsIPresShell::eTreeChange,
NS_FRAME_IS_DIRTY);
}
}
PRBool
nsGridRow::IsCollapsed(nsBoxLayoutState& aState)
{

View File

@ -60,7 +60,6 @@ public:
~nsGridRow();
void Init(nsIBox* aBox, PRBool aIsBogus);
void MarkDirty(nsBoxLayoutState& aState);
// accessors
nsIBox* GetBox() { return mBox; }

View File

@ -410,7 +410,7 @@ nsBox::SizeNeedsRecalc(nsSize& aSize)
}
void
nsBox::CoordNeedsRecalc(PRInt32& aFlex)
nsBox::CoordNeedsRecalc(nscoord& aFlex)
{
aFlex = -1;
}
@ -918,12 +918,6 @@ nsBox::AddBorderAndPadding(nsSize& aSize)
AddBorderAndPadding(this, aSize);
}
void
nsBox::AddMargin(nsSize& aSize)
{
AddMargin(this, aSize);
}
void
nsBox::AddBorderAndPadding(nsIBox* aBox, nsSize& aSize)
{

View File

@ -111,7 +111,6 @@ rollbox.
void CoordNeedsRecalc(nscoord& aCoord);
void AddBorderAndPadding(nsSize& aSize);
void AddMargin(nsSize& aSize);
static void AddBorderAndPadding(nsIBox* aBox, nsSize& aSize);
static void AddMargin(nsIBox* aChild, nsSize& aSize);

View File

@ -1916,30 +1916,6 @@ nsBoxFrame::RegUnregAccessKey(PRBool aDoReg)
return rv;
}
void
nsBoxFrame::FireDOMEventSynch(const nsAString& aDOMEventName, nsIContent *aContent)
{
// XXX This will be deprecated, because it is not good to fire synchronous DOM events
// from layout. It's better to use nsFrame::FireDOMEvent() which is asynchronous.
nsPresContext *presContext = PresContext();
nsIContent *content = aContent ? aContent : mContent;
if (content && presContext) {
// Fire a DOM event
nsCOMPtr<nsIDOMEvent> event;
if (NS_SUCCEEDED(nsEventDispatcher::CreateEvent(presContext, nsnull,
NS_LITERAL_STRING("Events"),
getter_AddRefs(event)))) {
event->InitEvent(aDOMEventName, PR_TRUE, PR_TRUE);
nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event));
privateEvent->SetTrusted(PR_TRUE);
nsEventDispatcher::DispatchDOMEvent(content, nsnull, event,
presContext, nsnull);
}
}
}
PRBool
nsBoxFrame::SupportsOrdinalsInChildren()
{

View File

@ -205,11 +205,6 @@ public:
static nsresult LayoutChildAt(nsBoxLayoutState& aState, nsIBox* aBox, const nsRect& aRect);
// Fire DOM event. If no aContent argument use frame's mContent.
// XXX This will be deprecated, because it is not good to fire synchronous DOM events
// from layout. It's better to use nsFrame::FireDOMEvent() which is asynchronous.
void FireDOMEventSynch(const nsAString& aDOMEventName, nsIContent *aContent = nsnull);
/**
* Utility method to redirect events on descendants to this frame.
* Supports 'allowevents' attribute on descendant elements to allow those

View File

@ -56,19 +56,6 @@ nsBoxLayout::nsBoxLayout()
{
}
void
nsBoxLayout::GetParentLayout(nsIBox* aBox, nsIBoxLayout** aParent)
{
nsIBox* parent = aBox->GetParentBox();
if (parent)
{
parent->GetLayoutManager(aParent);
return;
}
*aParent = nsnull;
}
void
nsBoxLayout::AddBorderAndPadding(nsIBox* aBox, nsSize& aSize)
{

View File

@ -64,7 +64,6 @@ public:
virtual void ChildrenSet(nsIBox* aBox, nsBoxLayoutState& aState, nsIBox* aChildList);
virtual void IntrinsicWidthsDirty(nsIBox* aBox, nsBoxLayoutState& aState);
virtual void GetParentLayout(nsIBox* aBox, nsIBoxLayout** aParent);
virtual void AddBorderAndPadding(nsIBox* aBox, nsSize& aSize);
virtual void AddMargin(nsIBox* aChild, nsSize& aSize);
virtual void AddMargin(nsSize& aSize, const nsMargin& aMargin);

View File

@ -109,7 +109,7 @@ public:
PRInt32 GetRowCount();
PRInt32 GetRowHeightAppUnits() { return mRowHeight; }
PRInt32 GetFixedRowSize();
void SetRowHeight(PRInt32 aRowHeight);
void SetRowHeight(nscoord aRowHeight);
nscoord GetYPosition();
nscoord GetAvailableHeight();
nscoord ComputeIntrinsicWidth(nsBoxLayoutState& aBoxLayoutState);

View File

@ -123,8 +123,6 @@ public:
NS_IMETHOD SetDebug(nsBoxLayoutState& aState, PRBool aDebug);
#endif
NS_IMETHOD IsActive(PRBool& aResult) { aResult = PR_TRUE; return NS_OK; }
// The following methods are all overridden so that the menupopup
// can be stored in a separate list, so that it doesn't impact reflow of the
// actual menu item at all.