Closed Bug 1195857 Opened 4 years ago Closed 4 years ago

Change HasAuthorSpecifiedRules to take a const arg, to remove need for hacky const_casts

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

When reviewing bug 1182414, I noticed we generally do a hacky const_cast on "this" before calling HasAuthorSpecifiedRules (in existing code), since HasAuthorSpecifiedRules takes a non-const nsIFrame*.

There's no reason it has to be this way; HasAuthorSpecifiedRules can just take a const nsIFrame*, and then we can do away with all these const_casts.
My patch for this layers on top of jwatt's patch for bug 1182414 (which touches the same call-sites).
Depends on: 1182414
Comment on attachment 8649365 [details] [diff] [review]
fix v1

Looks good. Free to land this before my patch.
Attachment #8649365 - Flags: review?(jwatt) → review+
https://hg.mozilla.org/mozilla-central/rev/50b36c5e9060
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.