gecko-dev/dom/smil/test
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
..
db_smilAnimateMotion.js
db_smilCSSFromBy.js
db_smilCSSFromTo.js Bug 1371196 - Round font-weight when interpolating, don't floor; r=hiro 2017-06-09 12:19:47 +09:00
db_smilCSSPaced.js
db_smilCSSPropertyList.js
db_smilMappedAttrList.js
file_smilWithTransition.html Bug 1357979 - Add dom.animations-api.core.enabled preference to test of smil with transition in order to enable beta/release test. r=birtles 2017-05-01 22:54:11 +09:00
mochitest.ini Bug 1357979 - Add dom.animations-api.core.enabled preference to test of smil with transition in order to enable beta/release test. r=birtles 2017-05-01 22:54:11 +09:00
smilAnimateMotionValueLists.js
smilExtDoc_helper.svg
smilTestUtils.js
smilXHR_helper.svg
test_smilAccessKey.xhtml
test_smilAnimateMotion.xhtml
test_smilAnimateMotionInvalidValues.xhtml
test_smilAnimateMotionOverrideRules.xhtml
test_smilBackwardsSeeking.xhtml
test_smilCSSFontStretchRelative.xhtml
test_smilCSSFromBy.xhtml
test_smilCSSFromTo.xhtml
test_smilCSSInherit.xhtml
test_smilCSSInvalidValues.xhtml
test_smilCSSPaced.xhtml
test_smilChangeAfterFrozen.xhtml
test_smilConditionalProcessing.html
test_smilContainerBinding.xhtml
test_smilCrossContainer.xhtml
test_smilDynamicDelayedBeginElement.xhtml
test_smilExtDoc.xhtml
test_smilFillMode.xhtml
test_smilGetSimpleDuration.xhtml
test_smilGetStartTime.xhtml
test_smilHyperlinking.xhtml
test_smilInvalidValues.html
test_smilKeySplines.xhtml
test_smilKeyTimes.xhtml
test_smilKeyTimesPacedMode.xhtml
test_smilMappedAttrFromBy.xhtml
test_smilMappedAttrFromTo.xhtml
test_smilMappedAttrPaced.xhtml
test_smilMinTiming.html
test_smilRepeatDuration.html
test_smilRepeatTiming.xhtml
test_smilReset.xhtml
test_smilRestart.xhtml
test_smilSetCurrentTime.xhtml
test_smilSync.xhtml
test_smilSyncTransform.xhtml
test_smilSyncbaseTarget.xhtml
test_smilTextZoom.xhtml
test_smilTimeEvents.xhtml Bug 1251198 - Remove various obsolete events from document.createEvent r=smaug 2017-04-20 15:45:37 +03:00
test_smilTiming.xhtml
test_smilTimingZeroIntervals.xhtml
test_smilUpdatedInterval.xhtml
test_smilValues.xhtml
test_smilWithTransition.html Bug 1357979 - Add dom.animations-api.core.enabled preference to test of smil with transition in order to enable beta/release test. r=birtles 2017-05-01 22:54:11 +09:00
test_smilWithXlink.xhtml
test_smilXHR.xhtml