[webkit-changes] [WebKit/WebKit] 36c735: CSS Nesting: handle invalid rules mixed with decla...
Matthieu Dubet
noreply at github.com
Mon Jan 9 17:20:48 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 36c735247d249cfb7a28aba3f21d3bbb8a96137b
https://github.com/WebKit/WebKit/commit/36c735247d249cfb7a28aba3f21d3bbb8a96137b
Author: Matthieu Dubet <m_dubet at apple.com>
Date: 2023-01-09 (Mon, 09 Jan 2023)
Changed paths:
A LayoutTests/fast/css/parsing-mixed-at-rules-and-declarations-expected.txt
A LayoutTests/fast/css/parsing-mixed-at-rules-and-declarations.html
M Source/WebCore/css/parser/CSSParserImpl.cpp
M Source/WebCore/css/parser/CSSParserImpl.h
Log Message:
-----------
CSS Nesting: handle invalid rules mixed with declarations
https://bugs.webkit.org/show_bug.cgi?id=250298
rdar://104004697
Reviewed by Antti Koivisto.
This patch isolates the parsing of declaration list from one another
(which otherwise could be wrongly mixed when overlapping because of nesting)
by using CSSParserImpl::consumeDeclarationListInNewNestingContext.
* LayoutTests/fast/css/parsing-mixed-at-rules-and-declarations-expected.txt: Added.
* LayoutTests/fast/css/parsing-mixed-at-rules-and-declarations.html: Added.
* Source/WebCore/css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeQualifiedRule):
(WebCore::CSSParserImpl::consumeFontFaceRule):
(WebCore::CSSParserImpl::consumeFontPaletteValuesRule):
(WebCore::CSSParserImpl::consumePageRule):
(WebCore::CSSParserImpl::consumeCounterStyleRule):
(WebCore::CSSParserImpl::consumePropertyRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
(WebCore::CSSParserImpl::consumeDeclarationListOrStyleBlockHelper):
(WebCore::CSSParserImpl::consumeDeclarationListInNewNestingContext):
(WebCore::CSSParserImpl::consumeDeclarationList):
(WebCore::CSSParserImpl::consumeStyleBlock):
* Source/WebCore/css/parser/CSSParserImpl.h:
Canonical link: https://commits.webkit.org/258692@main
More information about the webkit-changes
mailing list