RESOLVED FIXED Bug 249019
StylePropertyMap should return CSS values exactly as they were set
https://bugs.webkit.org/show_bug.cgi?id=249019
Summary StylePropertyMap should return CSS values exactly as they were set
Chris Dumez
Reported 2022-12-09 08:17:41 PST
StylePropertyMap should return CSS values exactly as they were set. However, our implementation passes the input to the CSS parser which may result in a slightly different representation (sometimes simplified, sometimes converted). Feeding the input through the CSS parser is useful because it validates that the value is valid for the property in question. Also, our StyleBuilder makes a lot of assumptions about the type / format of the value for a given CSS property so we cannot let the JS set CSS property values that do not match the expected type / format. To address the issue, I added a CSSValue cache to InlineStylePropertyMap so that we can remember the CSSValues set by JavaScript and reflect them on later retrieval. I also make sure to invalidate this cache if the value of the CSS property changes using other means than the InlineStylePropertyMap.
Attachments
Chris Dumez
Comment 1 2022-12-09 08:19:51 PST
Chris Dumez
Comment 2 2022-12-12 16:15:59 PST
EWS
Comment 3 2022-12-13 14:43:42 PST
Committed 257815@main (bfd520b659e8): <https://commits.webkit.org/257815@main> Reviewed commits have been landed. Closing PR #7519 and removing active labels.
Radar WebKit Bug Importer
Comment 4 2022-12-13 14:44:18 PST
Note You need to log in before you can comment on or make changes to this bug.