mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 19:05:07 +00:00
LibHTML: Some initial works towards a simple CSS parser.
This commit is contained in:
parent
891e668e35
commit
ae8eff55a7
3 changed files with 100 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
#include <LibHTML/CSS/Selector.h>
|
||||
|
||||
Selector::Selector()
|
||||
Selector::Selector(Vector<Component>&& components)
|
||||
: m_components(move(components))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
class Selector {
|
||||
public:
|
||||
Selector();
|
||||
~Selector();
|
||||
|
||||
struct Component {
|
||||
enum class Type { Invalid, TagName, Id, Class };
|
||||
Type type { Type::Invalid };
|
||||
String value;
|
||||
};
|
||||
|
||||
explicit Selector(Vector<Component>&&);
|
||||
~Selector();
|
||||
|
||||
const Vector<Component>& components() const { return m_components; }
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue