Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b879a659b19009b9ac69db1d29479ba1d263d24d
https://github.com/WebKit/WebKit/commit/b879a659b19009b9ac69db1d29479ba1d263d24d
Author: Antti Koivisto <[email protected]>
Date: 2025-04-10 (Thu, 10 Apr 2025)
Changed paths:
A LayoutTests/fast/selectors/has-nesting-crash-expected.txt
A LayoutTests/fast/selectors/has-nesting-crash.html
M Source/WebCore/css/CSSSelector.h
M Source/WebCore/css/CSSStyleSheet.cpp
M Source/WebCore/css/SelectorChecker.cpp
M Source/WebCore/css/StyleSheetContents.h
M Source/WebCore/style/RuleSetBuilder.cpp
M Source/WebCore/style/RuleSetBuilder.h
Log Message:
-----------
REGRESSION: Crashes in SelectorChecker::checkOne
https://bugs.webkit.org/show_bug.cgi?id=284055
rdar://140936598
Reviewed by Ryosuke Niwa.
Track whether we have resolved nested selectors and avoid doing it again if we
have.
Reset the bit if the stylesheet is mutated.
This avoids a situtation where selectors in shared adopted stylesheets get
mutated multiple times via nesting
resolution leading to use of a deleted selector (such stylesheets are otherwise
immutable).
* LayoutTests/fast/selectors/has-nesting-crash-expected.txt: Added.
* LayoutTests/fast/selectors/has-nesting-crash.html: Added.
* Source/WebCore/css/CSSSelector.h:
(WebCore::CSSSelector::destructorHasBeenCalled const):
* Source/WebCore/css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
* Source/WebCore/css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match const):
* Source/WebCore/css/StyleSheetContents.h:
* Source/WebCore/style/RuleSetBuilder.cpp:
(WebCore::Style::m_builderShouldResolveNesting):
(WebCore::Style::RuleSetBuilder::addChildRule):
(WebCore::Style::RuleSetBuilder::addRulesFromSheetContents):
(WebCore::Style::RuleSetBuilder::addStyleRule):
(WebCore::Style::m_shouldResolveNesting): Deleted.
* Source/WebCore/style/RuleSetBuilder.h:
Originally-landed-as: 283286.628@safari-7620-branch (0cd63a733258).
rdar://148114108
Canonical link: https://commits.webkit.org/293526@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