Issue #1873 - Part 1: Introduce ParentForUndisplayedMap helper method

This introduces the `ParentForUndisplayedMap` helper method to reduce duplication in terms of getting the parent and asserting parent existence.

Partially based on parts of https://bugzilla.mozilla.org/show_bug.cgi?id=1341083
This commit is contained in:
FranklinDM 2022-04-18 23:11:06 +08:00 committed by roytam1
commit c5f6e6155b
2 changed files with 17 additions and 6 deletions

View file

@ -182,6 +182,8 @@ public:
void RestoreFrameStateFor(nsIFrame* aFrame,
nsILayoutHistoryState* aState);
protected:
static nsIContent* ParentForUndisplayedMap(const nsIContent* aContent);
void ClearAllMapsFor(nsIContent* aParentContent);
static nsStyleContext* GetStyleContextInMap(UndisplayedMap* aMap,