mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716408 - Remove unnecessary nsTableFrame::GetFirstInFlow() calls to get IsBorderCollapse() bit. r=bernd
This commit is contained in:
parent
c06bb838db
commit
fb9059334e
@ -191,7 +191,6 @@ nsTableRowFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
return;
|
||||
|
||||
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
|
||||
|
||||
if (tableFrame->IsBorderCollapse() &&
|
||||
tableFrame->BCRecalcNeeded(aOldStyleContext, GetStyleContext())) {
|
||||
nsRect damageArea(0, GetRowIndex(), tableFrame->GetColCount(), 1);
|
||||
@ -237,8 +236,7 @@ nsTableRowFrame::InsertFrames(ChildListID aListID,
|
||||
|
||||
// Get the table frame
|
||||
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
|
||||
|
||||
nsIAtom* cellFrameType = (tableFrame->IsBorderCollapse()) ? nsGkAtoms::bcTableCellFrame : nsGkAtoms::tableCellFrame;
|
||||
nsIAtom* cellFrameType = tableFrame->IsBorderCollapse() ? nsGkAtoms::bcTableCellFrame : nsGkAtoms::tableCellFrame;
|
||||
nsTableCellFrame* prevCellFrame = (nsTableCellFrame *)nsTableFrame::GetFrameAtOrBefore(this, aPrevFrame, cellFrameType);
|
||||
nsTArray<nsTableCellFrame*> cellChildren;
|
||||
for (nsFrameList::Enumerator e(newCells); !e.AtEnd(); e.Next()) {
|
||||
@ -786,13 +784,10 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
{
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
bool borderCollapse = (((nsTableFrame*)aTableFrame.GetFirstInFlow())->IsBorderCollapse());
|
||||
|
||||
// XXXldb Should we be checking constrained height instead?
|
||||
bool isPaginated = aPresContext->IsPaginated();
|
||||
|
||||
const bool isPaginated = aPresContext->IsPaginated();
|
||||
const bool borderCollapse = aTableFrame.IsBorderCollapse();
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
nscoord cellSpacingX = aTableFrame.GetCellSpacingX();
|
||||
PRInt32 cellColSpan = 1; // must be defined here so it's set properly for non-cell kids
|
||||
|
||||
@ -1084,8 +1079,8 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
|
||||
nsRect cellRect = aCellFrame->GetRect();
|
||||
nsRect cellVisualOverflow = aCellFrame->GetVisualOverflowRect();
|
||||
|
||||
nsSize availSize(cellRect.width, aAvailableHeight);
|
||||
bool borderCollapse = ((nsTableFrame*)tableFrame->GetFirstInFlow())->IsBorderCollapse();
|
||||
nsSize availSize(cellRect.width, aAvailableHeight);
|
||||
bool borderCollapse = tableFrame->IsBorderCollapse();
|
||||
nsTableCellReflowState cellReflowState(aPresContext, aReflowState,
|
||||
aCellFrame, availSize, false);
|
||||
InitChildReflowState(*aPresContext, availSize, borderCollapse, cellReflowState);
|
||||
|
@ -951,8 +951,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
|
||||
aFirstTruncatedRow = nsnull;
|
||||
aDesiredHeight = 0;
|
||||
|
||||
bool borderCollapse =
|
||||
static_cast<nsTableFrame*>(aTable.GetFirstInFlow())->IsBorderCollapse();
|
||||
const bool borderCollapse = aTable.IsBorderCollapse();
|
||||
PRInt32 lastRowIndex = aLastRow.GetRowIndex();
|
||||
bool wasLast = false;
|
||||
bool haveRowSpan = false;
|
||||
@ -1086,8 +1085,8 @@ nsTableRowGroupFrame::SplitRowGroup(nsPresContext* aPresContext,
|
||||
nscoord availWidth = aReflowState.availableWidth;
|
||||
nscoord availHeight = aReflowState.availableHeight;
|
||||
|
||||
bool borderCollapse = ((nsTableFrame*)aTableFrame->GetFirstInFlow())->IsBorderCollapse();
|
||||
nscoord cellSpacingY = aTableFrame->GetCellSpacingY();
|
||||
const bool borderCollapse = aTableFrame->IsBorderCollapse();
|
||||
nscoord cellSpacingY = aTableFrame->GetCellSpacingY();
|
||||
|
||||
// get the page height
|
||||
nscoord pageHeight = aPresContext->GetPageSize().height;
|
||||
|
Loading…
Reference in New Issue
Block a user