Closed Bug 1726620 Opened 3 years ago Closed 3 years ago

Add structs representing strong-type app units coordinates

Categories

(Core :: Layout, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

The structs are wrappers for int32_t and int64_t representing strong type AppUnit coordinates. I'm planning to use the 64-bit one in flex container to fix bug 1469649.

This shouldn't change the behavior, but we can use 64-bit T in a later
patch.

The motivation of introducing the structs is to use 64-bit integer
arithmetic to prevent 32-bit integer overflow. One application is to fix
the integer overflow when resolving flex item's main size in Bug 1469649.

The structs can be a start point to add more useful methods to explore
saturation arithmetic.

Depends on D123265

Attachment #9237309 - Attachment description: Bug 1726620 Part 1 - Generalize IntCoordTyped template to take T as the underlying type → Bug 1726620 Part 1 - Generalize IntCoordTyped template to take T as the underlying type.
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Attachment #9237309 - Attachment description: Bug 1726620 Part 1 - Generalize IntCoordTyped template to take T as the underlying type. → Bug 1726620 Part 1 - Generalize IntCoordTyped template to take a parameter as the underlying type.
Blocks: 1727376
Blocks: 1727390
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
See Also: → 1761804
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: