DescriptionRevert 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 #
Messages
Total messages: 12 (5 generated)
|