Minor cleanup in table code

RESOLVED FIXED in mozilla12

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

Trunk
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(7 attachments, 1 obsolete attachment)

Assignee

Description

8 years ago
No description provided.
Assignee

Comment 1

8 years ago
GetFirstInFlow() can never return null so we can remove these null-checks
Attachment #586835 - Flags: review?(bernd_mozilla)
Assignee

Comment 2

8 years ago
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)
Assignee

Comment 3

8 years ago
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)
Assignee

Comment 4

8 years ago
Attachment #586841 - Flags: review?(bernd_mozilla)

Updated

8 years ago
Duplicate of this bug: 333287

Comment 9

8 years ago
I will only on the weekend (14.01, 15.01) get to this reviews

Comment 10

8 years ago
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-
Assignee

Comment 11

8 years ago
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 12

8 years ago
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 13

8 years ago
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 14

8 years ago
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+

Updated

8 years ago
Attachment #586841 - Flags: review?(bernd_mozilla) → review+

Updated

8 years ago
Attachment #586842 - Flags: review?(bernd_mozilla) → review+

Updated

8 years ago
Attachment #586843 - Flags: review?(bernd_mozilla) → review+

Updated

8 years ago
Attachment #586844 - Flags: review?(bernd_mozilla) → review+
You need to log in before you can comment on or make changes to this bug.