Closed Bug 1156636 Opened 9 years ago Closed 9 years ago

Dragging a selection-caret starts panning at a large zoom-in scale

Categories

(Core :: Panning and Zooming, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: TYLin, Assigned: mtseng)

References

Details

Attachments

(3 files)

Attached file test html
Steps to reproduce:
1. Open the attached html on B2G browser.
2. Pinch zoom-in the html to the scale as the attached image.
3. Long tap the text "456" to make selection-carets shown.
4. Drag a selection-caret.

Actual result:
APZ starts panning while dragging a selection-caret.

Expected result:
APZ does not panning while dragging a selection-caret.
I can reproduce this problem intermittently, when trying to drag the starting caret to the left.
Whether or not the problem occurs is correlated with whether APZ hit testing for the touch-start returns HitLayer (we get panning) or HitDispatchToContentRegion (no panning).
In content side, event regions would multiply post scale(mParameters.mX/YScale) [1]. But apz perform hit test in layer coordinate space which means post scale doesn't consider in this space [2]. So, if we pinch-zoom, the event regions are wrong. I'll upload a patch which remove multiplying post scale in FrameLayerBuilder.


[1]: https://dxr.mozilla.org/mozilla-central/source/layout/base/FrameLayerBuilder.cpp#3049 
[2]: https://dxr.mozilla.org/mozilla-central/source/gfx/layers/apz/src/HitTestingTreeNode.cpp#179
Assignee: nobody → mtseng
Status: NEW → ASSIGNED
Why are we drawing the selection caret so big anyway? At really high zoom levels the carets take up half the screen. I thought we accounted for that somewhere and scaled them down so that they were always the same visual size?
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> Why are we drawing the selection caret so big anyway? At really high zoom
> levels the carets take up half the screen. I thought we accounted for that
> somewhere and scaled them down so that they were always the same visual size?

We are planning to implement it in bug 1068525!
B2G ICS Emulator debug M20 looks like a known issue. Shouldn't relevent to this bug.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/c9073aaaf9a6
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.