Closed Bug 1764866 Opened 3 years ago Closed 3 years ago

Add `EditorForwards.h` to avoid duplicated forward declarations in multiple header files

Categories

(Core :: DOM: Editor, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

For avoiding the include hell in editor module, we use forward declarations in header files, and for making the logic simpler, editor makes various helpers classes templated. Therefore, the duplicated forward declarations of template classes makes changing them harder. Therefore, we should create a new header file which has forward declarations in editor module.

Headers in editor module has a lot of forward declarations for avoiding the
include hell and has a lot of helper template classes.

Forward declarations of template classes is really messy and I'd want to
avoid the duplication because it blocks changing template class. Therefore,
centralizing forward declarations makes the headers cleaner and maintaining
template classes easier. Therefore, this patch adds a new header file which
has only forward declarations and some aliases.

It'd be better to define enum classes in it like EventForwards.h for
reducing the dependencies between headers, but currently this does not do it
for making the new file simpler as far as possible.

Removing EditActionListener.h is because it's unused.

Removing AutoTopLevelEditSubActionNotifier is because it's renamed to
AutoEditSubActionNotifier.
https://hg.mozilla.org/mozilla-central/rev/6de55c5b5f8d5f92389d0d244d2bced1f979ade9

Depends on D143816

Summary: Add `EventForwards.h` to avoid duplicated forward declarations in multiple header files → Add `EditorForwards.h` to avoid duplicated forward declarations in multiple header files
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: