Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 266815bc8b19a791ab0a70218af6eb680b9de4f5
      
https://github.com/WebKit/WebKit/commit/266815bc8b19a791ab0a70218af6eb680b9de4f5
  Author: Chris Dumez <[email protected]>
  Date:   2026-01-07 (Wed, 07 Jan 2026)

  Changed paths:
    M Source/WebCore/css/CSSPageRule.cpp
    M Source/WebCore/css/CSSSelectorList.cpp
    M Source/WebCore/css/CSSSelectorList.h
    M Source/WebCore/css/SelectorChecker.cpp
    M Source/WebCore/css/SelectorChecker.h
    M Source/WebCore/css/SelectorFilter.cpp
    M Source/WebCore/css/StyleRule.h
    M Source/WebCore/css/parser/CSSSelectorParser.cpp
    M Source/WebCore/style/PageRuleCollector.cpp
    M Source/WebCore/style/RuleSet.cpp
    M Source/WebCore/testing/Internals.cpp

  Log Message:
  -----------
  Update CSSSelectorList::first() to return a reference
https://bugs.webkit.org/show_bug.cgi?id=305029

Reviewed by Darin Adler and Sam Weinig.

Update CSSSelectorList::first() to return a reference instead of a raw
pointer and have it call FixedVector's `operator[]` for memory safety.

* Source/WebCore/css/CSSPageRule.cpp:
(WebCore::CSSPageRule::selectorText const):
* Source/WebCore/css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::hasOnlyNestingSelector const):
* Source/WebCore/css/CSSSelectorList.h:
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchHostPseudoClass const):
(WebCore::SelectorChecker::checkOne const):
(WebCore::SelectorChecker::determineLinkMatchType):
* Source/WebCore/css/SelectorChecker.h:
* Source/WebCore/css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectSimpleSelectorHash):
* Source/WebCore/css/StyleRule.h:
* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::resolveNestingParent):
* Source/WebCore/style/PageRuleCollector.cpp:
(WebCore::Style::comparePageRules):
(WebCore::Style::checkPageSelectorComponents):
* Source/WebCore/style/RuleSet.cpp:
(WebCore::Style::RuleSet::addRule):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::selectorFilterHashCounts):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to