Closed Bug 1899345 Opened 1 month ago Closed 1 month ago

Replace ScrollContainerFrame::OverflowState with mozilla::PhysicalAxes

Categories

(Core :: Layout: Scrolling and Overflow, task)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(2 files)

Per emilio's review comment in https://phabricator.services.mozilla.com/D211499#7267763, we could improve OverflowState by declaring it as uint8_t.

After taking a closer look at the enum, it is just a return value of a non-public method GetOverflowState, and it is public just because we implement MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS on it. I think this enum is equivalent to PhysicalAxes per implementation of GetOverflowState(). I'll upload patches later to improve this.

This also makes PhysicalAxis::{Horizontal,Vertical} more useful when we
previous needed PhysicalAxes::{Horizontal,Vertical}.

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

OverflowState is equivalent to PhysicalAxes. We really don't need a separate
type.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6f66d112b450
Part 1 - Convert PhysicalAxes to an EnumSet<PhysicalAxis>. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/ccb2ccbef46e
Part 2 - Rename GetOverflowState() and use PhysicalAxes as its return type. r=layout-reviewers,emilio

Backed out for causing android build bustages in ScrollContainerFrame.cpp.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: /builds/worker/checkouts/gecko/layout/generic/ScrollContainerFrame.cpp:6231:9: error: use of undeclared identifier 'GetOverflowState'; did you mean 'GetOverflowFrames'?
Flags: needinfo?(aethanyc)

Oops, there is a GetOverflowState() call in #if defined(MOZ_WIDGET_ANDROID) that I didn't convert https://searchfox.org/mozilla-central/rev/f60bb10a5fe6936f9e9f9e8a90d52c18a0ffd818/layout/generic/ScrollContainerFrame.cpp#6230

Flags: needinfo?(aethanyc)
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/01a540f73690
Part 1 - Convert PhysicalAxes to an EnumSet<PhysicalAxis>. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/b96c165e9ab4
Part 2 - Rename GetOverflowState() and use PhysicalAxes as its return type. r=layout-reviewers,emilio
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/23c00f7ab582
Part 1 - Convert PhysicalAxes to an EnumSet<PhysicalAxis>. r=layout-reviewers,emilio
https://hg.mozilla.org/integration/autoland/rev/ce424186fe41
Part 2 - Rename GetOverflowState() and use PhysicalAxes as its return type. r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Flags: needinfo?(aethanyc)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: