Open Bug 1339732 Opened 3 years ago Updated 2 years ago

Find a better data structure than nscoord[8] to store border radii

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

People

(Reporter: TYLin, Unassigned)

Details

File per bug 1326407 comment 14 by dbaron.

In layout code, border radii are stored in nscoord[8] (see [1]), it might be worth creating a struct type containing an nscoord[8] array to make this clearer and perhaps safer.

I also found gfx has a type RectCornerRadii [2], which stores radii by |Size radii[eCornerCount]|. I'm not sure whether we should generalize the type and use it in layout. 

[1] http://searchfox.org/mozilla-central/search?q=nscoord+aRadii%5B8%5D&case=false&regexp=false&path=
[2] http://searchfox.org/mozilla-central/rev/ac8a72f2d5204ced2004c93a9c193430c63a6a71/gfx/2d/PathHelpers.h#180-181
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.