Description[Android] Fix context menu animation errors for Browser Actions
This CL fixes two issues about animation of Chrome context menu for
Browser Actions:
1. NullPointerException for getContentOffsetYPix because Browser Actions
does not have ContentViewCore. To fix it, add a check if null, return 0.
2. Browser Actions request does not provide the touch event coordinates
and sets them to 0 when displaying the context menu. This forces context
menu to be displayed from top left. The ideal performance should display
the context menu from center. To fix it, if the Activity is a
BrowserActionActivity, set ScaleAnimation to animate from center.
BUG=None
Review-Url: https://codereview.chromium.org/2949153002
Cr-Commit-Position: refs/heads/master@{#481983}
Committed: https://chromium.googlesource.com/chromium/src/+/8858b0ca87b50b3aa49aca753e0a520c06bcdfc4
Patch Set 1 #
Total comments: 4
Patch Set 2 : Updates based on Theresa's comments. #
Total comments: 1
Dependent Patchsets: Messages
Total messages: 11 (4 generated)
|