| 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 3296ed44fca660a76f2a77dcfda3a3103a3cd807..90dc0379be7f40986f8fb36f15287371557c8b2b 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";
|
| }
|
|
|