|
@@ -44,7 +44,7 @@ void Selector::collect_ancestor_hashes()
|
|
auto last_combinator = m_compound_selectors.last().combinator;
|
|
auto last_combinator = m_compound_selectors.last().combinator;
|
|
for (ssize_t compound_selector_index = static_cast<ssize_t>(m_compound_selectors.size()) - 2; compound_selector_index >= 0; --compound_selector_index) {
|
|
for (ssize_t compound_selector_index = static_cast<ssize_t>(m_compound_selectors.size()) - 2; compound_selector_index >= 0; --compound_selector_index) {
|
|
auto const& compound_selector = m_compound_selectors[compound_selector_index];
|
|
auto const& compound_selector = m_compound_selectors[compound_selector_index];
|
|
- if (last_combinator == Combinator::Descendant) {
|
|
|
|
|
|
+ if (last_combinator == Combinator::Descendant || last_combinator == Combinator::ImmediateChild) {
|
|
for (auto const& simple_selector : compound_selector.simple_selectors) {
|
|
for (auto const& simple_selector : compound_selector.simple_selectors) {
|
|
switch (simple_selector.type) {
|
|
switch (simple_selector.type) {
|
|
case SimpleSelector::Type::Id:
|
|
case SimpleSelector::Type::Id:
|