Index: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp |
index 635a6a487ce432ca1cd2996ac698d0a7e04cb093..6c1aa8c557ee8ff6b646fd86f13520fb7d85f9af 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp |
@@ -241,13 +241,16 @@ bool HTMLTextAreaElement::shouldShowFocusRingOnMouseFocus() const |
return true; |
} |
-void HTMLTextAreaElement::updateFocusAppearance(bool restorePreviousSelection) |
+void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selectionBehavior) |
{ |
- if (!restorePreviousSelection) |
+ switch (selectionBehavior) { |
+ case SelectionBehaviorOnFocus::Reset: |
setSelectionRange(0, 0, SelectionHasNoDirection, NotDispatchSelectEvent); |
- else |
+ break; |
+ case SelectionBehaviorOnFocus::Restore: |
restoreCachedSelection(); |
- |
+ break; |
+ } |
if (document().frame()) |
document().frame()->selection().revealSelection(); |
} |