#include "third_party/blink/renderer/core/html/parser/html_element_stack.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/html/forms/html_form_control_element.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/html_body_element.h"
#include "third_party/blink/renderer/core/html/html_element.h"
#include "third_party/blink/renderer/core/html/html_head_element.h"
#include "third_party/blink/renderer/core/html/html_html_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/mathml_names.h"
#include "third_party/blink/renderer/core/svg_names.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
namespace blink {
HTMLTag;
namespace {
#define SCOPE_MARKER_CASES …
inline bool IsRootNode(HTMLStackItem* item) { … }
inline bool IsScopeMarkerNonHTML(HTMLStackItem* item) { … }
inline bool IsScopeMarker(HTMLStackItem* item) { … }
inline bool IsListItemScopeMarker(HTMLStackItem* item) { … }
inline bool IsTableScopeMarker(HTMLStackItem* item) { … }
inline bool IsTableBodyScopeMarker(HTMLStackItem* item) { … }
inline bool IsTableRowScopeMarker(HTMLStackItem* item) { … }
inline bool IsForeignContentScopeMarker(HTMLStackItem* item) { … }
inline bool IsButtonScopeMarker(HTMLStackItem* item) { … }
inline bool IsSelectScopeMarker(HTMLStackItem* item) { … }
}
HTMLElementStack::HTMLElementStack()
: … { … }
bool HTMLElementStack::HasOnlyOneElement() const { … }
bool HTMLElementStack::SecondElementIsHTMLBodyElement() const { … }
void HTMLElementStack::PopHTMLHeadElement() { … }
void HTMLElementStack::PopHTMLBodyElement() { … }
void HTMLElementStack::PopAll() { … }
void HTMLElementStack::Pop() { … }
void HTMLElementStack::PopUntil(html_names::HTMLTag tag) { … }
void HTMLElementStack::PopUntilPopped(html_names::HTMLTag tag) { … }
void HTMLElementStack::PopUntilNumberedHeaderElementPopped() { … }
void HTMLElementStack::PopUntil(Element* element) { … }
void HTMLElementStack::PopUntilPopped(Element* element) { … }
void HTMLElementStack::PopUntilTableScopeMarker() { … }
void HTMLElementStack::PopUntilTableBodyScopeMarker() { … }
void HTMLElementStack::PopUntilTableRowScopeMarker() { … }
bool HTMLElementStack::IsMathMLTextIntegrationPoint(HTMLStackItem* item) { … }
bool HTMLElementStack::IsHTMLIntegrationPoint(HTMLStackItem* item) { … }
void HTMLElementStack::PopUntilForeignContentScopeMarker() { … }
void HTMLElementStack::PushRootNode(HTMLStackItem* root_item) { … }
void HTMLElementStack::PushHTMLHtmlElement(HTMLStackItem* item) { … }
void HTMLElementStack::PushRootNodeCommon(HTMLStackItem* root_item) { … }
void HTMLElementStack::PushHTMLHeadElement(HTMLStackItem* item) { … }
void HTMLElementStack::PushHTMLBodyElement(HTMLStackItem* item) { … }
void HTMLElementStack::Push(HTMLStackItem* item) { … }
void HTMLElementStack::InsertAbove(HTMLStackItem* item,
HTMLStackItem* item_below) { … }
HTMLStackItem* HTMLElementStack::OneBelowTop() const { … }
void HTMLElementStack::RemoveHTMLHeadElement(Element* element) { … }
void HTMLElementStack::Remove(Element* element) { … }
HTMLStackItem* HTMLElementStack::Find(Element* element) const { … }
HTMLStackItem* HTMLElementStack::Topmost(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::Contains(Element* element) const { … }
template <bool isMarker(HTMLStackItem*)>
bool InScopeCommon(HTMLStackItem* top, html_names::HTMLTag tag) { … }
bool HTMLElementStack::HasNumberedHeaderElementInScope() const { … }
bool HTMLElementStack::InScope(Element* target_element) const { … }
bool HTMLElementStack::InScope(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::InListItemScope(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::InTableScope(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::InButtonScope(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::InSelectScope(html_names::HTMLTag tag) const { … }
bool HTMLElementStack::HasTemplateInHTMLScope() const { … }
Element* HTMLElementStack::HtmlElement() const { … }
Element* HTMLElementStack::HeadElement() const { … }
Element* HTMLElementStack::BodyElement() const { … }
ContainerNode* HTMLElementStack::RootNode() const { … }
void HTMLElementStack::PushCommon(HTMLStackItem* item) { … }
void HTMLElementStack::PopCommon() { … }
void HTMLElementStack::RemoveNonTopCommon(Element* element) { … }
HTMLStackItem* HTMLElementStack::FurthestBlockForFormattingElement(
Element* formatting_element) const { … }
void HTMLElementStack::Replace(HTMLStackItem* old_item,
HTMLStackItem* new_item) { … }
void HTMLElementStack::Trace(Visitor* visitor) const { … }
#ifndef NDEBUG
void HTMLElementStack::Show() { … }
#endif
}