Index: third_party/WebKit/Source/core/editing/DOMSelection.cpp |
diff --git a/third_party/WebKit/Source/core/editing/DOMSelection.cpp b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
index 07702b4d928d495df4253bb303f5b2e652da7bc2..ceb2bb8af05f1009d9d4d88b30510d1838e20744 100644 |
--- a/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
+++ b/third_party/WebKit/Source/core/editing/DOMSelection.cpp |
@@ -205,7 +205,9 @@ String DOMSelection::type() const { |
// http://msdn.microsoft.com/en-us/library/ms534692(VS.85).aspx |
if (rangeCount() == 0) |
return "None"; |
- if (isCollapsed()) |
+ // Do not use isCollapsed() here. We'd like to return "Range" for |
+ // range-selection in text control elements. |
+ if (GetFrame()->Selection().GetSelectionInDOMTree().IsCaret()) |
return "Caret"; |
return "Range"; |
} |