Summary: | Add various clampToInt() methods to MathExtras.h | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||||
Component: | Web Template Framework | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | barraclough, buildbot, darin, sam, simon.fraser | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
Simon Fraser (smfr)
2011-01-21 11:55:54 PST
Created attachment 79774 [details]
Patch
Comment on attachment 79774 [details]
Patch
r+,
but have you thought about how these methods will handle NaN? - I'm guessing that the answer is, we don't care for CSS - in which case I'd suggest ASSERT(!isNaN(d)) in each. If you're not going to guard against NaN, I think you should document what expected behaviour is.
Attachment 79774 [details] did not build on win: Build output: http://queues.webkit.org/results/7515282 Gah, windows: 14>C:\cygwin\home\buildbot\Webkit\WebKitBuild\Debug\include\private\JavaScriptCore/MathExtras.h(213) : error C2220: warning treated as error - no 'object' file generated 14>C:\cygwin\home\buildbot\Webkit\WebKitBuild\Debug\include\private\JavaScriptCore/MathExtras.h(213) : warning C4003: not enough actual parameters for macro 'max' 14>C:\cygwin\home\buildbot\Webkit\WebKitBuild\Debug\include\private\JavaScriptCore/MathExtras.h(213) : error C2589: '(' : illegal token on right side of '::' Test Created attachment 80531 [details]
Need this change too.
|