Closed Bug 1230950 Opened 4 years ago Closed 4 years ago

[Static Analysis][Result is not floating-point] Function nsCSSRendering::PaintBorderWithStyleBorder from nsCSSRendering.cpp

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED INVALID
Tracking Status
firefox45 --- affected

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1328744)

Attachments

(1 file)

The Static Analysis tool Coverity added that the following codes:

>>  Float borderWidths[4] = { Float(border.top / twipsPerPixel),
>>                            Float(border.right / twipsPerPixel),
>>                            Float(border.bottom / twipsPerPixel),
>>                            Float(border.left / twipsPerPixel) };

will populate borderWidths with results that are casted to int and loosing precision. 

This behavior is present only when NS_COORD_IS_FLOAT is not defined.
Attached patch Bug 1230950.diffSplinter Review
Hello David,

Can you please take a look at this patch?

THX
Attachment #8696468 - Flags: review?(dbaron)
Comment on attachment 8696468 [details] [diff] [review]
Bug 1230950.diff

Review of attachment 8696468 [details] [diff] [review]:
-----------------------------------------------------------------

because David is probably busy.
Attachment #8696468 - Flags: review?(dbaron) → review?(bzbarsky)
Comment on attachment 8696468 [details] [diff] [review]
Bug 1230950.diff

Please ask for review from whoever wrote or reviewed this code...
Attachment #8696468 - Flags: review?(bzbarsky)
Comment on attachment 8696468 [details] [diff] [review]
Bug 1230950.diff

This seems like a substantive change in behavior, and I strongly suspect we want the current behavior (flooring to an integral number of pixels).
Attachment #8696468 - Flags: review-
Thx David i will wave the issue from Coverity.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.