|
Lines 426-431
void TreeResolver::popParent()
a/Source/WebCore/style/StyleTreeResolver.cpp_sec1
|
| 426 |
|
426 |
|
| 427 |
scope().selectorMatchingState.selectorFilter.popParent(); |
427 |
scope().selectorMatchingState.selectorFilter.popParent(); |
| 428 |
|
428 |
|
|
|
429 |
auto& queryContainers = scope().selectorMatchingState.queryContainers; |
| 430 |
if (!queryContainers.isEmpty() && queryContainers.last().ptr() == &parentElement) |
| 431 |
queryContainers.removeLast(); |
| 432 |
|
| 429 |
m_parentStack.removeLast(); |
433 |
m_parentStack.removeLast(); |
| 430 |
} |
434 |
} |
| 431 |
|
435 |
|
|
Lines 594-599
void TreeResolver::resolveComposedTree()
a/Source/WebCore/style/StyleTreeResolver.cpp_sec2
|
| 594 |
|
598 |
|
| 595 |
bool shouldIterateChildren = style && (element.childNeedsStyleRecalc() || descendantsToResolve != DescendantsToResolve::None); |
599 |
bool shouldIterateChildren = style && (element.childNeedsStyleRecalc() || descendantsToResolve != DescendantsToResolve::None); |
| 596 |
|
600 |
|
|
|
601 |
if (shouldIterateChildren) |
| 602 |
updateQueryContainer(element, *style); |
| 603 |
|
| 597 |
if (!m_didSeePendingStylesheet) |
604 |
if (!m_didSeePendingStylesheet) |
| 598 |
m_didSeePendingStylesheet = hasLoadingStylesheet(m_document.styleScope(), element, !shouldIterateChildren); |
605 |
m_didSeePendingStylesheet = hasLoadingStylesheet(m_document.styleScope(), element, !shouldIterateChildren); |
| 599 |
|
606 |
|
|
Lines 612-617
void TreeResolver::resolveComposedTree()
a/Source/WebCore/style/StyleTreeResolver.cpp_sec3
|
| 612 |
popParentsToDepth(1); |
619 |
popParentsToDepth(1); |
| 613 |
} |
620 |
} |
| 614 |
|
621 |
|
|
|
622 |
void TreeResolver::updateQueryContainer(const Element& element, const RenderStyle& style) |
| 623 |
{ |
| 624 |
if (style.containerType() == ContainerType::None) |
| 625 |
return; |
| 626 |
|
| 627 |
scope().selectorMatchingState.queryContainers.append(element); |
| 628 |
|
| 629 |
// FIXME: Skip the subtree and ensure the container is resolved by doing a layout if needed. |
| 630 |
} |
| 631 |
|
| 615 |
std::unique_ptr<Update> TreeResolver::resolve() |
632 |
std::unique_ptr<Update> TreeResolver::resolve() |
| 616 |
{ |
633 |
{ |
| 617 |
auto& renderView = *m_document.renderView(); |
634 |
auto& renderView = *m_document.renderView(); |