[Webkit-unassigned] [Bug 60627] CSS letter-spacing integer truncation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 14 14:42:39 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=60627
--- Comment #9 from Berend-Jan Wever <skylined at chromium.org> 2011-06-14 14:42:39 PST ---
You can check the offsetWidth of spans, like so:
<html>
<body>
<span id="0x7FFE" style="letter-spacing: 32766px;">a</span>
<span id="0x7FFF" style="letter-spacing: 32767px;">a</span>
<span id="0x8000" style="letter-spacing: 32768px;">a</span>
<span id="-0x7FFF" style="letter-spacing: -32767px;">a</span>
<span id="-0x8000" style="letter-spacing: -32768px;">a</span>
<span id="-0x8001" style="letter-spacing: -32769px;">a</span>
<script>
var o0x7FFE = document.getElementById('0x7FFE'),
o0x7FFF = document.getElementById('0x7FFF'),
o0x8000 = document.getElementById('0x8000');
o_0x7FFF = document.getElementById('-0x7FFF');
o_0x8000 = document.getElementById('-0x8000');
o_0x8001 = document.getElementById('-0x8001');
var iDiff1 = o0x7FFF.offsetWidth - o0x7FFE.offsetWidth,
iDiff2 = o0x8000.offsetWidth - o0x7FFF.offsetWidth,
i_Diff1 = o_0x8000.offsetWidth - o_0x7FFF.offsetWidth,
i_Diff2 = o_0x8001.offsetWidth - o_0x8000.offsetWidth;
document.body.innerHTML = iDiff1 == iDiff2 && i_Diff1 == i_Diff2 ?
'PASS' :
'FAIL (' + iDiff1 + ' vs ' + iDiff2 + ' and ' + i_Diff1 + ' vs ' + i_Diff2 + '))';
</script>
</body>
</html>
The checks will probably have to be modified to suit the expected results - I'm not sure what to expect after the patch.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list