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

Issue 2776883002: Revert of Removed SelectionPopupController.invalidateActionMode() (Closed)

Created:
3 years, 9 months ago by amaralp
Modified:
3 years, 9 months ago
Reviewers:
Jinsuk Kim, boliu
CC:
agrieve+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, jam, Tima Vaisburd
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Removed SelectionPopupController.invalidateActionMode() (patchset #2 id:20001 of https://codereview.chromium.org/2767183002/ ) Reason for revert: For non-floating menu we should invalidate instead of destroying and creating. Original issue's description: > Removed SelectionPopupController.invalidateActionMode() > > I believe invalidateActionMode() is not necessary. The only callsite > for it is in showActionMode() and it is only called if > isActionModeValid() is true. The callsites for showActionMode() are: > > 1) SelectionPopupController.restoreSelectionPopupsIfNecessary which > only calls showActionMode() if isActionModeValid() is false. > Since showActionMode() won't call invalidateActionMode() if > isActionModeValid() is false this case can't result in a call. > > 2) ContentViewCore.showSelectActionMode() which in turn is only called > in ContentViewCore.onRotationChanged(). In onRotationChanged(), > showSelectActionMode() is called right after > hidePopupsAndPreserveSelection() which makes isActionModeValid() > false. Again this means that showActionMode() wont result result > in invalidateActionMode() being called. > > 3) SelectionPopupController.onSelectionEvent() when the event is > SELECTION_HANDLES_SHOWN. As far as I know SELECTION_HANDLES_SHOWN > should result in a new action mode since it means we have a new > selection. I can't think of a reason why we'd want to invalidate > instead of destroying the old action mode creating a new one. > > Review-Url: https://codereview.chromium.org/2767183002 > Cr-Commit-Position: refs/heads/master@{#458997} > Committed: https://chromium.googlesource.com/chromium/src/+/31843a5be08800e6bdf2a1f7c07eef342ad1abc6 TBR=boliu@chromium.org,jinsukkim@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. Review-Url: https://codereview.chromium.org/2776883002 Cr-Commit-Position: refs/heads/master@{#459839} Committed: https://chromium.googlesource.com/chromium/src/+/4755d3b46ddba3c81c6727275865d1968f528dc4

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -1 line) Patch
M content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java View 2 chunks +27 lines, -1 line 0 comments Download

Messages

Total messages: 12 (5 generated)
amaralp
Created Revert of Removed SelectionPopupController.invalidateActionMode()
3 years, 9 months ago (2017-03-25 02:32:18 UTC) #2
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/2776883002/1
3 years, 9 months ago (2017-03-25 02:32:36 UTC) #3
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 9 months ago (2017-03-25 02:32:37 UTC) #5
boliu
lgtm
3 years, 9 months ago (2017-03-25 21:17:00 UTC) #6
Jinsuk Kim
lgtm
3 years, 9 months ago (2017-03-27 03:05:03 UTC) #7
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/2776883002/1
3 years, 9 months ago (2017-03-27 17:51:17 UTC) #9
commit-bot: I haz the power
3 years, 9 months ago (2017-03-27 18:38:41 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/4755d3b46ddba3c81c6727275865...

Powered by Google App Engine
This is Rietveld 408576698