Closed Bug 810355 Opened 12 years ago Closed 12 years ago

Convert nsDidReflowStatus into an enum class

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

Bug 806002 converted this into an enum.  We can go the extra mile to convert it into an enum class so that the compiler actually does type checking for us.
Depends on: 806002
Attached patch Patch (v1)Splinter Review
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Attachment #681371 - Flags: review?(dholbert)
Comment on attachment 681371 [details] [diff] [review]
Patch (v1)

>-  target->DidReflow(mPresContext, nullptr, NS_FRAME_REFLOW_FINISHED);
>+  target->DidReflow(mPresContext, nullptr, nsDidReflowStatus::NS_FRAME_REFLOW_FINISHED);

The scoping change introduces a lot of redundancy in the naming, and makes all of these usages huge and gross.

Could you fix that by renaming these to to e.g. nsDidReflowStatus::FINISHED and ::NOT_FINISHED?

r=me with that.
Attachment #681371 - Flags: review?(dholbert) → review+
Sure, will do when landing.
Hmm, looks like there's one red on the Try push:
{
../../../layout/generic/nsFrame.cpp: In member function 'virtual nsresult nsFrame::DidReflow(nsPresContext*, const nsHTMLReflowState*, nsDidReflowStatus)':
../../../layout/generic/nsFrame.cpp:4199: error: cannot pass objects of non-POD type 'class nsDidReflowStatus' through '...'; call will abort at runtime
}
https://tbpl.mozilla.org/php/getParsedLog.php?id=17019680&tree=Try
https://hg.mozilla.org/mozilla-central/rev/e6e9cda2871a
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: