mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibWeb: Apply style rules in order of specificity (kinda)
We now sort the matched rules by the specificity of the first selector in them. This is not perfect, since a rule can have multiple selectors, but it is a nice chin-related progression on ACID2. :^)
This commit is contained in:
parent
4e1939c635
commit
7fe2f5f170
2 changed files with 11 additions and 0 deletions
|
@ -33,6 +33,9 @@
|
|||
namespace Web {
|
||||
|
||||
class StyleRule : public RefCounted<StyleRule> {
|
||||
AK_MAKE_NONCOPYABLE(StyleRule);
|
||||
AK_MAKE_NONMOVABLE(StyleRule);
|
||||
|
||||
public:
|
||||
static NonnullRefPtr<StyleRule> create(Vector<Selector>&& selectors, NonnullRefPtr<StyleDeclaration>&& declaration)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue