Bug 1897135 Part 3 - Change two APIs to ensure root frame is a ViewportFrame. r=dholbert

Move `SetRootFrame()` to nsFrameManager.cpp, because in order to compile
`mRootFrame = aRootFrame` the compiler requires the full definition of
`ViewportFrame` to know that `ViewportFrame` is a subclass of `nsIFrame`

Differential Revision: https://phabricator.services.mozilla.com/D210671
This commit is contained in:
Ting-Yu Lin
2024-05-17 21:37:02 +00:00
parent 3fca23660d
commit 467d0a3a72
6 changed files with 30 additions and 19 deletions

View File

@@ -2635,7 +2635,7 @@ RestyleManager* nsCSSFrameConstructor::RestyleManager() const {
return mPresShell->GetPresContext()->RestyleManager();
}
nsIFrame* nsCSSFrameConstructor::ConstructRootFrame() {
ViewportFrame* nsCSSFrameConstructor::ConstructRootFrame() {
AUTO_PROFILER_LABEL_HOT("nsCSSFrameConstructor::ConstructRootFrame",
LAYOUT_FrameConstruction);
AUTO_LAYOUT_PHASE_ENTRY_POINT(mPresShell->GetPresContext(), FrameC);