| Differences between
and this patch
- a/Source/WebCore/ChangeLog +34 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2022-01-31  Antti Koivisto  <antti@apple.com>
2
3
        [CSS Container Queries] Check for query containers when matching rules
4
        https://bugs.webkit.org/show_bug.cgi?id=235881
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Skip rules inside container queries when there are no container ancestors.
9
10
        * style/ElementRuleCollector.cpp:
11
        (WebCore::Style::ElementRuleCollector::collectMatchingRulesForList):
12
        (WebCore::Style::ElementRuleCollector::containerQueryMatches):
13
14
        Add the matching function.
15
        
16
        This patch doesn't yet do any actual container query matching, it just check
17
        if we are inside a query container.
18
19
        * style/ElementRuleCollector.h:
20
        * style/RuleSet.h:
21
        (WebCore::Style::RuleSet::containerQueryFor const):
22
        * style/SelectorMatchingState.h:
23
24
        Add container stack.
25
26
        * style/StyleTreeResolver.cpp:
27
        (WebCore::Style::TreeResolver::popParent):
28
        (WebCore::Style::TreeResolver::resolveComposedTree):
29
        (WebCore::Style::TreeResolver::updateQueryContainer):
30
31
        Maintain the container stack.
32
33
        * style/StyleTreeResolver.h:
34
1
2022-01-29  Tyler Wilcock  <tyler_w@apple.com>
35
2022-01-29  Tyler Wilcock  <tyler_w@apple.com>
2
36
3
        AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect in response to dynamic page changes
37
        AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect in response to dynamic page changes
