"ASSERTION: rounding error in width reduction???" with SVG, border-image

RESOLVED FIXED in mozilla21

Status

()

defect
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: jruderman, Assigned: wchen)

Tracking

(Blocks 1 bug, {assertion, testcase})

Trunk
mozilla21
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Reporter

Description

7 years ago
Posted image testcase
###!!! ASSERTION: rounding error in width reduction???: 'border.left + border.right <= borderImgArea.width && border.top + border.bottom <= borderImgArea.height', file layout/base/nsCSSRendering.cpp, line 3124

This assertion is part of the original code for border-image:

changeset:   dda1146d1ec3
user:        William Chen
date:        Thu Dec 22 18:34:45 2011 -0500
summary:     Bug 497995: Part 1 - Implement border-image revisions in latest css3-background spec. r=dbaron
Assignee

Updated

7 years ago
Assignee: nobody → wchen
Comment on attachment 705948 [details] [diff] [review]
Fixed int overflow when scaling border-image-width.

>+  uint32_t combinedBorderWidth = border.left + border.right;

You should (for both width and height) cast these values to uint32_t before the addition rather than waiting until after.  And I think you should also add an assertion that the values are positive, which can probably be done in the code above, either right before or right after the assignment to border.Side(s).

r=dbaron with that
Attachment #705948 - Flags: review?(dbaron) → review+
Assignee

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4eed73abf01c
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/4eed73abf01c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.