Closed Bug 1612983 Opened 5 years ago Closed 5 years ago

Do not disable APZ when the selection is on nomal position: static elements while pinch-zooming

Categories

(Core :: DOM: Selection, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

Details

Attachments

(1 file)

Bug 1526268 designed a mechanism that APZ is disabled when AccessibleCaret is in a position:fixed subtree or when its position is changed. In particular, APZ is disabled whenever mIsCaretPositionChanged is true [1]. (See [2] for a more detailed rational)

mIsCaretPositionChanged is updated in when one of the AccessibleCaret has PositionChangedResult::Changed [3]. However, PositionChangedResult::Changed is true when the position is the same, but the zoom level is changed [4]. That's why Bug 1610960 happens that APZ is disabled when pinch-zooming while the selection is on normal position:static text.

[1] https://searchfox.org/mozilla-central/rev/2e355fa82aaa87e8424a9927c8136be184eeb6c7/layout/base/AccessibleCaretManager.cpp#372
[2] https://phabricator.services.mozilla.com/D51351?id=184974#inline-312215
[3] https://searchfox.org/mozilla-central/rev/2e355fa82aaa87e8424a9927c8136be184eeb6c7/layout/base/AccessibleCaretManager.cpp#335-337
[4] https://searchfox.org/mozilla-central/rev/2e355fa82aaa87e8424a9927c8136be184eeb6c7/layout/base/AccessibleCaret.cpp#265,280

Summary: Do not disable APZ when the selection is not on position: fixed elements → Do not disable APZ when the selection is on nomal position: static elements while pinch-zooming

mIsCaretPositionChanged is used in UpdateShouldDisableApz() to
determine whether to disable APZ during scrolling or pinch-zooming.

Suppose the selection is on position:static elements. When
pinch-zooming, the zoom level is changed, but the position is not. We
split PositionChangedResult::Changed into two separate states, and set
mIsCaretPositionChanged only when the position is changed, not when
the zoom level is changed.

Attachment #9124178 - Attachment description: Bug 1612983 - Do not disable APZ if only zoom level is changed. → Bug 1612983 - Disable APZ only when the position is changed.
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Blocks: 1610960
See Also: 1610960
Attachment #9124178 - Attachment description: Bug 1612983 - Disable APZ only when the position is changed. → Bug 1612983 - Disable APZ only when AccessibleCaret's position is changed.
Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/c6dde25bf5fd Disable APZ only when AccessibleCaret's position is changed. r=botond
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: