Closed Bug 1545342 Opened 6 years ago Closed 6 years ago

Define all enums for nsIPresShell and mozilla::PresShell in new header file

Categories

(Core :: Layout, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(3 files)

I think that there should be new header file mozilla/PresShellForwards.h as similar to mozilla/EventForwards.h. It should have forward declarations of all classes and structs in mozilla/PresShell.h and nsIPresShell.h. And it should declare all enums and constatns of them as enum classes. Then, when a header requires only them, they don't need to include mozilla/PresShell.h nor nsIPresShell.h anymore.

Priority: -- → P3

This patch creates new header, mozilla/PresShellForwards.h. It should have
all forward declarations of global class/struct in nsIPresShell.h and
mozilla/PresShell.h.

Additionally, this moves all enums and constants in them into the new file
with changing them to enum classes.

This will make other headers which require only specific types in the header
files not include them.

This patch moves some enum in nsIPresShell which are in public scope into
mozilla namespace and change them as enum classes.

Unfortunately, only "where to scroll" enum is just defines constants of
percentages of scroll destination. Therefore, this patch makes only them
as static const.

This patch moves remaining public enum of nsIPresShell to mozilla
namespace in mozilla/PresShellForwards.h and make them enum classes.

Additionally, some methods which use the moving enums from nsIPresShell
to PresShell.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/97f1fb7c02bd part 1: Create mozilla/PresShellForwards.h and move global enums/constants in nsIPresShell.h and mozilla/PresShell.h into the new one r=smaug https://hg.mozilla.org/integration/autoland/rev/ac28f88b0c67 part 2: Make some public enum of nsIPresShell move to mozilla namespace and defined as enum class in PresShellForwards.h r=smaug https://hg.mozilla.org/integration/autoland/rev/e73708ef8eba part 3: Move remaining public enum of nsIPresShell to mozilla namespace in mozilla/PresShellForwards.h and make them enum class r=smaug
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: