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

Issue 2515343004: Update selection handle bitmaps in AW if DIP scale changes (Closed)

Created:
4 years ago by Tima Vaisburd
Modified:
4 years ago
Reviewers:
boliu
CC:
chromium-reviews, android-webview-reviews_chromium.org, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update selection handle bitmaps in AW if DIP scale changes In android webview the selection handles are implemented in PopupTouchHandleDrawable.java In this CL we make this class an observer that listens to display changes and keep the current dip scale as a member instead of retrieving it from ContentViewCore. We cannot update the bitmaps by the DisplayAndroid signal (i.e. in onDIPScaleChanged()) because the resources are not yet updated at the moment. Instead, we update the bitmap in the subsequent onConfigurationChanged() that should follow the display change. To make sure that the configuration corresponds to the display change we check that the display density in resources is equal to the expected value. BUG=620929 Committed: https://crrev.com/2d5570dfe70975e2697eeced6402430316572f80 Cr-Commit-Position: refs/heads/master@{#435025}

Patch Set 1 #

Patch Set 2 : Call requestLayout() intead of scheduleInvalidate() #

Patch Set 3 : Rebased #

Patch Set 4 : Update drawable only if resources are updated to the expected density #

Total comments: 3

Patch Set 5 : Rebased #

Patch Set 6 : Initialized mDeviceScale in constructor #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -13 lines) Patch
M android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java View 1 2 3 4 5 12 chunks +66 lines, -13 lines 4 comments Download

Messages

Total messages: 29 (10 generated)
Tima Vaisburd
Bo, this is my "on demand" idea to re-fetch the bitmap brought to the state ...
4 years ago (2016-11-22 03:12:30 UTC) #2
boliu
On 2016/11/22 03:12:30, Tima Vaisburd wrote: > Bo, this is my "on demand" idea to ...
4 years ago (2016-11-22 18:34:53 UTC) #3
Tima Vaisburd
On 2016/11/22 18:34:53, boliu_back_dec wrote: > On 2016/11/22 03:12:30, Tima Vaisburd wrote: > > Bo, ...
4 years ago (2016-11-24 04:37:14 UTC) #4
boliu
On 2016/11/24 04:37:14, Tima Vaisburd wrote: > On 2016/11/22 18:34:53, boliu_back_dec wrote: > > On ...
4 years ago (2016-11-28 15:06:37 UTC) #5
Tima Vaisburd
On 2016/11/28 15:06:37, boliu_back_dec wrote: > But the first onConfigurationChanged will unset mNeedsUpdateDrawable, so any ...
4 years ago (2016-11-28 18:08:01 UTC) #6
boliu
On 2016/11/28 18:08:01, Tima Vaisburd wrote: > On 2016/11/28 15:06:37, boliu_back_dec wrote: > > But ...
4 years ago (2016-11-28 18:26:42 UTC) #7
Tima Vaisburd
On 2016/11/28 18:26:42, boliu_back_dec wrote: > I meant that's an actual bug. mNeedsUpdateDrawable should not ...
4 years ago (2016-11-28 18:47:19 UTC) #8
boliu
On 2016/11/28 18:47:19, Tima Vaisburd wrote: > On 2016/11/28 18:26:42, boliu_back_dec wrote: > > I ...
4 years ago (2016-11-28 18:56:57 UTC) #9
Tima Vaisburd
On 2016/11/28 18:56:57, boliu_back_dec wrote: > Oh so your issue is not this edge case? ...
4 years ago (2016-11-28 19:11:56 UTC) #10
boliu
On 2016/11/28 18:56:57, boliu_back_dec wrote: > On 2016/11/28 18:47:19, Tima Vaisburd wrote: > > On ...
4 years ago (2016-11-28 19:15:06 UTC) #11
Tima Vaisburd
On 2016/11/28 19:15:06, boliu_back_dec wrote: > On 2016/11/28 18:56:57, boliu_back_dec wrote: > > On 2016/11/28 ...
4 years ago (2016-11-29 01:01:23 UTC) #15
boliu
https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode87 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:87: private float mDeviceScale; set this to in constructor, if ...
4 years ago (2016-11-29 02:26:12 UTC) #18
Tima Vaisburd
https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode87 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:87: private float mDeviceScale; On 2016/11/29 02:26:12, boliu_back_dec wrote: > ...
4 years ago (2016-11-29 02:55:59 UTC) #19
boliu
https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2515343004/diff/60001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode87 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:87: private float mDeviceScale; On 2016/11/29 02:55:58, Tima Vaisburd wrote: ...
4 years ago (2016-11-29 03:35:43 UTC) #20
Tima Vaisburd
https://codereview.chromium.org/2515343004/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2515343004/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode132 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:132: WindowAndroid windowAndroid = mContentViewCore.getWindowAndroid(); On 2016/11/29 03:35:43, boliu_back_dec wrote: ...
4 years ago (2016-11-29 17:14:52 UTC) #21
boliu
lgtm https://codereview.chromium.org/2515343004/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java File android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java (right): https://codereview.chromium.org/2515343004/diff/100001/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java#newcode132 android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java:132: WindowAndroid windowAndroid = mContentViewCore.getWindowAndroid(); On 2016/11/29 17:14:52, Tima ...
4 years ago (2016-11-29 17:22:52 UTC) #22
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/2515343004/100001
4 years ago (2016-11-29 17:25:11 UTC) #24
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-11-29 17:44:51 UTC) #27
commit-bot: I haz the power
4 years ago (2016-11-29 17:47:09 UTC) #29
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/2d5570dfe70975e2697eeced6402430316572f80
Cr-Commit-Position: refs/heads/master@{#435025}

Powered by Google App Engine
This is Rietveld 408576698