Bug 247212
Summary: | [@property] Handle unit cycles correctly | ||
---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
Component: | CSS | Assignee: | Antti Koivisto <koivisto> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | justin_michaud, koivisto, mmaxfield, webkit-bug-importer |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=247199 | ||
Bug Depends on: | |||
Bug Blocks: | 189692 |
Chris Dumez
imported/w3c/web-platform-tests/css/css-properties-values-api/unit-cycles.html hits an assertion in debug since StylePropertyMap::set() was implemented in Bug 247199 and the test actually started running:
ASSERT(!m_state.fontDirty());
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 JavaScriptCore 0x1356eca08 WTFCrash + 24
1 WebCore 0x2805c68c4 WTFCrashWithInfo(int, char const*, char const*, int) + 36 (Assertions.h:754)
2 WebCore 0x2854d88e8 WebCore::Style::Builder::applyNonHighPriorityProperties() + 264 (StyleBuilder.cpp:115)
3 WebCore 0x28551befc WebCore::Style::Resolver::applyMatchedProperties(WebCore::Style::Resolver::State&, WebCore::Style::MatchResult const&) + 864 (StyleResolver.cpp:638)
4 WebCore 0x28551add4 WebCore::Style::Resolver::styleForElement(WebCore::Element const&, WebCore::Style::ResolutionContext const&, WebCore::RuleMatchingBehavior) + 716 (StyleResolver.cpp:266)
5 WebCore 0x285553c30 WebCore::Style::TreeResolver::styleForStyleable(WebCore::Styleable const&, WebCore::Style::TreeResolver::ResolutionType, WebCore::Style::ResolutionContext const&) + 812 (StyleTreeResolver.cpp:153)
6 WebCore 0x285554044 WebCore::Style::TreeResolver::resolveElement(WebCore::Element&, WebCore::Style::TreeResolver::ResolutionType) + 276 (StyleTreeResolver.cpp:226)
7 WebCore 0x285557df0 WebCore::Style::TreeResolver::resolveComposedTree() + 1452 (StyleTreeResolver.cpp:832)
8 WebCore 0x2855590e0 WebCore::Style::TreeResolver::resolve() + 372 (StyleTreeResolver.cpp:932)
9 WebCore 0x2836f0bb0 WebCore::Document::resolveStyle(WebCore::Document::ResolveStyleType) + 988 (Document.cpp:2114)
10 WebCore 0x2836f1aa4 WebCore::Document::updateStyleIfNeeded() + 520 (Document.cpp:2250)
11 WebCore 0x283326a54 WebCore::ComputedStyleExtractor::updateStyleIfNeededForProperty(WebCore::Element&, WebCore::CSSPropertyID) + 136 (ComputedStyleExtractor.cpp:2553)
12 WebCore 0x28332666c WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::ComputedStyleExtractor::UpdateLayout, WebCore::ComputedStyleExtractor::PropertyValueType) + 216 (ComputedStyleExtractor.cpp:2803)
13 WebCore 0x28320ffbc WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::ComputedStyleExtractor::UpdateLayout) const + 108 (CSSComputedStyleDeclaration.cpp:99)
14 WebCore 0x2832100dc WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const + 56 (CSSComputedStyleDeclaration.cpp:119)
15 WebCore 0x283210a1c WebCore::CSSComputedStyleDeclaration::getPropertyValue(WTF::String const&) + 248 (CSSComputedStyleDeclaration.cpp:191)
16 WebCore 0x280803da0 WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValueBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSCSSStyleDeclaration*) + 592 (JSCSSStyleDeclaration.cpp:2406)
17 WebCore 0x280803b28 long long WebCore::IDLOperation<WebCore::JSCSSStyleDeclaration>::call<&(WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValueBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSCSSStyleDeclaration*)), (WebCore::CastedThisErrorBehavior)0>(JSC::JSGlobalObject&, JSC::CallFrame&, char const*) + 576 (JSDOMOperation.h:63)
18 WebCore 0x2808031a4 WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValue(JSC::JSGlobalObject*, JSC::CallFrame*) + 44 (JSCSSStyleDeclaration.cpp:2411)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Chris Dumez
In release, the test is also crashing, with a null-deference of FontCascades::m_fonts:
```
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 WebCore 0x10b498310 WebCore::FontCascadeFonts::primaryFont(WebCore::FontCascadeDescription const&) + 28 (FontCascadeFonts.h:132)
1 WebCore 0x10c34f798 WebCore::FontCascade::primaryFont() const + 16 (FontCascade.h:364) [inlined]
2 WebCore 0x10c34f798 WebCore::FontCascade::metricsOfPrimaryFont() const + 16 (FontCascade.h:173) [inlined]
3 WebCore 0x10c34f798 WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble(WebCore::CSSToLengthConversionData const&, WebCore::CSSUnitType, double) + 552 (CSSPrimitiveValue.cpp:861)
4 WebCore 0x10c34f798 WebCore::FontCascade::primaryFont() const + 16 (FontCascade.h:364) [inlined]
5 WebCore 0x10c34f798 WebCore::FontCascade::metricsOfPrimaryFont() const + 16 (FontCascade.h:173) [inlined]
6 WebCore 0x10c34f798 WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble(WebCore::CSSToLengthConversionData const&, WebCore::CSSUnitType, double) + 552 (CSSPrimitiveValue.cpp:861)
7 WebCore 0x10c34f464 WebCore::Length WebCore::CSSPrimitiveValue::computeLength<WebCore::Length>(WebCore::CSSToLengthConversionData const&) const + 24 (CSSPrimitiveValue.cpp:657)
8 WebCore 0x10bd917e4 WebCore::Style::BuilderConverter::convertLength(WebCore::Style::BuilderState const&, WebCore::CSSValue const&) + 132 (StyleBuilderConverter.h:214)
9 WebCore 0x10c3eef4c WebCore::CSSPropertyParser::parseTypedCustomPropertyValue(WTF::AtomString const&, WTF::String const&, WebCore::Style::BuilderState const&) + 372 (CSSPropertyParser.cpp:4972)
10 WebCore 0x10c3eed88 WebCore::CSSPropertyParser::parseTypedCustomPropertyValue(WTF::AtomString const&, WTF::String const&, WebCore::CSSParserTokenRange const&, WebCore::Style::BuilderState const&, WebCore::CSSParserContext const&) + 60 (CSSPropertyParser.cpp:307)
11 WebCore 0x10c3d9184 WebCore::CSSParser::parseValueWithVariableReferences(WebCore::CSSPropertyID, WebCore::CSSValue const&, WebCore::Style::BuilderState&) + 916 (CSSParser.cpp:243)
12 WebCore 0x10d03cc64 WebCore::Style::Builder::resolvedVariableValue(WebCore::CSSPropertyID, WebCore::CSSValue const&) + 124 (StyleBuilder.cpp:379)
13 WebCore 0x10d03c794 WebCore::Style::Builder::applyCustomProperty(WTF::AtomString const&) + 584 (StyleBuilder.cpp:195)
14 WebCore 0x10d03c054 WebCore::Style::Builder::applyCustomProperties() + 12 (StyleBuilder.cpp:166) [inlined]
15 WebCore 0x10d03c054 WebCore::Style::Builder::applyNonHighPriorityProperties() + 280 (StyleBuilder.cpp:111)
16 WebCore 0x10d04a0bc WebCore::Style::Resolver::applyMatchedProperties(WebCore::Style::Resolver::State&, WebCore::Style::MatchResult const&) + 436 (StyleResolver.cpp:638)
17 WebCore 0x10d049934 WebCore::Style::Resolver::styleForElement(WebCore::Element const&, WebCore::Style::ResolutionContext const&, WebCore::RuleMatchingBehavior) + 360 (StyleResolver.cpp:266)
18 WebCore 0x10d058894 WebCore::Style::TreeResolver::styleForStyleable(WebCore::Styleable const&, WebCore::Style::TreeResolver::ResolutionType, WebCore::Style::ResolutionContext const&) + 168 (StyleTreeResolver.cpp:153)
19 WebCore 0x10d058d24 WebCore::Style::TreeResolver::resolveElement(WebCore::Element&, WebCore::Style::TreeResolver::ResolutionType) + 248 (StyleTreeResolver.cpp:226)
20 WebCore 0x10d05b238 WebCore::Style::TreeResolver::resolveComposedTree() + 1008 (StyleTreeResolver.cpp:832)
21 WebCore 0x10d05c2a8 WebCore::Style::TreeResolver::resolve() + 460 (StyleTreeResolver.cpp:932)
22 WebCore 0x10c4d711c WebCore::Document::resolveStyle(WebCore::Document::ResolveStyleType) + 408 (Document.cpp:2114)
23 WebCore 0x10c4d796c WebCore::Document::updateStyleIfNeeded() + 224 (Document.cpp:2250)
24 WebCore 0x10c370978 WebCore::ComputedStyleExtractor::updateStyleIfNeededForProperty(WebCore::Element&, WebCore::CSSPropertyID) + 172 (ComputedStyleExtractor.cpp:2553)
25 WebCore 0x10c370308 WebCore::ComputedStyleExtractor::propertyValue(WebCore::CSSPropertyID, WebCore::ComputedStyleExtractor::UpdateLayout, WebCore::ComputedStyleExtractor::PropertyValueType) + 116 (ComputedStyleExtractor.cpp:2803)
26 WebCore 0x10c322cd0 WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue(WebCore::CSSPropertyID, WebCore::ComputedStyleExtractor::UpdateLayout) const + 44 (CSSComputedStyleDeclaration.cpp:99) [inlined]
27 WebCore 0x10c322cd0 WebCore::CSSComputedStyleDeclaration::getPropertyValue(WebCore::CSSPropertyID) const + 72 (CSSComputedStyleDeclaration.cpp:119)
28 WebCore 0x10b61835c WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValueBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSCSSStyleDeclaration*) + 128 (JSCSSStyleDeclaration.cpp:2406)
```
Radar WebKit Bug Importer
<rdar://problem/101974818>
Antti Koivisto
Pull request: https://github.com/WebKit/WebKit/pull/8092
EWS
Committed 258357@main (557b51715d46): <https://commits.webkit.org/258357@main>
Reviewed commits have been landed. Closing PR #8092 and removing active labels.
Tim Nguyen (:ntim)
*** Bug 190842 has been marked as a duplicate of this bug. ***