mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #1355 - Speed up the traversal of a table row frame's child cells
Speed up getting the first cellframe in a row and the next cellframe after the given one
This commit is contained in:
parent
0070369171
commit
02487fecd6
4 changed files with 27 additions and 28 deletions
|
|
@ -215,7 +215,17 @@ public:
|
|||
bool HasPctOverBSize();
|
||||
void SetHasPctOverBSize(bool aValue);
|
||||
|
||||
nsTableCellFrame* GetNextCell() const;
|
||||
nsTableCellFrame* GetNextCell() const
|
||||
{
|
||||
nsIFrame* sibling = GetNextSibling();
|
||||
#ifdef DEBUG
|
||||
if (sibling) {
|
||||
nsTableCellFrame* cellFrame = do_QueryFrame(sibling);
|
||||
MOZ_ASSERT(cellFrame, "How do we have a non-cell sibling?");
|
||||
}
|
||||
#endif // DEBUG
|
||||
return static_cast<nsTableCellFrame*>(sibling);
|
||||
}
|
||||
|
||||
virtual LogicalMargin GetBorderWidth(WritingMode aWM) const;
|
||||
|
||||
|
|
@ -350,4 +360,17 @@ private:
|
|||
BCPixelSize mIStartBorder;
|
||||
};
|
||||
|
||||
// Implemented here because that's a sane-ish way to make the includes work out.
|
||||
inline nsTableCellFrame* nsTableRowFrame::GetFirstCell() const
|
||||
{
|
||||
nsIFrame* firstChild = mFrames.FirstChild();
|
||||
#ifdef DEBUG
|
||||
if (firstChild) {
|
||||
nsTableCellFrame* cellFrame = do_QueryFrame(firstChild);
|
||||
MOZ_ASSERT(cellFrame, "How do we have a non-cell sibling?");
|
||||
}
|
||||
#endif // DEBUG
|
||||
return static_cast<nsTableCellFrame*>(firstChild);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue