summaryrefslogtreecommitdiffstats
path: root/layout/base/nsFrameManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'layout/base/nsFrameManager.h')
-rw-r--r--layout/base/nsFrameManager.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/layout/base/nsFrameManager.h b/layout/base/nsFrameManager.h
index 1b9148314..bca4a581a 100644
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -33,32 +33,19 @@ namespace mozilla {
* Node in a linked list, containing the style for an element that
* does not have a frame but whose parent does have a frame.
*/
-struct UndisplayedNode {
+struct UndisplayedNode : public LinkedListElement<UndisplayedNode>
+{
UndisplayedNode(nsIContent* aContent, nsStyleContext* aStyle)
- : mContent(aContent),
- mStyle(aStyle),
- mNext(nullptr)
+ : mContent(aContent)
+ , mStyle(aStyle)
{
MOZ_COUNT_CTOR(mozilla::UndisplayedNode);
}
- ~UndisplayedNode()
- {
- MOZ_COUNT_DTOR(mozilla::UndisplayedNode);
-
- // Delete mNext iteratively to avoid blowing up the stack (bug 460461).
- UndisplayedNode* cur = mNext;
- while (cur) {
- UndisplayedNode* next = cur->mNext;
- cur->mNext = nullptr;
- delete cur;
- cur = next;
- }
- }
+ ~UndisplayedNode() { MOZ_COUNT_DTOR(mozilla::UndisplayedNode); }
- nsCOMPtr<nsIContent> mContent;
- RefPtr<nsStyleContext> mStyle;
- UndisplayedNode* mNext;
+ nsCOMPtr<nsIContent> mContent;
+ RefPtr<nsStyleContext> mStyle;
};
} // namespace mozilla