Bug 1652209 part 1: Remove virtual annotations from non-overriding functions on nsPageFrame and nsPageContentFrame. r=TYLin

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.)

Differential Revision: https://phabricator.services.mozilla.com/D83234
This commit is contained in:
Daniel Holbert 2020-07-13 18:00:15 +00:00
Родитель 51a1c98a33
Коммит 666edf5b54
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -35,7 +35,7 @@ class nsPageContentFrame final : public mozilla::ViewportFrame {
aFlags & ~(nsIFrame::eCanContainOverflowContainers));
}
virtual void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
void SetSharedPageData(nsSharedPageData* aPD) { mPD = aPD; }
virtual bool HasTransformGetter() const override { return true; }

Просмотреть файл

@ -42,9 +42,9 @@ class nsPageFrame final : public nsContainerFrame {
//////////////////
// Tell the page which page number it is out of how many
virtual void SetPageNumInfo(int32_t aPageNumber, int32_t aTotalPages);
void SetPageNumInfo(int32_t aPageNumber, int32_t aTotalPages);
virtual void SetSharedPageData(nsSharedPageData* aPD);
void SetSharedPageData(nsSharedPageData* aPD);
// We must allow Print Preview UI to have a background, no matter what the
// user's settings