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.
Pull request: https://github.com/WebKit/WebKit/pull/7387
Pull request: https://github.com/WebKit/WebKit/pull/7519
Committed 257815@main (bfd520b659e8): <https://commits.webkit.org/257815@main> Reviewed commits have been landed. Closing PR #7519 and removing active labels.
<rdar://problem/103321455>