gecko-dev/layout
Brian Birtles f7f386ac4e Bug 1371196 - Round font-weight when interpolating, don't floor; r=hiro
The spec says,

 font weight: interpolated via discrete steps (multiples of 100). The
 interpolation happens in real number space and is converted to an integer by
 rounding to the nearest multiple of 100, with values halfway between
 multiples of 100 rounded towards positive infinity.[1]

However, our implementation pre-dates this spec text (bug 528234 landed Nov 2009
whereas the spec was updated in Mar 2012[2]).

This patch rounds the result by simply adding 50 to the result before we floor
it (which is good enough in this case because we don't need to worry about
negative values).

It also slightly simplifies the logic by re-using Clamp from MathAlgorithms.h.

[1] https://drafts.csswg.org/css-transitions/#animtype-font-weight
[2] 00c6286109

MozReview-Commit-ID: BjCg7MG70hW

--HG--
extra : rebase_source : 879ea18d7d1a49ff425d6e467081983a130a65e3
2017-06-09 12:19:47 +09:00
..
base Merge autoland to m-c a=merge 2017-06-08 18:35:34 -07:00
build Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 4 - Rename StorageManagerBase to LocalStorageManager, r=asuth 2017-05-17 07:01:14 +02:00
doc
forms Bug 1360559 - Adjust mouse position in test_bug348236.html. r=jmaher 2017-05-30 16:13:01 -04:00
generic Backed out changeset a3eec11c6b37 (bug 1359709) for reftest failures in group-opacity-surface-size-1.html 2017-06-08 10:23:39 +02:00
inspector Bug 1367615 - Part 1: Move inDOMUtils style rules related functionality to BindingStyleRule. r=emilio 2017-06-07 17:48:49 +02:00
ipc Bug 1362462: Fallback to main document widget for frames which haven't been inserted yet. r=mconley 2017-05-29 13:16:23 -07:00
mathml bug 1368607 remove unused nsCSSMapping r=dbaron 2017-05-30 17:19:39 +12:00
media
painting Backed out changeset 5ea810dbc4af (bug 1359709) 2017-06-08 10:23:23 +02:00
printing Bug 1367683 Optimize initializing nsRange r=smaug 2017-05-30 13:18:25 +09:00
reftests Bug 1362255 Part 2 - Import the tests. r=xidorn 2017-06-09 10:36:20 +08:00
style Bug 1371196 - Round font-weight when interpolating, don't floor; r=hiro 2017-06-09 12:19:47 +09:00
svg Bug 1361593 - Simplify nsSVGMarkerFrame by storing the transform matrix rather than all the parameters necessary to calculate it. r=jwatt 2017-06-08 06:17:07 +01:00
tables Bug 1367747 - Create nsDisplayTableBorderCollapse when there is collapse border to draw. r=mstange 2017-06-06 14:11:41 +08:00
tools Backed out 2 changesets (bug 1367905) for a spike in Windows reftest failures a=backout 2017-06-08 16:09:28 -07:00
xul Bug 1365761 - Do not dispatch mouse-move events targeted as a slider frame to web content. r=smaug 2017-06-05 15:05:47 -04:00
moz.build