mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWeb/CSS: Move and rename PseudoElement types to prep for code gen
The upcoming generated types will match those for pseudo-classes: A PseudoElementSelector type, that then holds a PseudoElement enum defining what it is. That enum will be at the top level in the Web::CSS namespace. In order to keep the diffs clearer, this commit renames and moves the types, and then a following one will replace the handwritten enum with a generated one.
This commit is contained in:
parent
b11064c0ae
commit
0ed2e71801
Notes:
github-actions[bot]
2025-03-24 09:51:36 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0ed2e71801
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4021
42 changed files with 270 additions and 271 deletions
|
@ -14,7 +14,7 @@ namespace Web::DOM {
|
|||
|
||||
class ElementReference {
|
||||
public:
|
||||
ElementReference(GC::Ref<Element> element, Optional<CSS::Selector::PseudoElement::Type> pseudo_element = {})
|
||||
ElementReference(GC::Ref<Element> element, Optional<CSS::PseudoElement> pseudo_element = {})
|
||||
: m_element(element)
|
||||
, m_pseudo_element(move(pseudo_element))
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
Element& element() { return m_element; }
|
||||
Element const& element() const { return m_element; }
|
||||
Optional<CSS::Selector::PseudoElement::Type> pseudo_element() const { return m_pseudo_element; }
|
||||
Optional<CSS::PseudoElement> pseudo_element() const { return m_pseudo_element; }
|
||||
|
||||
void visit(GC::Cell::Visitor& visitor) const
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
|
||||
private:
|
||||
GC::Ref<Element> m_element;
|
||||
Optional<CSS::Selector::PseudoElement::Type> m_pseudo_element;
|
||||
Optional<CSS::PseudoElement> m_pseudo_element;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue