Repository navigation
Null dereference in CSSParser::parsePageSelector() when inserting an @page rule into a detached CSSGroupingRule - #76295
Merged
Merged
Conversation
Collaborator
|
EWS run on current version of this PR (hash ad5f74c) Details |
Ahmad-S792
marked this pull request as ready for review
October 8, 2026 17:18
Ahmad-S792
requested review from
anttijk,
nt1m and
weinig
and removed request for
nt1m
October 8, 2026 17:18
nt1m
approved these changes
Oct 8, 2026
…page rule into a detached CSSGroupingRule https://bugs.webkit.org/show_bug.cgi?id=326788 rdar://189494639 Reviewed by Tim Nguyen. When a CSSGroupingRule has been removed from its style sheet, insertRule() passes a null StyleSheetContents to CSSParser::parseRule(). @page is allowed at that level, so parsePageSelector() runs, and for any @page prelude that has a type selector (e.g. "@page foo {}") it dereferences styleSheet->defaultNamespace(), crashing. Fall back to starAtom() when there is no style sheet, which is what CSSSelectorParser::defaultNamespace() does and the default namespace of a StyleSheetContents with no @namespace rule. Test: imported/w3c/web-platform-tests/css/cssom/insertRule-page-detached-grouping-rule-crash.html * LayoutTests/imported/w3c/web-platform-tests/css/cssom/insertRule-page-detached-grouping-rule-crash.html: Added. * Source/WebCore/css/parser/CSSParser.cpp: (WebCore::CSSParser::parsePageSelector): Canonical link: https://commits.webkit.org/323133@main
webkit-commit-queue
force-pushed
the
eng/Null-dereference-in-CSSParser-parsePageSelector-when-inserting-an-page-rule-into-a-detached-CSSGroupingRule
branch
from
October 8, 2026 17:37
ad5f74c to
cc88e18
Compare
Collaborator
|
Committed 323133@main (cc88e18): https://commits.webkit.org/323133@main Reviewed commits have been landed. Closing PR #76295 and removing active labels. |
Ahmad-S792
deleted the
eng/Null-dereference-in-CSSParser-parsePageSelector-when-inserting-an-page-rule-into-a-detached-CSSGroupingRule
branch
October 8, 2026 18:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc88e18
ad5f74c
🛠 win🧪 win-tests🧪 api-mac-debug🧪 api-ios🧪 mac-intel-wk2🛠 watch