Closed Bug 1544343 Opened 5 months ago Closed 5 months ago

Make layout use mozilla::PresShell directly rather than via nsIPresShell

Categories

(Core :: Layout, task)

task
Not set

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(3 files, 1 obsolete file)

And this patch makes it return raw pointer. The safeness of the pointer
should be managed by MOZ_CAN_RUN_SCRIPT since incrementing refcount in
hot path is bad for performance. So, it should be followed by bug 1543315.

Comment on attachment 9058204 [details]
Bug 1544343 - part 1: Make mozilla::layers::GetPresShell() in APZCCallbackHelper.cpp return mozilla::PresShell directly

Revision D27471 was moved to bug 1544218. Setting attachment 9058204 [details] to obsolete.

Attachment #9058204 - Attachment is obsolete: true

Additionally, this patch makes nsFrame.h stop including nsIPresShell.h
and makes each users include mozilla/PresShell.h instead. So, this improves
rebuild performance of nsIPresShell.h (and mozilla/PresShell.h in the
future).

Note that due to nsIFrame::PresShell(), mozilla:: prefix is necessary for
PresShell in a lot of classes which are derived from nsIFrame even in
.cpp files.

This patch changes remaining things under layout/. However, there are some
places which still need to use nsIPresShell. That will be fixed in a
follow up bug.

Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/cfd46a25af71
part 1: Make nsFrameManager, nsCSSFrameConstructor and nsFrameConstructorState use mozilla::PresShell directly rather than via nsIPresShell r=emilio
https://hg.mozilla.org/integration/autoland/rev/4b56de3cd46c
part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio
https://hg.mozilla.org/integration/autoland/rev/35aed2f899c3
part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.