The content layer shouldn't know so many details about the Android View system and WebView-specifics.
Make this an interface for adding and removing anchor views to be implemented by the embedder.
It also looks like the code might try to detect WebView vs. Chrome based on the View Layout in doSetAnchorViewPosition(), so the code is not even shared.
- Bo was also questioning the scroll adjustment logic offline.
- The support for changing container views is also specific to WebView.
- Furthermore it's questionable that using the old positioning info when moving to a new View is the right thing. Probably the popup would disappear anyway if you went fullscreen. (We tried html select on a tablet - since phone uses a modal dialog - with WebView and it did not work in general i.e. nothing showed up.)
Comment 1 by siev...@chromium.org
, Jun 6 2016