Closed Bug 1652209 Opened 3 months ago Closed 3 months ago

Clean up 'virtual' annotations in print-related frame classes

Categories

(Core :: Printing: Output, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(2 files)

The nsPage*Frame classes have some unnecessary virtual annotations that we should clean up.

Filing this bug on doing that.

Severity: -- → S4
Priority: -- → P3

These classes are both 'final', so it's pointless for them to declare their own
(non-overriding) virtual functions. They can't have any subclasses, so it would
be impossible for there to be polymorphism in these virtual funtions'
implementation. So, let's de-virtualize them.

(I'm guessing these date from the early Mozilla days when methods needed to be
virtual in order to be called from other components, or something like that.)

Assignee: nobody → dholbert
Status: NEW → ASSIGNED

Per Mozilla coding style:
"Method declarations must use, at most, one of the following keywords:
virtual, override, or final"
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#c-c

Depends on D83234

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/40b817b70019
part 1: Remove virtual annotations from non-overriding functions on nsPageFrame and nsPageContentFrame. r=TYLin
https://hg.mozilla.org/integration/autoland/rev/4328a6c14818
part 2: Remove virtual annotations from overriding functions on nsPageFrame and nsPageContentFrame. r=TYLin
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.