<?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>158507</bug_id>
          
          <creation_ts>2016-06-07 18:22:22 -0700</creation_ts>
          <short_desc>Setting a style on the body right after load doesn&apos;t trigger a style recalc</short_desc>
          <delta_ts>2022-09-04 13:45:34 -0700</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>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sam Weinig">sam</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1200277</commentid>
    <comment_count>0</comment_count>
      <attachid>280758</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2016-06-07 18:22:22 -0700</bug_when>
    <thetext>Created attachment 280758
Test case

While investigating a test failure, I ran into this issue.  It seems that if you try to set a style on the body, right after load, and then read it back via getComputedStyle, it won&apos;t get set. Interestingly, this only happens the first time. If you immediately set the same style again, it works. Test case attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896085</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-03 14:39:05 -0700</bug_when>
    <thetext>While trying to reproduce this using attached test case, I get following error in Chrome Canary 107 and Firefox Nightly 106 (just pasting &quot;Chrome&quot; error message but it is same in both):

Uncaught TypeError: window.getComputedStyle(...).getPropertyCSSValue is not a function
    at test (attachment.cgi?id=280758:17:56)
    at window.onload (attachment.cgi?id=280758:28:5)

While Safari Technology Preview 152 (on macOS 12.5.1 in Private Window) jut shows:

PASS: rgb(255, 0, 0) is rgb(255, 0, 0).
PASS: rgb(255, 0, 0) is rgb(255, 0, 0).

Just wanted to share updated results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896205</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2022-09-04 13:45:34 -0700</bug_when>
    <thetext>The test fails in other browsers because on deprecated getPropertyCSSValue.

Since it passes in Safari now, config changed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>280758</attachid>
            <date>2016-06-07 18:22:22 -0700</date>
            <delta_ts>2016-06-07 18:22:22 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>805</size>
            <attacher name="Sam Weinig">sam</attacher>
            
              <data encoding="base64">PHByZSBpZD0iY29uc29sZSI+PC9wcmU+CjxzY3JpcHQ+Cgp2YXIgc3R5bGVFbGVtZW50ID0gZG9j
dW1lbnQuY3JlYXRlRWxlbWVudCgic3R5bGUiKTsKZG9jdW1lbnQuaGVhZC5hcHBlbmRDaGlsZChz
dHlsZUVsZW1lbnQpOwp2YXIgc3R5bGVzaGVldCA9IHN0eWxlRWxlbWVudC5zaGVldDsKCmZ1bmN0
aW9uIGxvZyhtc2cpCnsKICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdjb25zb2xlJykuYXBw
ZW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