[Webkit-unassigned] [Bug 256814] New: Safari 16.4 changed parsing of style background-position with missing semicolon
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 15 16:25:20 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=256814
Bug ID: 256814
Summary: Safari 16.4 changed parsing of style
background-position with missing semicolon
Product: WebKit
Version: Safari 16
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: webkitbugzilla at intensity.org.uk
This behaviour changed with the introduction of Safari 16.4. It is still present in Safari technology Preview Release 169 (Safari 16.4, WebKit 18616.1.12.2)
Given the following HTML:
<div id="outer" style="background-position: 10% 0%"></div>
Note the missing semicolon at the end of the style definition.
In Safari 16.4, this node's style.cssText becomes "background-position: 10%;"
In older Safari or any other browser, this node's style.cssText is "background-position: 10% 0%;"
Visible reproducer at https://jsfiddle.net/shadowphiar/skh5q6yz/
The reason this matters is that if any other style gets applied (such as a rotation transform) and background-position is recalculated, then suddenly the background-position-y is treated as 50% (because now only one argument is present in background-position). The writer expects background-position-y to remain 0%. I understand that the markup is incorrect but treating it so differently will be very unexpected.
This currently affects a production site boardgamearea.com and in particular their implementation of the game Carcassonne.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230515/1de4b725/attachment-0001.htm>
More information about the webkit-unassigned
mailing list