Cleanup in nsFrameManager, nsCSSFrameConstructor, and PresShell
Categories
(Core :: Layout, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox128 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(3 files)
See the patches for the details.
| Assignee | ||
Comment 1•1 year ago
|
||
Also, delete unused DEBUG_UNDISPLAYED_MAP and DEBUG_DISPLAY_CONTENTS_MAP in
nsFrameManager.cpp.
Delete the comments between the #includes in PresShell.cpp per coding style
guideline: "Don't place comments between non-conditional includes." in
https://firefox-source-docs.mozilla.org/code-quality/coding-style/coding_style_cpp.html#include-directives
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
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.
| Assignee | ||
Comment 3•1 year ago
|
||
Move SetRootFrame() to nsFrameManager.cpp because calling IsViewportFrame()
requires full definition of nsIFrame.
An alternative idea without adding an assertion is that we can change
mRootFrame, GetRootFrame() and SetRootFrame() in nsFrameManager to use
ViewportFrame*. However, given that most of the caller are getting root frame
via PresShell::GetRootFrame(), and I don't see the exisiting usage requires
accessing ViewportFrame. Therefore, this idea doesn't seem beneficial, and
might make other files depending on "ViewportFrame.h" unnecessarily.
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/5dbc0205b48a
https://hg.mozilla.org/mozilla-central/rev/813bb8dcc655
https://hg.mozilla.org/mozilla-central/rev/0cd4c114c5e6
Description
•