<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>247212</bug_id>
          
          <creation_ts>2022-10-28 14:09:48 -0700</creation_ts>
          <short_desc>[@property] Handle unit cycles correctly</short_desc>
          <delta_ts>2023-01-01 22:32:06 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=247199</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>189692</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Dumez">cdumez</reporter>
          <assigned_to name="Antti Koivisto">koivisto</assigned_to>
          <cc>justin_michaud</cc>
    
    <cc>koivisto</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1909074</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-10-28 14:09:48 -0700</bug_when>
    <thetext>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&amp;, WebCore::Style::MatchResult const&amp;) + 864 (StyleResolver.cpp:638)
4   WebCore                       	       0x28551add4 WebCore::Style::Resolver::styleForElement(WebCore::Element const&amp;, WebCore::Style::ResolutionContext const&amp;, WebCore::RuleMatchingBehavior) + 716 (StyleResolver.cpp:266)
5   WebCore                       	       0x285553c30 WebCore::Style::TreeResolver::styleForStyleable(WebCore::Styleable const&amp;, WebCore::Style::TreeResolver::ResolutionType, WebCore::Style::ResolutionContext const&amp;) + 812 (StyleTreeResolver.cpp:153)
6   WebCore                       	       0x285554044 WebCore::Style::TreeResolver::resolveElement(WebCore::Element&amp;, 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&amp;, 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&amp;) + 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&lt;WebCore::JSCSSStyleDeclaration&gt;::call&lt;&amp;(WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValueBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSCSSStyleDeclaration*)), (WebCore::CastedThisErrorBehavior)0&gt;(JSC::JSGlobalObject&amp;, JSC::CallFrame&amp;, char const*) + 576 (JSDOMOperation.h:63)
18  WebCore                       	       0x2808031a4 WebCore::jsCSSStyleDeclarationPrototypeFunction_getPropertyValue(JSC::JSGlobalObject*, JSC::CallFrame*) + 44 (JSCSSStyleDeclaration.cpp:2411)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909302</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-10-31 07:55:03 -0700</bug_when>
    <thetext>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&amp;) + 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&amp;, 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&amp;, WebCore::CSSUnitType, double) + 552 (CSSPrimitiveValue.cpp:861)
7   WebCore                       	       0x10c34f464 WebCore::Length WebCore::CSSPrimitiveValue::computeLength&lt;WebCore::Length&gt;(WebCore::CSSToLengthConversionData const&amp;) const + 24 (CSSPrimitiveValue.cpp:657)
8   WebCore                       	       0x10bd917e4 WebCore::Style::BuilderConverter::convertLength(WebCore::Style::BuilderState const&amp;, WebCore::CSSValue const&amp;) + 132 (StyleBuilderConverter.h:214)
9   WebCore                       	       0x10c3eef4c WebCore::CSSPropertyParser::parseTypedCustomPropertyValue(WTF::AtomString const&amp;, WTF::String const&amp;, WebCore::Style::BuilderState const&amp;) + 372 (CSSPropertyParser.cpp:4972)
10  WebCore                       	       0x10c3eed88 WebCore::CSSPropertyParser::parseTypedCustomPropertyValue(WTF::AtomString const&amp;, WTF::String const&amp;, WebCore::CSSParserTokenRange const&amp;, WebCore::Style::BuilderState const&amp;, WebCore::CSSParserContext const&amp;) + 60 (CSSPropertyParser.cpp:307)
11  WebCore                       	       0x10c3d9184 WebCore::CSSParser::parseValueWithVariableReferences(WebCore::CSSPropertyID, WebCore::CSSValue const&amp;, WebCore::Style::BuilderState&amp;) + 916 (CSSParser.cpp:243)
12  WebCore                       	       0x10d03cc64 WebCore::Style::Builder::resolvedVariableValue(WebCore::CSSPropertyID, WebCore::CSSValue const&amp;) + 124 (StyleBuilder.cpp:379)
13  WebCore                       	       0x10d03c794 WebCore::Style::Builder::applyCustomProperty(WTF::AtomString const&amp;) + 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&amp;, WebCore::Style::MatchResult const&amp;) + 436 (StyleResolver.cpp:638)
17  WebCore                       	       0x10d049934 WebCore::Style::Resolver::styleForElement(WebCore::Element const&amp;, WebCore::Style::ResolutionContext const&amp;, WebCore::RuleMatchingBehavior) + 360 (StyleResolver.cpp:266)
18  WebCore                       	       0x10d058894 WebCore::Style::TreeResolver::styleForStyleable(WebCore::Styleable const&amp;, WebCore::Style::TreeResolver::ResolutionType, WebCore::Style::ResolutionContext const&amp;) + 168 (StyleTreeResolver.cpp:153)
19  WebCore                       	       0x10d058d24 WebCore::Style::TreeResolver::resolveElement(WebCore::Element&amp;, 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&amp;, 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)

```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910426</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-11-04 14:10:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/101974818&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1922146</commentid>
    <comment_count>3</comment_count>
    <who name="Antti Koivisto">koivisto</who>
    <bug_when>2022-12-29 02:15:37 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/8092</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1922218</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-29 12:50:05 -0800</bug_when>
    <thetext>Committed 258357@main (557b51715d46): &lt;https://commits.webkit.org/258357@main&gt;

Reviewed commits have been landed. Closing PR #8092 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1922477</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-01-01 22:32:06 -0800</bug_when>
    <thetext>*** Bug 190842 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>