- a/Source/WebCore/style/ElementRuleCollector.cpp -20 / +31 lines
Lines 73-84 static const StyleProperties& rightToLeftDeclaration() a/Source/WebCore/style/ElementRuleCollector.cpp_sec1
73
73
74
class MatchRequest {
74
class MatchRequest {
75
public:
75
public:
76
    MatchRequest(const RuleSet* ruleSet, ScopeOrdinal styleScopeOrdinal = ScopeOrdinal::Element)
76
    MatchRequest(const RuleSet& ruleSet, ScopeOrdinal styleScopeOrdinal = ScopeOrdinal::Element)
77
        : ruleSet(ruleSet)
77
        : ruleSet(ruleSet)
78
        , styleScopeOrdinal(styleScopeOrdinal)
78
        , styleScopeOrdinal(styleScopeOrdinal)
79
    {
79
    {
80
    }
80
    }
81
    const RuleSet* ruleSet;
81
    const RuleSet& ruleSet;
82
    ScopeOrdinal styleScopeOrdinal;
82
    ScopeOrdinal styleScopeOrdinal;
83
};
83
};
84
84
Lines 114-120 const Vector<RefPtr<const StyleRule>>& ElementRuleCollector::matchedRuleList() c a/Source/WebCore/style/ElementRuleCollector.cpp_sec2
114
114
115
inline void ElementRuleCollector::addMatchedRule(const RuleData& ruleData, unsigned specificity, const MatchRequest& matchRequest)
115
inline void ElementRuleCollector::addMatchedRule(const RuleData& ruleData, unsigned specificity, const MatchRequest& matchRequest)
116
{
116
{
117
    auto cascadeLayerPriority = matchRequest.ruleSet ? matchRequest.ruleSet->cascadeLayerPriorityFor(ruleData) : RuleSet::cascadeLayerPriorityForUnlayered;
117
    auto cascadeLayerPriority = matchRequest.ruleSet.cascadeLayerPriorityFor(ruleData);
118
    m_matchedRules.append({ &ruleData, specificity, matchRequest.styleScopeOrdinal, cascadeLayerPriority });
118
    m_matchedRules.append({ &ruleData, specificity, matchRequest.styleScopeOrdinal, cascadeLayerPriority });
119
}
119
}
120
120
Lines 139-145 inline void ElementRuleCollector::addElementStyleProperties(const StylePropertie a/Source/WebCore/style/ElementRuleCollector.cpp_sec3
139
139
140
void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest)
140
void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest)
141
{
141
{
142
    ASSERT(matchRequest.ruleSet);
143
    ASSERT_WITH_MESSAGE(!(m_mode == SelectorChecker::Mode::CollectingRulesIgnoringVirtualPseudoElements && m_pseudoElementRequest.pseudoId != PseudoId::None), "When in StyleInvalidation or SharingRules, SelectorChecker does not try to match the pseudo ID. While ElementRuleCollector supports matching a particular pseudoId in this case, this would indicate a error at the call site since matching a particular element should be unnecessary.");
142
    ASSERT_WITH_MESSAGE(!(m_mode == SelectorChecker::Mode::CollectingRulesIgnoringVirtualPseudoElements && m_pseudoElementRequest.pseudoId != PseudoId::None), "When in StyleInvalidation or SharingRules, SelectorChecker does not try to match the pseudo ID. While ElementRuleCollector supports matching a particular pseudoId in this case, this would indicate a error at the call site since matching a particular element should be unnecessary.");
144
143
145
    auto* shadowRoot = element().containingShadowRoot();
144
    auto* shadowRoot = element().containingShadowRoot();
Lines 150-167 void ElementRuleCollector::collectMatchingRules(const MatchRequest& matchRequest a/Source/WebCore/style/ElementRuleCollector.cpp_sec4
150
    // then sort the buffer.
149
    // then sort the buffer.
151
    auto& id = element().idForStyleResolution();
150
    auto& id = element().idForStyleResolution();
152
    if (!id.isNull())
151
    if (!id.isNull())
153
        collectMatchingRulesForList(matchRequest.ruleSet->idRules(id), matchRequest);
152
        collectMatchingRulesForList(matchRequest.ruleSet.idRules(id), matchRequest);
154
    if (element().hasClass()) {
153
    if (element().hasClass()) {
155
        for (size_t i = 0; i < element().classNames().size(); ++i)
154
        for (size_t i = 0; i < element().classNames().size(); ++i)
156
            collectMatchingRulesForList(matchRequest.ruleSet->classRules(element().classNames()[i]), matchRequest);
155
            collectMatchingRulesForList(matchRequest.ruleSet.classRules(element().classNames()[i]), matchRequest);
157
    }
156
    }
158
157
159
    if (element().isLink())
158
    if (element().isLink())
160
        collectMatchingRulesForList(matchRequest.ruleSet->linkPseudoClassRules(), matchRequest);
159
        collectMatchingRulesForList(matchRequest.ruleSet.linkPseudoClassRules(), matchRequest);
161
    if (matchesFocusPseudoClass(element()))
160
    if (matchesFocusPseudoClass(element()))
162
        collectMatchingRulesForList(matchRequest.ruleSet->focusPseudoClassRules(), matchRequest);
161
        collectMatchingRulesForList(matchRequest.ruleSet.focusPseudoClassRules(), matchRequest);
163
    collectMatchingRulesForList(matchRequest.ruleSet->tagRules(element().localName(), element().isHTMLElement() && element().document().isHTMLDocument()), matchRequest);
162
    collectMatchingRulesForList(matchRequest.ruleSet.tagRules(element().localName(), element().isHTMLElement() && element().document().isHTMLDocument()), matchRequest);
164
    collectMatchingRulesForList(matchRequest.ruleSet->universalRules(), matchRequest);
163
    collectMatchingRulesForList(matchRequest.ruleSet.universalRules(), matchRequest);
165
}
164
}
166
165
167
166
Lines 234-240 bool ElementRuleCollector::matchesAnyAuthorRules() a/Source/WebCore/style/ElementRuleCollector.cpp_sec5
234
void ElementRuleCollector::collectMatchingAuthorRules()
233
void ElementRuleCollector::collectMatchingAuthorRules()
235
{
234
{
236
    {
235
    {
237
        MatchRequest matchRequest(m_authorStyle.ptr());
236
        MatchRequest matchRequest(m_authorStyle);
238
        collectMatchingRules(matchRequest);
237
        collectMatchingRules(matchRequest);
239
    }
238
    }
240
239
Lines 259-265 void ElementRuleCollector::matchAuthorShadowPseudoElementRules() a/Source/WebCore/style/ElementRuleCollector.cpp_sec6
259
        return;
258
        return;
260
    // Look up shadow pseudo elements also from the host scope author style as they are web-exposed.
259
    // Look up shadow pseudo elements also from the host scope author style as they are web-exposed.
261
    auto& hostAuthorRules = Scope::forNode(*shadowRoot.host()).resolver().ruleSets().authorStyle();
260
    auto& hostAuthorRules = Scope::forNode(*shadowRoot.host()).resolver().ruleSets().authorStyle();
262
    MatchRequest hostAuthorRequest { &hostAuthorRules, ScopeOrdinal::ContainingHost };
261
    MatchRequest hostAuthorRequest { hostAuthorRules, ScopeOrdinal::ContainingHost };
263
    collectMatchingShadowPseudoElementRules(hostAuthorRequest);
262
    collectMatchingShadowPseudoElementRules(hostAuthorRequest);
264
}
263
}
265
264
Lines 272-278 void ElementRuleCollector::matchHostPseudoClassRules() a/Source/WebCore/style/ElementRuleCollector.cpp_sec7
272
    if (shadowHostRules.isEmpty())
271
    if (shadowHostRules.isEmpty())
273
        return;
272
        return;
274
273
275
    MatchRequest hostMatchRequest { nullptr, ScopeOrdinal::Shadow };
274
    MatchRequest hostMatchRequest { shadowAuthorStyle, ScopeOrdinal::Shadow };
276
    collectMatchingRulesForList(&shadowHostRules, hostMatchRequest);
275
    collectMatchingRulesForList(&shadowHostRules, hostMatchRequest);
277
}
276
}
278
277
Lines 288-294 void ElementRuleCollector::matchSlottedPseudoElementRules() a/Source/WebCore/style/ElementRuleCollector.cpp_sec8
288
287
289
        auto& scopeAuthorRules = styleScope.resolver().ruleSets().authorStyle();
