Closed Bug 1176555 Opened 5 years ago Closed 5 years ago
Use human-friendly state bit accessors/setters in table layout code
nsTableCellFrame.h has some functions that directly manipulate/inspect mState using bitwise math. For fool-proofing & consistency & readability, we should adjust these to use the standard nsIFrame methods that are available for this -- AddStateBits, RemoveStateBits, and HasAllStateBits. The functions which would benefit from this are (at least): nsTableCellFrame::GetContentEmpty() nsTableCellFrame::SetContentEmpty(bool aContentEmpty) nsTableCellFrame::HasPctOverBSize() nsTableCellFrame::SetHasPctOverBSize(bool aValue) http://mxr.mozilla.org/mozilla-central/source/layout/tables/nsTableCellFrame.h#274 There are likely other similar cleanup opportunities in other table-layout files -- grepping for "mState" in layout/tables should reveal those. Might be good to handle others here as well.
(Marking this as depending on bug 1174711, since that bug has a patch that touches this code & we shouldn't land anything here until after that bug lands, to avoid causing bitrot.)
More functions that would benefit from this: nsTableRowFrame::HasUnpaginatedBSize() nsTableRowFrame::SetHasUnpaginatedBSize(bool aValue) nsTableRowGroupFrame::HasStyleBSize() const nsTableRowGroupFrame::SetHasStyleBSize(bool aValue)
Summary: Use human-friendly state bit accessors/setters in nsTableCellFrame.h → Use human-friendly state bit accessors/setters in table layout code
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment on attachment 8625342 [details] [diff] [review] Replace explicit bit-twiddling of frame state flags by human-readable nsIFrame state-manipulation methods in table layout code Looks great!
Attachment #8625342 - Flags: review?(dholbert) → review+
You need to log in before you can comment on or make changes to this bug.