The default bug view has changed. See this FAQ.

Minor cleanup in table code

RESOLVED FIXED in mozilla12

Status

()

Core
Layout: Tables
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mats, Assigned: mats)

Tracking

Trunk
mozilla12
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(7 attachments, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 586835 [details] [diff] [review]
Remove null-checks of GetFirstInFlow() result

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

Comment 2

5 years ago
Created attachment 586836 [details] [diff] [review]
Remove unnecessary nsTableFrame::GetFirstInFlow() calls to get IsBorderCollapse() bit

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

5 years ago
Created attachment 586840 [details] [diff] [review]
Make nsTableFrame::GetTableFrame abort if the given frame isn't a table frame descendant

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

5 years ago
Created attachment 586841 [details] [diff] [review]
Initialize all bits of mBits to zero
Attachment #586841 - Flags: review?(bernd_mozilla)
(Assignee)

Comment 5

5 years ago
Created attachment 586842 [details] [diff] [review]
No need to null-check for delete, no need to null out members in dtor
Attachment #586842 - Flags: review?(bernd_mozilla)
(Assignee)

Comment 6

5 years ago
Created attachment 586843 [details] [diff] [review]
Assert that a prev-in-flow is null or of the same frame type. No need to null out mCellMap, the ctor does that and re-Init of frames isn't allowed
Attachment #586843 - Flags: review?(bernd_mozilla)
(Assignee)

Comment 7

5 years ago
Created attachment 586844 [details] [diff] [review]
Indent nsTableFrame::DidSetStyleContext by two spaces, not three
Attachment #586844 - Flags: review?(bernd_mozilla)

Updated

5 years ago
Duplicate of this bug: 333287

Comment 9

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

Comment 10

5 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

5 years ago
Created attachment 588777 [details] [diff] [review]
Remove null-checks of GetFirstInFlow() result

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

5 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

5 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

5 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

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

Updated

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

Updated

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

Updated

5 years ago
Attachment #586844 - Flags: review?(bernd_mozilla) → review+
(Assignee)

Comment 15

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/57fc94d1196a
https://hg.mozilla.org/integration/mozilla-inbound/rev/14223e7cfb3b
https://hg.mozilla.org/integration/mozilla-inbound/rev/302fde3d16e3
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ba6c4100885
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0eeea7083ec
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d4556015326
https://hg.mozilla.org/integration/mozilla-inbound/rev/3077b729dfd5
Whiteboard: [inbound]
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/57fc94d1196a
https://hg.mozilla.org/mozilla-central/rev/14223e7cfb3b
https://hg.mozilla.org/mozilla-central/rev/302fde3d16e3
https://hg.mozilla.org/mozilla-central/rev/5ba6c4100885
https://hg.mozilla.org/mozilla-central/rev/f0eeea7083ec
https://hg.mozilla.org/mozilla-central/rev/9d4556015326
https://hg.mozilla.org/mozilla-central/rev/3077b729dfd5
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.