Bug 149105 - Rendering of style doesn't update
Summary: Rendering of style doesn't update
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Critical
Assignee: Nobody
URL: https://jsfiddle.net/f557bLq4/1/
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-13 11:22 PDT by hurin8888
Modified: 2020-02-03 15:46 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hurin8888 2015-09-13 11:22:15 PDT
The background of the <li> should be undefined, it shows green instead.

This bug appeared on the last stable android webview and last stable desktop version of webkit and didn't exist before.

https://jsfiddle.net/f557bLq4/1/
Comment 1 hurin8888 2015-09-13 14:07:34 PDT
The CSS object model specification says

"Mutating the declarations must set the style content attribute on the context object to the serialization of the declarations."

https://drafts.csswg.org/cssom/#elementcssinlinestyle

So it confirms this behavior is not wanted.

A hotfix for webdevelopers is to mute the wanted property namely, element.style.backgroundColor = ''.
Comment 2 hurin8888 2015-09-13 14:12:56 PDT
Aswell the ElementCSSInlineStyle forwards to cssText https://drafts.csswg.org/cssom/#cssstyledeclaration which says "2. Empty the declarations".
Comment 3 hurin8888 2015-09-18 14:38:13 PDT
Added a more obvious test case to show the problem https://jsfiddle.net/f557bLq4/6/
Comment 4 Alexey Shvayka 2016-10-28 01:13:23 PDT Comment hidden (obsolete)
Comment 5 Alexey Shvayka 2019-06-04 12:44:02 PDT
As of build 246014, `.style =` setter works as expected.
Comment 6 Alexey Shvayka 2020-02-03 15:46:33 PST
This issue was caused by spec-imperfect implementation of [PutForwards] extended attribute and was fixed in https://bugs.webkit.org/show_bug.cgi?id=172956.

Test: web-platform-tests/WebIDL/ecmascript-binding/put-forwards.html