From 1347c5032b0f71b4b62bfbff5c855ae6675e788f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 14 Feb 2022 22:30:50 +0100 Subject: [PATCH] LibWeb: Add spec comments to the StackOfOpenElements class --- Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h index 7885157bd6..324a89025a 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/StackOfOpenElements.h @@ -12,8 +12,14 @@ namespace Web::HTML { +// https://html.spec.whatwg.org/multipage/parsing.html#stack-of-open-elements class StackOfOpenElements { public: + // Initially, the stack of open elements is empty. + // The stack grows downwards; the topmost node on the stack is the first one added to the stack, + // and the bottommost node of the stack is the most recently added node in the stack + // (notwithstanding when the stack is manipulated in a random access fashion as part of the handling for misnested tags). + StackOfOpenElements() { } ~StackOfOpenElements();