Closed
Bug 1167696
Opened 9 years ago
Closed 9 years ago
Simplify nsTableReflowState
Categories
(Core :: Layout: Tables, defect)
Core
Layout: Tables
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
Details
Attachments
(2 files)
3.30 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
2.22 KB,
patch
|
MatsPalmgren_bugz
:
review+
|
Details | Diff | Splinter Review |
Noticed a few simplifications that can be made to nsTableReflowState: 1) the prescontext arg on its methods is unused & can be removed. 2) It's got 2 constructors, but only one of them is ever used -- so we can drop the unused one, and merge the used one into "Init()"
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8609558 -
Flags: review?(mats)
Comment 2•9 years ago
|
||
Comment on attachment 8609558 [details] [diff] [review] part 1: drop unused arg & constructor, and fold Init into remaining constructor It's weird to use "nsTableFrame&" when we use pointers for frames everywhere else. I think we should change it to "nsTableFrame*" for consistency while we're here.
Attachment #8609558 -
Flags: review?(mats) → review+
Assignee | ||
Comment 3•9 years ago
|
||
Ah, good point. Taking it one step further, we actually don't even need that nsTableFrame& (or nsTableFrame*) parameter at all, in fact -- we've already got it on the passed-in nsHTMLReflowState. (I traced it back (just through one level of caller), and that nsHTMLReflowState comes from nsTableFrame::Reflow, so it should have its .frame member == this (the table frame) at that point. And '*this' is the frame that we pass in to construct the nsTableReflowState.)
Assignee | ||
Comment 4•9 years ago
|
||
(Since we're losing the type-enforcement of the passed-in frame having type nsTableFrame, I added an assertion about the frame's ->Type().)
Assignee | ||
Updated•9 years ago
|
Attachment #8609558 -
Attachment description: fix v1 → part 1: drop unused arg & constructor, and fold Init into remaining constructor
Updated•9 years ago
|
Attachment #8609767 -
Flags: review?(mats) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4aa7021e13d https://hg.mozilla.org/integration/mozilla-inbound/rev/3569f024ef47
https://hg.mozilla.org/mozilla-central/rev/d4aa7021e13d https://hg.mozilla.org/mozilla-central/rev/3569f024ef47
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•