Summary: | Double values passed to fabsf() in maxScaleFromTransform() | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||
Component: | Platform | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, darin, dino, mjs, simon.fraser | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
David Kilzer (:ddkilzer)
2014-03-15 21:46:32 PDT
Created attachment 226832 [details]
Patch v1
Comment on attachment 226832 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=226832&action=review > Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287 > + return std::max(fabsf(static_cast<float>(decomposeData.scaleX)), fabsf(static_cast<float>(decomposeData.scaleY))); I’d really prefer we use syntax cast for casting double to float that would not also work to convert, say, int to float. Comment on attachment 226832 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=226832&action=review >> Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:287 >> + return std::max(fabsf(static_cast<float>(decomposeData.scaleX)), fabsf(static_cast<float>(decomposeData.scaleY))); > > I’d really prefer we use syntax cast for casting double to float that would not also work to convert, say, int to float. Seems like we have it! It’s called narrowPrecisionToFloat. Comment on attachment 226832 [details] Patch v1 Clearing flags on attachment: 226832 Committed r165693: <http://trac.webkit.org/changeset/165693> All reviewed patches have been landed. Closing bug. Reopening for follow-up patch to switch to using narrowPrecisionToFloat() instead. Created attachment 226850 [details]
Patch for follow-up issue
Comment on attachment 226850 [details] Patch for follow-up issue Clearing flags on attachment: 226850 Committed r165711: <http://trac.webkit.org/changeset/165711> All reviewed patches have been landed. Closing bug. |