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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp

Issue 1734293002: TEXTAREA should not reset the caret position when it is focused by sequential focus navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/forms/focus-selection-textarea-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 Apple Inc. All rights reserv ed.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 236 }
237 237
238 bool HTMLTextAreaElement::shouldShowFocusRingOnMouseFocus() const 238 bool HTMLTextAreaElement::shouldShowFocusRingOnMouseFocus() const
239 { 239 {
240 return true; 240 return true;
241 } 241 }
242 242
243 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti onBehavior) 243 void HTMLTextAreaElement::updateFocusAppearance(SelectionBehaviorOnFocus selecti onBehavior)
244 { 244 {
245 switch (selectionBehavior) { 245 switch (selectionBehavior) {
246 case SelectionBehaviorOnFocus::Reset: 246 case SelectionBehaviorOnFocus::Reset: // Fallthrough.
247 setSelectionRange(0, 0, SelectionHasNoDirection, NotDispatchSelectEvent) ;
248 break;
249 case SelectionBehaviorOnFocus::Restore: 247 case SelectionBehaviorOnFocus::Restore:
250 restoreCachedSelection(); 248 restoreCachedSelection();
251 break; 249 break;
252 case SelectionBehaviorOnFocus::None: 250 case SelectionBehaviorOnFocus::None:
253 return; 251 return;
254 } 252 }
255 if (document().frame()) 253 if (document().frame())
256 document().frame()->selection().revealSelection(); 254 document().frame()->selection().revealSelection();
257 } 255 }
258 256
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 648
651 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s ource) 649 void HTMLTextAreaElement::copyNonAttributePropertiesFromElement(const Element& s ource)
652 { 650 {
653 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle ment&>(source); 651 const HTMLTextAreaElement& sourceElement = static_cast<const HTMLTextAreaEle ment&>(source);
654 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion); 652 setValueCommon(sourceElement.value(), DispatchNoEvent, SetSeletion);
655 m_isDirty = sourceElement.m_isDirty; 653 m_isDirty = sourceElement.m_isDirty;
656 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source); 654 HTMLTextFormControlElement::copyNonAttributePropertiesFromElement(source);
657 } 655 }
658 656
659 } // namespace blink 657 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/platform/win/fast/forms/focus-selection-textarea-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698