Bug 1897135 Part 2 - Remove redundant mFrameManager member in PresShell. r=dholbert
We can just use `mFrameConstructor` to call `GetRootFrame()`. In order to do so while keeping `PresShell::GetRootFrame()` as a inline method, we need to include `nsCSSFrameConstructor` header in `PresShell.h`, and remove `PresShell` header in `nsCSSFrameConstructor.h`. That means we can no longer inline `RestyleManager()` since it needs to access `PresShell`, but it's OK since `RestyleManager` is used only in the frame constructor, and is probably not in the hot path. Differential Revision: https://phabricator.services.mozilla.com/D210670
This commit is contained in:
@@ -2631,6 +2631,10 @@ nsIFrame* nsCSSFrameConstructor::ConstructDocElementFrame(
|
||||
return newFrame;
|
||||
}
|
||||
|
||||
RestyleManager* nsCSSFrameConstructor::RestyleManager() const {
|
||||
return mPresShell->GetPresContext()->RestyleManager();
|
||||
}
|
||||
|
||||
nsIFrame* nsCSSFrameConstructor::ConstructRootFrame() {
|
||||
AUTO_PROFILER_LABEL_HOT("nsCSSFrameConstructor::ConstructRootFrame",
|
||||
LAYOUT_FrameConstruction);
|
||||
|
||||
Reference in New Issue
Block a user