288
        auto& scopeAuthorRules = styleScope.resolver().ruleSets().authorStyle();
290
289
291
        MatchRequest scopeMatchRequest(&scopeAuthorRules, styleScopeOrdinal);
290
        MatchRequest scopeMatchRequest(scopeAuthorRules, styleScopeOrdinal);
292
        collectMatchingRulesForList(&scopeAuthorRules.slottedPseudoElementRules(), scopeMatchRequest);
291
        collectMatchingRulesForList(&scopeAuthorRules.slottedPseudoElementRules(), scopeMatchRequest);
293
292
294
        if (styleScopeOrdinal == ScopeOrdinal::SlotLimit)
293
        if (styleScopeOrdinal == ScopeOrdinal::SlotLimit)
Lines 321-327 void ElementRuleCollector::matchPartPseudoElementRulesForScope(const Element& pa a/Source/WebCore/style/ElementRuleCollector.cpp_sec9
321
320
322
        auto& hostAuthorRules = styleScope.resolver().ruleSets().authorStyle();
321
        auto& hostAuthorRules = styleScope.resolver().ruleSets().authorStyle();
323
322
324
        MatchRequest scopeMatchRequest(&hostAuthorRules, styleScopeOrdinal);
323
        MatchRequest scopeMatchRequest(hostAuthorRules, styleScopeOrdinal);
325
        collectMatchingRulesForList(&hostAuthorRules.partPseudoElementRules(), scopeMatchRequest);
324
        collectMatchingRulesForList(&hostAuthorRules.partPseudoElementRules(), scopeMatchRequest);
326
325
327
        // Element may only be exposed to styling from enclosing scopes via exportparts attributes.
326
        // Element may only be exposed to styling from enclosing scopes via exportparts attributes.
Lines 335-344 void ElementRuleCollector::matchPartPseudoElementRulesForScope(const Element& pa a/Source/WebCore/style/ElementRuleCollector.cpp_sec10
335
334
336
void ElementRuleCollector::collectMatchingShadowPseudoElementRules(const MatchRequest& matchRequest)
335
void ElementRuleCollector::collectMatchingShadowPseudoElementRules(const MatchRequest& matchRequest)
337
{
336
{
338
    ASSERT(matchRequest.ruleSet);
339
    ASSERT(element().containingShadowRoot()->mode() == ShadowRootMode::UserAgent);
337
    ASSERT(element().containingShadowRoot()->mode() == ShadowRootMode::UserAgent);
340
338
341
    auto& rules = *matchRequest.ruleSet;
339
    auto& rules = matchRequest.ruleSet;
342
#if ENABLE(VIDEO)
340
#if ENABLE(VIDEO)
343
    // FXIME: WebVTT should not be done by styling UA shadow trees like this.
341
    // FXIME: WebVTT should not be done by styling UA shadow trees like this.
344
    if (element().isWebVTTElement())
342
    if (element().isWebVTTElement())
Lines 356-362 void ElementRuleCollector::matchUserRules() a/Source/WebCore/style/ElementRuleCollector.cpp_sec11
356
    
354
    
357
    clearMatchedRules();
355
    clearMatchedRules();
358
356
359
    MatchRequest matchRequest(m_userStyle.get());
357
    MatchRequest matchRequest(*m_userStyle);
360
    collectMatchingRules(matchRequest);
358
    collectMatchingRules(matchRequest);
361
359
362
    sortAndTransferMatchedRules(DeclarationOrigin::User);
360
    sortAndTransferMatchedRules(DeclarationOrigin::User);
Lines 381-387 void ElementRuleCollector::matchUARules(const RuleSet& rules) a/Source/WebCore/style/ElementRuleCollector.cpp_sec12
381
{
379
{
382
    clearMatchedRules();
380
    clearMatchedRules();
383
    
381
    
384
    collectMatchingRules(MatchRequest(&rules));
382
    collectMatchingRules(MatchRequest(rules));
385
383
386
    sortAndTransferMatchedRules(DeclarationOrigin::UserAgent);
384
    sortAndTransferMatchedRules(DeclarationOrigin::UserAgent);
387
}
385
}
Lines 486-491 void ElementRuleCollector::collectMatchingRulesForList(const RuleSet::RuleDataVe a/Source/WebCore/style/ElementRuleCollector.cpp_sec13
486
        if (m_selectorMatchingState && m_selectorMatchingState->selectorFilter.fastRejectSelector(ruleData.descendantSelectorIdentifierHashes()))
484
        if (m_selectorMatchingState && m_selectorMatchingState->selectorFilter.fastRejectSelector(ruleData.descendantSelectorIdentifierHashes()))
487
            continue;
485
            continue;
488
486
487
        if (auto* containerQuery = matchRequest.ruleSet.containerQueryFor(ruleData)) {
488
            if (!containerQueryMatches(*containerQuery))
489
                continue;
490
        }
491
489
        auto& rule = ruleData.styleRule();
492
        auto& rule = ruleData.styleRule();
490
493
491
        // If the rule has no properties to apply, then ignore it in the non-debug mode.
494
        // If the rule has no properties to apply, then ignore it in the non-debug mode.
Lines 501-506 void ElementRuleCollector::collectMatchingRulesForList(const RuleSet::RuleDataVe a/Source/WebCore/style/ElementRuleCollector.cpp_sec14
501
    }
504
    }
502
}
505
}
503
506
507
bool ElementRuleCollector::containerQueryMatches(const ContainerQuery&)
508
{
509
    if (!m_selectorMatchingState)
510
        return true;
511
    // FIXME: The actual matching.
512
    return !m_selectorMatchingState->queryContainers.isEmpty();
513
}
514
504
static inline bool compareRules(MatchedRule r1, MatchedRule r2)
515
static inline bool compareRules(MatchedRule r1, MatchedRule r2)
505
{
516
{
506
    // For normal properties the earlier scope wins. This may be reversed by !important which is handled when resolving cascade.
517
    // For normal properties the earlier scope wins. This may be reversed by !important which is handled when resolving cascade.
Lines 578-584 void ElementRuleCollector::addElementInlineStyleProperties(bool includeSMILPrope a/Source/WebCore/style/ElementRuleCollector.cpp_sec15
578
        addElementStyleProperties(downcast<SVGElement>(element()).animatedSMILStyleProperties(), false /* isCacheable */);
589
        addElementStyleProperties(downcast<SVGElement>(element()).animatedSMILStyleProperties(), false /* isCacheable */);
579
}
590
}
580
591
581
bool ElementRuleCollector::hasAnyMatchingRules(const RuleSet* ruleSet)
592
bool ElementRuleCollector::hasAnyMatchingRules(const RuleSet& ruleSet)
582
{
593
{
583
    clearMatchedRules();
594
    clearMatchedRules();
584
595
- a/Source/WebCore/style/ElementRuleCollector.h -1 / +2 lines
Lines 82-88 public: a/Source/WebCore/style/ElementRuleCollector.h_sec1
82
    void setPseudoElementRequest(const PseudoElementRequest& request) { m_pseudoElementRequest = request; }
82
    void setPseudoElementRequest(const PseudoElementRequest& request) { m_pseudoElementRequest = request; }
83
    void setMedium(const MediaQueryEvaluator* medium) { m_isPrintStyle = medium->mediaTypeMatchSpecific("print"); }
83
    void setMedium(const MediaQueryEvaluator* medium) { m_isPrintStyle = medium->mediaTypeMatchSpecific("print"); }
84
84
85
    bool hasAnyMatchingRules(const RuleSet*);
85
    bool hasAnyMatchingRules(const RuleSet&);
86
86
87
    const MatchResult& matchResult() const;
87
    const MatchResult& matchResult() const;
88
    const Vector<RefPtr<const StyleRule>>& matchedRuleList() const;
88
    const Vector<RefPtr<const StyleRule>>& matchedRuleList() const;
Lines 112-117 private: a/Source/WebCore/style/ElementRuleCollector.h_sec2
112
    void collectMatchingRules(const MatchRequest&);
112
    void collectMatchingRules(const MatchRequest&);
113
    void collectMatchingRulesForList(const RuleSet::RuleDataVector*, const MatchRequest&);
113
    void collectMatchingRulesForList(const RuleSet::RuleDataVector*, const MatchRequest&);
114
    bool ruleMatches(const RuleData&, unsigned& specificity, ScopeOrdinal);
114
    bool ruleMatches(const RuleData&, unsigned& specificity, ScopeOrdinal);
115
    bool containerQueryMatches(const ContainerQuery&);
115
116
116
    void sortMatchedRules();
117
    void sortMatchedRules();
117
118
- a/Source/WebCore/style/RuleSet.h +14 lines
Lines 108-113 public: a/Source/WebCore/style/RuleSet.h_sec1
108
    static constexpr auto cascadeLayerPriorityForUnlayered = std::numeric_limits<CascadeLayerPriority>::max();
108
    static constexpr auto cascadeLayerPriorityForUnlayered = std::numeric_limits<CascadeLayerPriority>::max();
109
109
110
    CascadeLayerPriority cascadeLayerPriorityFor(const RuleData&) const;
110
    CascadeLayerPriority cascadeLayerPriorityFor(const RuleData&) const;
111
    const ContainerQuery* containerQueryFor(const RuleData&) const;
111
112
112
private:
113
private:
113
    friend class RuleSetBuilder;
114
    friend class RuleSetBuilder;
Lines 220-224 inline CascadeLayerPriority RuleSet::cascadeLayerPriorityFor(const RuleData& rul a/Source/WebCore/style/RuleSet.h_sec2
220
    return cascadeLayerPriorityForIdentifier(identifier);
221
    return cascadeLayerPriorityForIdentifier(identifier);
221
}
222
}
222
223
224
inline const ContainerQuery* RuleSet::containerQueryFor(const RuleData& ruleData) const
225
{
226
    if (m_containerQueryIdentifierForRulePosition.size() <= ruleData.position())
227
        return nullptr;
228
229
    auto identifier = m_containerQueryIdentifierForRulePosition[ruleData.position()];
230
    if (!identifier)
231
        return nullptr;
232
233
    return &m_containerQueries[identifier - 1].query;
234
}
235
236
223
} // namespace Style
237
} // namespace Style
224
} // namespace WebCore
238
} // namespace WebCore
- a/Source/WebCore/style/SelectorMatchingState.h +2 lines
Lines 38-43 enum class HasPseudoClassMatch : uint8_t { None, Matches, Fails, FailsSubtree }; a/Source/WebCore/style/SelectorMatchingState.h_sec1
38
struct SelectorMatchingState {
38
struct SelectorMatchingState {
39
    SelectorFilter selectorFilter;
39
    SelectorFilter selectorFilter;
40
40
41
    Vector<Ref<const Element>> queryContainers;
42
41
    HashMap<HasPseudoClassCacheKey, HasPseudoClassMatch> hasPseudoClassMatchCache;
43
    HashMap<HasPseudoClassCacheKey, HasPseudoClassMatch> hasPseudoClassMatchCache;
42
    HashMap<HasPseudoClassFilterKey, std::unique_ptr<HasSelectorFilter>> hasPseudoClassSelectorFilters;
44
    HashMap<HasPseudoClassFilterKey, std::unique_ptr<HasSelectorFilter>> hasPseudoClassSelectorFilters;
43
};
45
};
- a/Source/WebCore/style/StyleSharingResolver.cpp -1 / +1 lines
Lines 330-336 bool SharingResolver::styleSharingCandidateMatchesRuleSet(const StyledElement& e a/Source/WebCore/style/StyleSharingResolver.cpp_sec1
330
        return false;
330
        return false;
331
331
332
    ElementRuleCollector collector(element, m_ruleSets, &m_selectorMatchingState);
332
    ElementRuleCollector collector(element, m_ruleSets, &m_selectorMatchingState);
333
    return collector.hasAnyMatchingRules(ruleSet);
333
    return collector.hasAnyMatchingRules(*ruleSet);
334
}
334
}
335
335
336
bool SharingResolver::sharingCandidateHasIdenticalStyleAffectingAttributes(const Context& context, const StyledElement& sharingCandidate) const
336
bool SharingResolver::sharingCandidateHasIdenticalStyleAffectingAttributes(const Context& context, const StyledElement& sharingCandidate) const
- a/Source/WebCore/style/StyleTreeResolver.cpp +17 lines
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();
- a/Source/WebCore/style/StyleTreeResolver.h +1 lines
Lines 59-64 private: a/Source/WebCore/style/StyleTreeResolver.h_sec1
59
    std::unique_ptr<RenderStyle> styleForStyleable(const Styleable&, const ResolutionContext&);
