Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Issue 2949153002: [Android] Fix context menu animation errors for Browser Actions (Closed)

Created:
3 years, 6 months ago by ltian
Modified:
3 years, 6 months ago
Reviewers:
Ted C, Theresa, Daniel Park
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

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
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -5 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java View 1 4 chunks +16 lines, -5 lines 1 comment Download

Dependent Patchsets:

Messages

Total messages: 11 (4 generated)
ltian
Could you take a look of this changes? Thanks!
3 years, 6 months ago (2017-06-22 01:24:41 UTC) #2
Theresa
Will you please file a bug for this and upload some videos of the animation? ...
3 years, 6 months ago (2017-06-22 15:07:29 UTC) #3
ltian
https://codereview.chromium.org/2949153002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java File chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java (right): https://codereview.chromium.org/2949153002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java#newcode56 chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java:56: float touchPointYPx, View contentView, RenderCoordinates renderCoordinates) { On 2017/06/22 ...
3 years, 6 months ago (2017-06-22 18:18:08 UTC) #4
Theresa
lgtm https://codereview.chromium.org/2949153002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java File chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java (right): https://codereview.chromium.org/2949153002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java#newcode170 chrome/android/java/src/org/chromium/chrome/browser/widget/ContextMenuDialog.java:170: Animation.RELATIVE_TO_SELF, 0.5f); I think ideally we would skip ...
3 years, 6 months ago (2017-06-22 23:33:42 UTC) #5
Ted C
lgtm
3 years, 6 months ago (2017-06-23 18:15:41 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2949153002/20001
3 years, 6 months ago (2017-06-23 18:16:36 UTC) #8
commit-bot: I haz the power
3 years, 6 months ago (2017-06-23 19:09:17 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/8858b0ca87b50b3aa49aca753e0a...

Powered by Google App Engine
This is Rietveld 408576698