mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2022, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
class ListOfActiveFormattingElements {
|
||||
public:
|
||||
ListOfActiveFormattingElements() = default;
|
||||
~ListOfActiveFormattingElements();
|
||||
|
||||
struct Entry {
|
||||
bool is_marker() const { return !element; }
|
||||
|
||||
JS::GCPtr<DOM::Element> element;
|
||||
};
|
||||
|
||||
bool is_empty() const { return m_entries.is_empty(); }
|
||||
bool contains(const DOM::Element&) const;
|
||||
|
||||
void add(DOM::Element& element);
|
||||
void add_marker();
|
||||
void insert_at(size_t index, DOM::Element& element);
|
||||
|
||||
void replace(DOM::Element& to_remove, DOM::Element& to_add);
|
||||
|
||||
void remove(DOM::Element&);
|
||||
|
||||
Vector<Entry> const& entries() const { return m_entries; }
|
||||
Vector<Entry>& entries() { return m_entries; }
|
||||
|
||||
DOM::Element* last_element_with_tag_name_before_marker(FlyString const& tag_name);
|
||||
|
||||
void clear_up_to_the_last_marker();
|
||||
|
||||
Optional<size_t> find_index(DOM::Element const&) const;
|
||||
|
||||
void visit_edges(JS::Cell::Visitor&);
|
||||
|
||||
private:
|
||||
Vector<Entry> m_entries;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue