Open Bug 1747147 Opened 3 years ago Updated 3 years ago

Simplifications that can be made to combobox code after bug 1744009

Categories

(Core :: Layout: Form Controls, task, P3)

task

Tracking

()

People

(Reporter: dholbert, Unassigned)

References

Details

I'm filing this as a place to post ideas/reminders for simplifications that we can make after bug 1744009 lands. (I started pointing out one such item in review, but realized it'd probably be better to just file a followup.)

First thing: It looks like IsDroppedDownOrHasParentPopup() will be able to go away, since it ends up being just an alias for IsOpenInParentProcess().

Severity: S3 → S4

If possible, it would also be nice to clean up the signedness of CharCountOfLargestOptionForInflation (being added in bug 1744009), and the related preexisting functions CharCountOfLargestOption (and its helper DoCharCountOfLargestOption).

These APIs deal with unsigned uint32_t internally, but their callers in nsFontInflationData.cpp put the return values into signed int32_t, triggering an implicit cast, which is a bit messy. It would probably be nice to make the casts explicit somewhere, or (maybe better) just keep using uint32_t all the way to the point where we produce a nscoord. [1]

[1] (maybe that's just sweeping it under the rug, since nscoord itself is int32_t; but at least nscoord is a number-space where we have some reasonably-well-defined laxness around how overflow is/isn't handled.)

You need to log in before you can comment on or make changes to this bug.