Merge "Can not mark the same content of browser page after copy"

This commit is contained in:
Victoria Lease
2013-04-26 17:17:39 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -137,7 +137,7 @@ class SelectActionModeCallback implements ActionMode.Callback {
@Override
public void onDestroyActionMode(ActionMode mode) {
mWebView.selectionDone();
mWebView.clearSelection();
}
private void setMenuVisibility(Menu menu, boolean visible, int resourceId) {

View File

@@ -4478,6 +4478,13 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
return selectText(x, y);
}
public void clearSelection() {
selectionDone();
if (mWebViewCore != null) {
mWebViewCore.sendMessage(EventHub.SELECT_TEXT, null);
}
}
/**
* Select the word at the indicated content coordinates.
*/
@@ -4495,7 +4502,7 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
public void onConfigurationChanged(Configuration newConfig) {
mCachedOverlappingActionModeHeight = -1;
if (mSelectingText && mOrientation != newConfig.orientation) {
selectionDone();
clearSelection();
}
mOrientation = newConfig.orientation;
if (mWebViewCore != null && !mBlockWebkitViewMessages) {