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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 330613002: Copying text closes the keyboard and the text input gets unfocused, forcing virtual keyboard is get… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed FrameSelection changes and making use of existing APIs for serving the requirement. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 55a2de14e016a97b880825cff2767081799e7554..9b3acf29c786c69bbac1c56b5918f1d13b74af96 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -1836,6 +1836,22 @@ void WebLocalFrameImpl::setFindEndstateFocusAndSelection()
}
}
+bool WebLocalFrameImpl::setCaretSelectionFromRangeSelection()
+{
+ if (!frame()->selection().rootEditableElement() || !frame()->selection().isRange())
+ return false;
+
+ // Collapse the selection to end of Range Selection.
+ WebRange currentSelectionRange = selectionRange();
+ if (RefPtrWillBeRawPtr<Range> range = static_cast<PassRefPtrWillBeRawPtr<Range> >(currentSelectionRange)) {
+ range->collapse(false);
+ selectRange(currentSelectionRange);
+ return true;
+ }
+
+ return false;
+}
+
void WebLocalFrameImpl::didFail(const ResourceError& error, bool wasProvisional)
{
if (!client())
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698