1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:17:35 +00:00

LibWeb: Move PseudoElement enum up a level

This in preparation for changing how we store these, plus it's unwieldy
having to type CSS::Selector::SimpleSelector::PseudoElement.
This commit is contained in:
Sam Atkins 2022-02-24 15:13:20 +00:00 committed by Andreas Kling
parent 5390e05851
commit caef4ec157
4 changed files with 28 additions and 28 deletions

View file

@ -20,6 +20,14 @@ using SelectorList = NonnullRefPtrVector<class Selector>;
// This is a <complex-selector> in the spec. https://www.w3.org/TR/selectors-4/#complex
class Selector : public RefCounted<Selector> {
public:
enum class PseudoElement {
None,
Before,
After,
FirstLine,
FirstLetter,
};
struct SimpleSelector {
enum class Type {
Invalid,
@ -75,14 +83,6 @@ public:
SelectorList not_selector {};
};
PseudoClass pseudo_class {};
enum class PseudoElement {
None,
Before,
After,
FirstLine,
FirstLetter,
};
PseudoElement pseudo_element { PseudoElement::None };
FlyString value {};
@ -142,7 +142,7 @@ private:
mutable Optional<u32> m_specificity;
};
constexpr StringView pseudo_element_name(Selector::SimpleSelector::PseudoElement);
constexpr StringView pseudo_element_name(Selector::PseudoElement);
constexpr StringView pseudo_class_name(Selector::SimpleSelector::PseudoClass::Type);
String serialize_a_group_of_selectors(NonnullRefPtrVector<Selector> const& selectors);