59
    std::unique_ptr<RenderStyle> styleForStyleable(const Styleable&, const ResolutionContext&);
60
60
61
    void resolveComposedTree();
61
    void resolveComposedTree();
62
    void updateQueryContainer(const Element&, const RenderStyle&);
62
63
63
    ElementUpdates resolveElement(Element&);
64
    ElementUpdates resolveElement(Element&);
64
65
- a/LayoutTests/ChangeLog +9 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2022-01-31  Antti Koivisto  <antti@apple.com>
2
3
        [CSS Container Queries] Check for query containers when matching rules
4
        https://bugs.webkit.org/show_bug.cgi?id=235881
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * TestExpectations:
9
1
2022-01-29  Tyler Wilcock  <tyler_w@apple.com>
10
2022-01-29  Tyler Wilcock  <tyler_w@apple.com>
2
11
3
        AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect in response to dynamic page changes
12
        AX: Isolated tree objects don't update their AXPropertyName::ElementRect or AXPropertyName::BoundingBoxRect in response to dynamic page changes
- a/LayoutTests/imported/w3c/ChangeLog +9 lines
Lines 1-3 a/LayoutTests/imported/w3c/ChangeLog_sec1
1
2022-01-31  Antti Koivisto  <antti@apple.com>
2
3
        [CSS Container Queries] Check for query containers when matching rules
