WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
158507
Setting a style on the body right after load doesn't trigger a style recalc
https://bugs.webkit.org/show_bug.cgi?id=158507
Summary
Setting a style on the body right after load doesn't trigger a style recalc
Sam Weinig
Reported
2016-06-07 18:22:22 PDT
Created
attachment 280758
[details]
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't get set. Interestingly, this only happens the first time. If you immediately set the same style again, it works. Test case attached.
Attachments
Test case
(805 bytes, text/html)
2016-06-07 18:22 PDT
,
Sam Weinig
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Ahmad Saleem
Comment 1
2022-09-03 14:39:05 PDT
While trying to reproduce this using attached test case, I get following error in Chrome Canary 107 and Firefox Nightly 106 (just pasting "Chrome" 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!
Alexey Proskuryakov
Comment 2
2022-09-04 13:45:34 PDT
The test fails in other browsers because on deprecated getPropertyCSSValue. Since it passes in Safari now, config changed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug