mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 919318 - A few cosmetic changes after dropping the Get prefix on some methods. r=dholbert
This commit is contained in:
parent
5a3cdd8297
commit
a7a36b9304
@ -6622,7 +6622,7 @@ nsBlockFrame::RenumberLists(nsPresContext* aPresContext)
|
||||
}
|
||||
|
||||
// Get to first-in-flow
|
||||
nsBlockFrame* block = (nsBlockFrame*) FirstInFlow();
|
||||
nsBlockFrame* block = static_cast<nsBlockFrame*>(FirstInFlow());
|
||||
return RenumberListsInBlock(aPresContext, block, &ordinal, 0, increment);
|
||||
}
|
||||
|
||||
|
@ -74,23 +74,25 @@ NS_METHOD nsSplittableFrame::SetNextContinuation(nsIFrame* aFrame)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* nsSplittableFrame::FirstContinuation() const
|
||||
nsIFrame*
|
||||
nsSplittableFrame::FirstContinuation() const
|
||||
{
|
||||
nsSplittableFrame* firstContinuation = const_cast<nsSplittableFrame*>(this);
|
||||
while (firstContinuation->mPrevContinuation) {
|
||||
firstContinuation = static_cast<nsSplittableFrame*>(firstContinuation->mPrevContinuation);
|
||||
}
|
||||
NS_POSTCONDITION(firstContinuation, "illegal state in continuation chain.");
|
||||
MOZ_ASSERT(firstContinuation, "post-condition failed");
|
||||
return firstContinuation;
|
||||
}
|
||||
|
||||
nsIFrame* nsSplittableFrame::LastContinuation() const
|
||||
nsIFrame*
|
||||
nsSplittableFrame::LastContinuation() const
|
||||
{
|
||||
nsSplittableFrame* lastContinuation = const_cast<nsSplittableFrame*>(this);
|
||||
while (lastContinuation->mNextContinuation) {
|
||||
lastContinuation = static_cast<nsSplittableFrame*>(lastContinuation->mNextContinuation);
|
||||
}
|
||||
NS_POSTCONDITION(lastContinuation, "illegal state in continuation chain.");
|
||||
MOZ_ASSERT(lastContinuation, "post-condition failed");
|
||||
return lastContinuation;
|
||||
}
|
||||
|
||||
@ -152,23 +154,25 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIFrame* nsSplittableFrame::FirstInFlow() const
|
||||
nsIFrame*
|
||||
nsSplittableFrame::FirstInFlow() const
|
||||
{
|
||||
nsSplittableFrame* firstInFlow = const_cast<nsSplittableFrame*>(this);
|
||||
while (nsIFrame *prev = firstInFlow->GetPrevInFlow()) {
|
||||
while (nsIFrame* prev = firstInFlow->GetPrevInFlow()) {
|
||||
firstInFlow = static_cast<nsSplittableFrame*>(prev);
|
||||
}
|
||||
NS_POSTCONDITION(firstInFlow, "illegal state in flow chain.");
|
||||
MOZ_ASSERT(firstInFlow, "post-condition failed");
|
||||
return firstInFlow;
|
||||
}
|
||||
|
||||
nsIFrame* nsSplittableFrame::LastInFlow() const
|
||||
nsIFrame*
|
||||
nsSplittableFrame::LastInFlow() const
|
||||
{
|
||||
nsSplittableFrame* lastInFlow = const_cast<nsSplittableFrame*>(this);
|
||||
while (nsIFrame* next = lastInFlow->GetNextInFlow()) {
|
||||
lastInFlow = static_cast<nsSplittableFrame*>(next);
|
||||
}
|
||||
NS_POSTCONDITION(lastInFlow, "illegal state in flow chain.");
|
||||
MOZ_ASSERT(lastInFlow, "post-condition failed");
|
||||
return lastInFlow;
|
||||
}
|
||||
|
||||
|
@ -3924,8 +3924,8 @@ public:
|
||||
AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
|
||||
return NS_OK;
|
||||
}
|
||||
virtual nsIFrame* FirstInFlow() const;
|
||||
virtual nsIFrame* FirstContinuation() const;
|
||||
virtual nsIFrame* FirstInFlow() const MOZ_OVERRIDE;
|
||||
virtual nsIFrame* FirstContinuation() const MOZ_OVERRIDE;
|
||||
|
||||
virtual void AddInlineMinWidth(nsRenderingContext *aRenderingContext,
|
||||
InlineMinWidthData *aData);
|
||||
@ -4057,6 +4057,7 @@ nsContinuingTextFrame::FirstInFlow() const
|
||||
firstInFlow = previous;
|
||||
previous = firstInFlow->GetPrevInFlow();
|
||||
} while (previous);
|
||||
MOZ_ASSERT(firstInFlow, "post-condition failed");
|
||||
return firstInFlow;
|
||||
}
|
||||
|
||||
@ -4074,6 +4075,7 @@ nsContinuingTextFrame::FirstContinuation() const
|
||||
firstContinuation = previous;
|
||||
previous = firstContinuation->GetPrevContinuation();
|
||||
} while (previous);
|
||||
MOZ_ASSERT(firstContinuation, "post-condition failed");
|
||||
return firstContinuation;
|
||||
}
|
||||
|
||||
@ -4205,19 +4207,20 @@ nsTextFrame::LastInFlow() const
|
||||
while (lastInFlow->GetNextInFlow()) {
|
||||
lastInFlow = static_cast<nsTextFrame*>(lastInFlow->GetNextInFlow());
|
||||
}
|
||||
NS_POSTCONDITION(lastInFlow, "illegal state in flow chain.");
|
||||
MOZ_ASSERT(lastInFlow, "post-condition failed");
|
||||
return lastInFlow;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
nsTextFrame::LastContinuation() const
|
||||
{
|
||||
nsTextFrame* lastInFlow = const_cast<nsTextFrame*>(this);
|
||||
while (lastInFlow->mNextContinuation) {
|
||||
lastInFlow = static_cast<nsTextFrame*>(lastInFlow->mNextContinuation);
|
||||
nsTextFrame* lastContinuation = const_cast<nsTextFrame*>(this);
|
||||
while (lastContinuation->mNextContinuation) {
|
||||
lastContinuation =
|
||||
static_cast<nsTextFrame*>(lastContinuation->mNextContinuation);
|
||||
}
|
||||
NS_POSTCONDITION(lastInFlow, "illegal state in continuation chain.");
|
||||
return lastInFlow;
|
||||
MOZ_ASSERT(lastContinuation, "post-condition failed");
|
||||
return lastContinuation;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -273,7 +273,8 @@ nsTableCellMap::Synchronize(nsTableFrame* aTableFrame)
|
||||
nsCellMap* map = nullptr;
|
||||
for (uint32_t rgX = 0; rgX < orderedRowGroups.Length(); rgX++) {
|
||||
nsTableRowGroupFrame* rgFrame = orderedRowGroups[rgX];
|
||||
map = GetMapFor((nsTableRowGroupFrame*)rgFrame->FirstInFlow(), map);
|
||||
map = GetMapFor(static_cast<nsTableRowGroupFrame*>(rgFrame->FirstInFlow()),
|
||||
map);
|
||||
if (map) {
|
||||
if (!maps.AppendElement(map)) {
|
||||
delete map;
|
||||
@ -550,7 +551,8 @@ nsTableCellMap::AppendCell(nsTableCellFrame& aCellFrame,
|
||||
bool aRebuildIfNecessary,
|
||||
nsIntRect& aDamageArea)
|
||||
{
|
||||
NS_ASSERTION(&aCellFrame == aCellFrame.FirstInFlow(), "invalid call on continuing frame");
|
||||
MOZ_ASSERT(&aCellFrame == aCellFrame.FirstInFlow(),
|
||||
"invalid call on continuing frame");
|
||||
nsIFrame* rgFrame = aCellFrame.GetParent(); // get the row
|
||||
if (!rgFrame) return 0;
|
||||
rgFrame = rgFrame->GetParent(); // get the row group
|
||||
@ -611,8 +613,8 @@ nsTableCellMap::RemoveCell(nsTableCellFrame* aCellFrame,
|
||||
nsIntRect& aDamageArea)
|
||||
{
|
||||
if (!aCellFrame) ABORT0();
|
||||
NS_ASSERTION(aCellFrame == (nsTableCellFrame *)aCellFrame->FirstInFlow(),
|
||||
"invalid call on continuing frame");
|
||||
MOZ_ASSERT(aCellFrame == aCellFrame->FirstInFlow(),
|
||||
"invalid call on continuing frame");
|
||||
int32_t rowIndex = aRowIndex;
|
||||
int32_t rgStartRowIndex = 0;
|
||||
nsCellMap* cellMap = mFirstMap;
|
||||
|
@ -182,7 +182,7 @@ nsresult
|
||||
nsTableCellFrame::GetColIndex(int32_t &aColIndex) const
|
||||
{
|
||||
if (GetPrevInFlow()) {
|
||||
return ((nsTableCellFrame*)FirstInFlow())->GetColIndex(aColIndex);
|
||||
return static_cast<nsTableCellFrame*>(FirstInFlow())->GetColIndex(aColIndex);
|
||||
}
|
||||
else {
|
||||
aColIndex = mColIndex;
|
||||
@ -787,12 +787,14 @@ CalcUnpaginagedHeight(nsPresContext* aPresContext,
|
||||
nsTableFrame& aTableFrame,
|
||||
nscoord aVerticalBorderPadding)
|
||||
{
|
||||
const nsTableCellFrame* firstCellInFlow = (nsTableCellFrame*)aCellFrame.FirstInFlow();
|
||||
nsTableFrame* firstTableInFlow = (nsTableFrame*)aTableFrame.FirstInFlow();
|
||||
nsTableRowFrame* row
|
||||
= static_cast<nsTableRowFrame*>(firstCellInFlow->GetParent());
|
||||
nsTableRowGroupFrame* firstRGInFlow
|
||||
= static_cast<nsTableRowGroupFrame*>(row->GetParent());
|
||||
const nsTableCellFrame* firstCellInFlow =
|
||||
static_cast<nsTableCellFrame*>(aCellFrame.FirstInFlow());
|
||||
nsTableFrame* firstTableInFlow =
|
||||
static_cast<nsTableFrame*>(aTableFrame.FirstInFlow());
|
||||
nsTableRowFrame* row =
|
||||
static_cast<nsTableRowFrame*>(firstCellInFlow->GetParent());
|
||||
nsTableRowGroupFrame* firstRGInFlow =
|
||||
static_cast<nsTableRowGroupFrame*>(row->GetParent());
|
||||
|
||||
int32_t rowIndex;
|
||||
firstCellInFlow->GetRowIndex(rowIndex);
|
||||
|
@ -79,7 +79,7 @@ struct nsTableReflowState {
|
||||
nscoord aAvailWidth,
|
||||
nscoord aAvailHeight)
|
||||
{
|
||||
nsTableFrame* table = (nsTableFrame*)aTableFrame.FirstInFlow();
|
||||
nsTableFrame* table = static_cast<nsTableFrame*>(aTableFrame.FirstInFlow());
|
||||
nsMargin borderPadding = table->GetChildAreaOffset(&reflowState);
|
||||
nscoord cellSpacingX = table->GetCellSpacingX();
|
||||
|
||||
@ -574,12 +574,12 @@ void nsTableFrame::RemoveCol(nsTableColGroupFrame* aColGroupFrame,
|
||||
}
|
||||
|
||||
/** Get the cell map for this table frame. It is not always mCellMap.
|
||||
* Only the firstInFlow has a legit cell map
|
||||
* Only the first-in-flow has a legit cell map.
|
||||
*/
|
||||
nsTableCellMap* nsTableFrame::GetCellMap() const
|
||||
nsTableCellMap*
|
||||
nsTableFrame::GetCellMap() const
|
||||
{
|
||||
nsTableFrame* firstInFlow = (nsTableFrame *)FirstInFlow();
|
||||
return firstInFlow->mCellMap;
|
||||
return static_cast<nsTableFrame*>(FirstInFlow())->mCellMap;
|
||||
}
|
||||
|
||||
// XXX this needs to be moved to nsCSSFrameConstructor
|
||||
@ -1976,7 +1976,7 @@ nsTableFrame::AdjustForCollapsingRowsCols(nsHTMLReflowMetrics& aDesiredSize,
|
||||
RowGroupArray rowGroups;
|
||||
OrderRowGroups(rowGroups);
|
||||
|
||||
nsTableFrame* firstInFlow = static_cast<nsTableFrame*> (FirstInFlow());
|
||||
nsTableFrame* firstInFlow = static_cast<nsTableFrame*>(FirstInFlow());
|
||||
nscoord width = firstInFlow->GetCollapsedWidth(aBorderPadding);
|
||||
nscoord rgWidth = width - 2 * GetCellSpacingX();
|
||||
nsOverflowAreas overflow;
|
||||
@ -2334,7 +2334,7 @@ nsTableFrame::DoRemoveFrame(ChildListID aListID,
|
||||
nsIntRect damageArea;
|
||||
cellMap->RebuildConsideringCells(nullptr, nullptr, 0, 0, false, damageArea);
|
||||
|
||||
((nsTableFrame*)FirstInFlow())->MatchCellMapToColCache(cellMap);
|
||||
static_cast<nsTableFrame*>(FirstInFlow())->MatchCellMapToColCache(cellMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6130,7 +6130,7 @@ BCPaintBorderIterator::BCPaintBorderIterator(nsTableFrame* aTable)
|
||||
mTable = aTable;
|
||||
mVerInfo = nullptr;
|
||||
nsMargin childAreaOffset = mTable->GetChildAreaOffset(nullptr);
|
||||
mTableFirstInFlow = (nsTableFrame*) mTable->FirstInFlow();
|
||||
mTableFirstInFlow = static_cast<nsTableFrame*>(mTable->FirstInFlow());
|
||||
mTableCellMap = mTable->GetCellMap();
|
||||
// y position of first row in damage area
|
||||
mInitialOffsetY = mTable->GetPrevInFlow() ? 0 : childAreaOffset.top;
|
||||
|
Loading…
Reference in New Issue
Block a user