mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
LibWeb/CSS: Parse the &
nesting selector
This commit is contained in:
parent
55f58eea99
commit
5b4d1b5b05
Notes:
github-actions[bot]
2024-10-17 18:57:46 +00:00
Author: https://github.com/AtkinsSJ
Commit: 5b4d1b5b05
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1842
Reviewed-by: https://github.com/awesomekling
5 changed files with 23 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
* Copyright (c) 2021-2024, Sam Atkins <sam@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -153,6 +153,9 @@ u32 Selector::specificity() const
|
|||
case SimpleSelector::Type::Universal:
|
||||
// ignore the universal selector
|
||||
break;
|
||||
case SimpleSelector::Type::Nesting:
|
||||
// We should have replaced this already
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +328,9 @@ String Selector::SimpleSelector::serialize() const
|
|||
case Selector::SimpleSelector::Type::PseudoElement:
|
||||
// Note: Pseudo-elements are dealt with in Selector::serialize()
|
||||
break;
|
||||
default:
|
||||
dbgln("FIXME: Unsupported simple selector serialization for type {}", to_underlying(type));
|
||||
case Type::Nesting:
|
||||
// AD-HOC: Not in spec yet.
|
||||
s.append('&');
|
||||
break;
|
||||
}
|
||||
return MUST(s.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue