Closed Bug 1428348 Opened 2 years ago Closed 2 years ago

Let Set{Right,Left,Bottom,Top}Edge set negative width/height

Categories

(Core :: Graphics, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: milan, Assigned: milan)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

There is currently no checks for rectangle height and width being set to only non-negative numbers, and we have code that clearly assumes those values are allowed (at least temporarily).  Remove the asserts from the Set{Right,Left,Bottom,Top}Edge methods that trigger if the width/height are set to a negative value to make things consistent.

If we decide that the negative values should never be allowed, we need to make larger changes.  With these asserts, we're discouraging the use of these convenient methods, instead forcing callers to compute and set the width and height directly.
Assignee: nobody → milan
Priority: -- → P3
Whiteboard: [gfx-noted]
Comment on attachment 8940208 [details]
Bug 1428348: Allow Set{Left,Right,Top,Bottom}Edge methods to compute negative width/height without asserting. .schouten

https://reviewboard.mozilla.org/r/210522/#review217156
Attachment #8940208 - Flags: review?(bas) → review+
Pushed by msreckovic@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fe793fde1117
Allow Set{Left,Right,Top,Bottom}Edge methods to compute negative width/height without asserting. r=bas.schouten
https://hg.mozilla.org/mozilla-central/rev/fe793fde1117
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.