commit | 00d67fbec31ea9c007c872d7605303593c83101e | [log] [tgz] |
---|---|---|
author | Ben Murdoch <benm@google.com> | Tue Oct 15 16:20:05 2013 +0100 |
committer | Ben Murdoch <benm@google.com> | Fri Oct 18 10:51:14 2013 +0000 |
tree | d765803371fabc8553140fa37d1985d1de983cef | |
parent | 2cabbb3bae6df73db637a913562823306be613a8 [diff] |
Cherry pick [Android] Allow text handles to observe position of "parent" view Cherry pick of https://codereview.chromium.org/24449007/ Bug: 10892868 Bug: 10562149 Bug: 10723151 Original description: [Android] Allow text handles to observe position of "parent" view This adds the class PositionObserver. This class provides a way to listen for changes to the position of a particular view (and to query that views current position). Then, HandleView is updated to use a PositionObserver to keep its PopupWindow's position up-to-date with the logical "parent" view ( HandleView is logically a child of some other view, but has to use a PopupWindow outside of the logical parent's view hierarchy). This is similar to, and influenced by, Android's Editor.java (https://android.googlesource.com/platform/frameworks/base/+/android-4.3_r3.1/core/java/android/widget/Editor.java). BUG=b/10562149 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228594 Change-Id: Ifb8508628a716ee518227a289d89486d191cdced