Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ab18fe2424ddd91a744df289aee67cb936b60283
      
https://github.com/WebKit/WebKit/commit/ab18fe2424ddd91a744df289aee67cb936b60283
  Author: Antti Koivisto <[email protected]>
  Date:   2025-04-28 (Mon, 28 Apr 2025)

  Changed paths:
    M Source/WebCore/css/CSSSelector.h
    M Source/WebCore/css/CSSSelectorList.cpp
    M Source/WebCore/css/CSSSelectorList.h
    M Source/WebCore/style/AttributeChangeInvalidation.cpp
    M Source/WebCore/style/ChildChangeInvalidation.cpp
    M Source/WebCore/style/RuleFeature.cpp
    M Source/WebCore/style/RuleFeature.h
    M Source/WebCore/style/StyleScopeRuleSets.cpp
    M Source/WebCore/style/StyleScopeRuleSets.h

  Log Message:
  -----------
  Invalidation selectors should be copied
https://bugs.webkit.org/show_bug.cgi?id=292179
rdar://150184491

Reviewed by Alan Baradlay.

Instead of keeping a raw pointer to a component selector within a selector list
copy the relevant selector to a its own selector list.

* Source/WebCore/css/CSSSelector.h:
(WebCore::CSSSelector::setLastInSelectorList):
(WebCore::CSSSelector::setNotFirstInTagHistory): Deleted.
(WebCore::CSSSelector::setNotLastInTagHistory): Deleted.
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::CSSSelectorList):
(WebCore::CSSSelectorList::makeCopyingSimpleSelector):
(WebCore::CSSSelectorList::makeCopyingComplexSelector):
(WebCore::CSSSelectorList::makeJoining):

Add some helpers.

* Source/WebCore/css/CSSSelectorList.h:
* Source/WebCore/style/AttributeChangeInvalidation.cpp:
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::ChildChangeInvalidation::invalidateForChangedElement):
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureWithInvalidationSelector::RuleFeatureWithInvalidationSelector):
(WebCore::Style::RuleFeatureSet::collectFeatures):

Use CSSSelectorList instead of a raw pointer.

* Source/WebCore/style/RuleFeature.h:
* Source/WebCore/style/StyleScopeRuleSets.cpp:
(WebCore::Style::ensureInvalidationRuleSets):

Use CSSSelectorList instead of a raw pointer.

* Source/WebCore/style/StyleScopeRuleSets.h:

Canonical link: https://commits.webkit.org/294191@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to