4
        https://bugs.webkit.org/show_bug.cgi?id=235881
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:
9
1
2022-01-28  Antoine Quint  <graouts@webkit.org>
10
2022-01-28  Antoine Quint  <graouts@webkit.org>
2
11
3
        css/css-backgrounds/animations/box-shadow-composition.html has failures
12
        css/css-backgrounds/animations/box-shadow-composition.html has failures
- a/LayoutTests/TestExpectations -7 lines
Lines 4747-4761 imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-003.html [ a/LayoutTests/TestExpectations_sec1
4747
imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-004.html [ ImageOnlyFailure ]
4747
imported/w3c/web-platform-tests/css/css-contain/contain-html-overflow-004.html [ ImageOnlyFailure ]
4748
4748
4749
# Container queries
4749
# Container queries
4750
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/change-display-in-container.html [ ImageOnlyFailure ]
4751
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/counters-in-container-dynamic.html [ ImageOnlyFailure ]
4752
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/counters-in-container.html [ ImageOnlyFailure ]
4753
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/display-in-container.html [ ImageOnlyFailure ]
4750
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/display-in-container.html [ ImageOnlyFailure ]
4754
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/fieldset-legend-change.html [ ImageOnlyFailure ]
4755
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/multicol-inside-container.html [ ImageOnlyFailure ]
4756
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.tentative.html [ ImageOnlyFailure ]
4751
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-002.tentative.html [ ImageOnlyFailure ]
4757
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/resize-while-content-visibility-hidden.html [ ImageOnlyFailure ]
4758
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/top-layer-dialog-backdrop.html [ ImageOnlyFailure ]
4759
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-bfc-floats.html [ ImageOnlyFailure ]
4752
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/inline-size-bfc-floats.html [ ImageOnlyFailure ]
4760
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/whitespace-update-after-removal.html [ ImageOnlyFailure ]
4753
webkit.org/b/229659 imported/w3c/web-platform-tests/css/css-contain/container-queries/whitespace-update-after-removal.html [ ImageOnlyFailure ]
4761
4754
- a/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt -1 / +1 lines
Lines 1-4 a/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt_sec1
1
Test
1
Test
2
2
3
FAIL Changing the container type invalidates relevant descendants assert_equals: expected "rgb(0, 0, 0)" but got "rgb(0, 128, 0)"
3
FAIL Changing the container type invalidates relevant descendants assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)"
4
4

Return to Bug 235881