Closed
Bug 1096260
Opened 11 years ago
Closed 11 years ago
some callers of nsIFrame::ComputeSize still pass a bool for the last parameter instead of a flags word
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jfkthame, Assigned: jfkthame)
References
Details
Attachments
(1 file)
This parameter was changed in bug 732610, but some callers were apparently missed (or have been added since?), and so they still pass a literal bool. This compiles without complaint, as the bool automatically gets promoted to uint32_t, but makes the code misleading and error-prone.
See callers in nsFrame::BoxReflow(), FloatMarginISize(), and ChildShrinkWrapWidth().
I suggest we change the flags parameter from plain uint32_t to a typed enum, which will force callers to explicitly pass the correct type.
| Assignee | ||
Comment 1•11 years ago
|
||
Attachment #8519880 -
Flags: review?(dholbert)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Comment 2•11 years ago
|
||
Comment on attachment 8519880 [details] [diff] [review]
Convert flags parameter of nsIFrame::ComputeSize from uint32_t to a typed enum, and update callers accordingly.
Thanks for catching this!
Attachment #8519880 -
Flags: review?(dholbert) → review+
Updated•11 years ago
|
Version: unspecified → Trunk
| Assignee | ||
Comment 3•11 years ago
|
||
Target Milestone: --- → mozilla36
Comment 4•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•