Closed Bug 1507189 Opened 6 years ago Closed 4 years ago

Replace nsIPresShell::ScrollDirection with an enumset over layers::ScrollDirection

Categories

(Core :: Layout, enhancement, P3)

65 Branch
enhancement

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox65 --- wontfix
firefox84 --- fixed

People

(Reporter: kats, Assigned: aemad, Mentored)

References

Details

(Whiteboard: [apz-outreachy][lang=c++])

Attachments

(1 file)

We have two ScrollDirection enums. One is defined in the layers code and widely used [1], and the other is defined in nsIPresShell and used in a handful of functions [2]. We should get rid of the latter and use the former. Note that the latter has an eEither option, but we can express that by using an EnumSet<ScrollDirection>, which in fact is already defined at [3].

[1] https://searchfox.org/mozilla-central/search?q=symbol:T_mozilla%3A%3Alayers%3A%3AScrollDirection&redirect=false
[2] https://searchfox.org/mozilla-central/search?q=symbol:T_nsIPresShell%3A%3AScrollDirection&redirect=false
[3] https://searchfox.org/mozilla-central/rev/d850d799a0009f851b5535580e0a8b4bb2c591d7/gfx/layers/apz/src/APZUtils.h#41
Mentor: jwatt
Priority: -- → P3

The second enum has since been renamed to ScrollableDirection and moved to nsLayoutUtils.h (declared here), but otherwise the described refactoring is still valid.

Stealing mentorship of the bug to use as an intermediate task for our desktop zooming Outreachy project.

Mentor: jwatt → botond
Whiteboard: [apz-outreachy]
Mentor: kats
Whiteboard: [apz-outreachy] → [apz-outreachy][lang=c++]
Assignee: nobody → eng.alaaemad.ae
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9cf73428357c
Replace nsIPresShell::ScrollDirection with an enumset over layers::ScrollDirection r=botond
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Blocks: 1677643
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: