Bug 1544343 - part 2: Make factory methods take mozilla::PresShell instead of nsIPresShell r=emilio

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.

Differential Revision: https://phabricator.services.mozilla.com/D27476
This commit is contained in:
Masayuki Nakano
2019-04-16 07:24:49 +00:00
parent 07eac02be2
commit ad09cbb08f
213 changed files with 820 additions and 521 deletions

View File

@@ -21,6 +21,7 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/MutationEventBinding.h"
#include "mozilla/Preferences.h"
#include "mozilla/PresShell.h"
#include "mozilla/StaticPrefs.h"
#include "nsNodeInfoManager.h"
#include "nsContentCreatorFunctions.h"
@@ -33,8 +34,7 @@
using namespace mozilla;
using namespace mozilla::dom;
nsIFrame* NS_NewFileControlFrame(nsIPresShell* aPresShell,
ComputedStyle* aStyle) {
nsIFrame* NS_NewFileControlFrame(PresShell* aPresShell, ComputedStyle* aStyle) {
return new (aPresShell)
nsFileControlFrame(aStyle, aPresShell->GetPresContext());
}