Closed Bug 716408 Opened 13 years ago Closed 13 years ago

Minor cleanup in table code

Categories

(Core :: Layout: Tables, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

References

Details

Attachments

(7 files, 1 obsolete file)

No description provided.
GetFirstInFlow() can never return null so we can remove these null-checks
Attachment #586835 - Flags: review?(bernd_mozilla)
The mIsBorderCollapse bit is set on all table frames in Init so there's no need to get this bit from the first-in-flow frame.
Attachment #586836 - Flags: review?(bernd_mozilla)
Make GetTableFrame() abort if the arg isn't a table frame descendant. Consequently, remove null-checks of GetTableFrame() results.
Attachment #586840 - Flags: review?(bernd_mozilla)
Attachment #586841 - Flags: review?(bernd_mozilla)
I will only on the weekend (14.01, 15.01) get to this reviews
Comment on attachment 586835 [details] [diff] [review] Remove null-checks of GetFirstInFlow() result Review of attachment 586835 [details] [diff] [review]: ----------------------------------------------------------------- please remove also mxr.mozilla.org/mozilla-central/source/layout/tables/nsTableFrame.cpp#3311 it doubles http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsSplittableFrame.cpp#197 Further remove http://mxr.mozilla.org/mozilla-central/source/layout/tables/nsTableFrame.cpp#6237 http://mxr.mozilla.org/mozilla-central/source/layout/tables/nsTableFrame.cpp#6248 The patch is OK in itself, but lets get rid of it all once.
Attachment #586835 - Flags: review?(bernd_mozilla) → review-
Hmm, yes, those changes got lost somehow... I took the opportunity of simplifying GetColumnWidth as well.
Attachment #586835 - Attachment is obsolete: true
Attachment #588777 - Flags: review?(bernd_mozilla)
Comment on attachment 588777 [details] [diff] [review] Remove null-checks of GetFirstInFlow() result Review of attachment 588777 [details] [diff] [review]: ----------------------------------------------------------------- thats what I wanted.
Attachment #588777 - Flags: review?(bernd_mozilla) → review+
Comment on attachment 586836 [details] [diff] [review] Remove unnecessary nsTableFrame::GetFirstInFlow() calls to get IsBorderCollapse() bit Review of attachment 586836 [details] [diff] [review]: ----------------------------------------------------------------- yep the master himself was inconsistent with respect to this, http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/tables/nsTableRowGroupFrame.cpp&rev=3.411&mark=394#394
Attachment #586836 - Flags: review?(bernd_mozilla) → review+
Comment on attachment 586840 [details] [diff] [review] Make nsTableFrame::GetTableFrame abort if the given frame isn't a table frame descendant Review of attachment 586840 [details] [diff] [review]: ----------------------------------------------------------------- I like the change to NS_RUNTIMEABORT("unable to find table parent");
Attachment #586840 - Flags: review?(bernd_mozilla) → review+
Attachment #586841 - Flags: review?(bernd_mozilla) → review+
Attachment #586842 - Flags: review?(bernd_mozilla) → review+
Attachment #586843 - Flags: review?(bernd_mozilla) → review+
Attachment #586844 - Flags: review?(bernd_mozilla) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: