Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.
```
#!/bin/bash
function rename() {
echo "Renaming $1 to $2"
rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}
rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```
And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.
Differential Revision: https://phabricator.services.mozilla.com/D161864
This commit is contained in:
@@ -6061,7 +6061,7 @@ void PresShell::MarkFramesInSubtreeApproximatelyVisible(
|
||||
bool preserves3DChildren = aFrame->Extend3DContext();
|
||||
|
||||
for (const auto& [list, listID] : aFrame->ChildLists()) {
|
||||
if (listID == kPopupList) {
|
||||
if (listID == FrameChildListID::Popup) {
|
||||
// We assume all frames in popups are visible, so we skip them here.
|
||||
continue;
|
||||
}
|
||||
@@ -11200,7 +11200,8 @@ size_t PresShell::SizeOfTextRuns(MallocSizeOf aMallocSizeOf) const {
|
||||
void PresShell::MarkFixedFramesForReflow(IntrinsicDirty aIntrinsicDirty) {
|
||||
nsIFrame* rootFrame = mFrameConstructor->GetRootFrame();
|
||||
if (rootFrame) {
|
||||
const nsFrameList& childList = rootFrame->GetChildList(kFixedList);
|
||||
const nsFrameList& childList =
|
||||
rootFrame->GetChildList(FrameChildListID::Fixed);
|
||||
for (nsIFrame* childFrame : childList) {
|
||||
FrameNeedsReflow(childFrame, aIntrinsicDirty, NS_FRAME_IS_DIRTY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user