Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ca6229de87ba8d87aff701886136867cc6950e64
      
https://github.com/WebKit/WebKit/commit/ca6229de87ba8d87aff701886136867cc6950e64
  Author: Chris Dumez <[email protected]>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M Source/WebCore/css/CSSSelector.cpp
    M Source/WebCore/css/CSSSelectorList.h
    M Source/WebCore/css/SelectorChecker.cpp
    M Source/WebCore/css/StyleRule.cpp
    M Source/WebCore/css/parser/CSSSelectorParser.cpp
    M Source/WebCore/css/parser/MutableCSSSelector.cpp
    M Source/WebCore/dom/SelectorQuery.cpp
    M Source/WebCore/inspector/InspectorStyleSheet.cpp
    M Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
    M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
    M Source/WebCore/style/ElementRuleCollector.cpp
    M Source/WebCore/style/RuleData.cpp
    M Source/WebCore/style/RuleFeature.cpp

  Log Message:
  -----------
  Drop CSSSelectorList::next() and port call sites to using modern range loops 
instead
https://bugs.webkit.org/show_bug.cgi?id=294925

Reviewed by Darin Adler.

Drop CSSSelectorList::next() and port call sites to using modern range loops 
instead,
to avoid dealing with raw pointers. This also restricts the 
WTF_ALLOW_UNSAFE_BUFFER_USAGE
to `CSSSelectorList::const_iterator::operator++()`.

* Source/WebCore/css/CSSSelector.cpp:
(WebCore::CSSSelector::visitAllSimpleSelectors const):
* Source/WebCore/css/CSSSelectorList.h:
(WebCore::CSSSelectorList::first const):
(WebCore::CSSSelectorList::indexOfNextSelectorAfter const):
(WebCore::CSSSelectorList::const_iterator::const_iterator):
(WebCore::CSSSelectorList::const_iterator::operator++):
(WebCore::CSSSelectorList::next): Deleted.
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne const):
(WebCore::SelectorChecker::matchSelectorList const):
* Source/WebCore/css/StyleRule.cpp:
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount 
const):
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::resolveNestingParent):
* Source/WebCore/css/parser/MutableCSSSelector.cpp:
(WebCore::selectorListMatchesPseudoElement):
* Source/WebCore/dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::SelectorDataList):
* Source/WebCore/inspector/InspectorStyleSheet.cpp:
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::highlightSelector):
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::scopeRulesMatch):
* Source/WebCore/style/RuleData.cpp:
(WebCore::Style::selectorCanMatchPseudoElement):
(WebCore::Style::determinePropertyAllowlist):
* Source/WebCore/style/RuleFeature.cpp:
(WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::Style::RuleFeatureSet::collectFeatures):

Canonical link: https://commits.webkit.org/296627@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