[Webkit-unassigned] [Bug 233283] New: [CSS Cascade Layers] [Debug] ASSERTION FAILED: m_childRules.isEmpty() when using @import with layer name
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 17 14:17:00 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=233283
Bug ID: 233283
Summary: [CSS Cascade Layers] [Debug] ASSERTION FAILED:
m_childRules.isEmpty() when using @import with layer
name
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CSS
Assignee: webkit-unassigned at lists.webkit.org
Reporter: pangle at apple.com
CC: koivisto at iki.fi, webkit-bug-importer at group.apple.com
Blocks: 233208
Created attachment 444573
--> https://bugs.webkit.org/attachment.cgi?id=444573&action=review
Reproduction Test Case
In the process of writing tests for bug 233208, I've run into this assertion in debug builds when I `@import url("./external-layers.css") layer(imported);` in a style tag. I've attached a sample page and external stylesheet the reproduce the issue. The `@import` rule behaves as expected in release builds and imports the styles scoped within the named layer.
Full crash trace:
```
ASSERTION FAILED: m_childRules.isEmpty()
./css/StyleSheetContents.cpp(146) : void WebCore::StyleSheetContents::parserAppendRule(Ref<WebCore::StyleRuleBase> &&)
1 0x4f43daf39 WTFCrash
2 0x506f89dcb WTFCrashWithInfo(int, char const*, char const*, int)
3 0x509dcb63c WebCore::StyleSheetContents::parserAppendRule(WTF::Ref<WebCore::StyleRuleBase, WTF::RawPtrTraits<WebCore::StyleRuleBase> >&&)
4 0x509e1b0f7 WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&, WebCore::CSSParserContext const&, WebCore::StyleSheetContents&, WebCore::CSSParser::RuleParsing)::$_3::operator()(WTF::RefPtr<WebCore::StyleRuleBase, WTF::RawPtrTraits<WebCore::StyleRuleBase>, WTF::DefaultRefDerefTraits<WebCore::StyleRuleBase> >) const
5 0x509e0a011 bool WebCore::CSSParserImpl::consumeRuleList<WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&, WebCore::CSSParserContext const&, WebCore::StyleSheetContents&, WebCore::CSSParser::RuleParsing)::$_3>(WebCore::CSSParserTokenRange, WebCore::CSSParserImpl::RuleListType, WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&, WebCore::CSSParserContext const&, WebCore::StyleSheetContents&, WebCore::CSSParser::RuleParsing)::$_3)
6 0x509e004d1 WebCore::CSSParserImpl::parseStyleSheet(WTF::String const&, WebCore::CSSParserContext const&, WebCore::StyleSheetContents&, WebCore::CSSParser::RuleParsing)
7 0x509e0042b WebCore::CSSParser::parseSheet(WebCore::StyleSheetContents&, WTF::String const&, WebCore::CSSParser::RuleParsing)
8 0x509dcd72e WebCore::StyleSheetContents::parseString(WTF::String const&)
9 0x50a0d4cee WebCore::InlineStyleSheetOwner::createSheet(WebCore::Element&, WTF::String const&)
10 0x50a0d44fe WebCore::InlineStyleSheetOwner::createSheetFromTextContents(WebCore::Element&)
11 0x50a0d468b WebCore::InlineStyleSheetOwner::finishParsingChildren(WebCore::Element&)
12 0x50a4f4b13 WebCore::HTMLStyleElement::finishParsingChildren()
13 0x50a652a18 WebCore::HTMLElementStack::popCommon()
14 0x50a64de4a WebCore::HTMLElementStack::pop()
15 0x50a688f0d WebCore::HTMLTreeBuilder::processEndTag(WebCore::AtomHTMLToken&&)
16 0x50a6855f6 WebCore::HTMLTreeBuilder::processToken(WebCore::AtomHTMLToken&&)
17 0x50a684455 WebCore::HTMLTreeBuilder::constructTree(WebCore::AtomHTMLToken&&)
18 0x50a650d79 WebCore::HTMLDocumentParser::constructTreeFromHTMLToken(WebCore::HTMLTokenizer::TokenPtr&)
19 0x50a650b20 WebCore::HTMLDocumentParser::pumpTokenizerLoop(WebCore::HTMLDocumentParser::SynchronousMode, bool, WebCore::PumpSession&)
20 0x50a64fd38 WebCore::HTMLDocumentParser::pumpTokenizer(WebCore::HTMLDocumentParser::SynchronousMode)
21 0x50a64f540 WebCore::HTMLDocumentParser::pumpTokenizerIfPossible(WebCore::HTMLDocumentParser::SynchronousMode)
22 0x50a651b27 WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution()
23 0x50a651ebc WebCore::HTMLDocumentParser::notifyFinished(WebCore::PendingScript&)
24 0x50a14a8da WebCore::PendingScript::notifyClientFinished()
25 0x50a14a939 WebCore::PendingScript::notifyFinished(WebCore::LoadableScript&)
26 0x50a0f2673 WebCore::LoadableScript::notifyClientFinished()
27 0x50a0f2493 WebCore::LoadableClassicScript::notifyFinished(WebCore::CachedResource&, WebCore::NetworkLoadMetrics const&)
28 0x50ababa2f WebCore::CachedResource::checkNotify(WebCore::NetworkLoadMetrics const&)
29 0x50ab9f934 WebCore::CachedResource::finishLoading(WebCore::SharedBuffer*, WebCore::NetworkLoadMetrics const&)
30 0x50abda78c WebCore::CachedScript::finishLoading(WebCore::SharedBuffer*, WebCore::NetworkLoadMetrics const&)
31 0x50ab30112 WebCore::SubresourceLoader::didFinishLoading(WebCore::NetworkLoadMetrics const&)
```
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=233208
[Bug 233208] Web Inspector: Support Cascade Layers in the Styles sidebar
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211117/a60dac53/attachment-0001.htm>
More information about the webkit-unassigned
mailing list