Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h |
| diff --git a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h |
| index b4e03dfba403de8dae408db3ade09efab1ee7c6e..aa19fe4631a779202e9d78b9303ef476f0646d72 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h |
| +++ b/third_party/WebKit/Source/core/html/HTMLTextFormControlElement.h |
| @@ -115,14 +115,6 @@ protected: |
| void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicString&) override; |
| - void cacheSelection(int start, int end, TextFieldSelectionDirection direction) |
| - { |
| - DCHECK_GE(start, 0); |
| - m_cachedSelectionStart = start; |
| - m_cachedSelectionEnd = end; |
| - m_cachedSelectionDirection = direction; |
| - } |
| - |
| void restoreCachedSelection(); |
| void defaultEventHandler(Event*) override; |
| @@ -139,6 +131,13 @@ private: |
| int computeSelectionStart() const; |
| int computeSelectionEnd() const; |
| TextFieldSelectionDirection computeSelectionDirection() const; |
| + void cacheSelection(int start, int end, TextFieldSelectionDirection direction) |
| + { |
| + DCHECK_GE(start, 0); |
| + m_cachedSelectionStart = start; |
|
yosin_UTC9
2016/08/25 08:10:22
nit: Could you add |DCHECK_LE(start, end)|?
tkent
2016/08/25 09:12:40
Done.
tkent
2016/08/25 10:21:03
editing/selection/select-across-readonly-input-1.h
|
| + m_cachedSelectionEnd = end; |
| + m_cachedSelectionDirection = direction; |
| + } |
| void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDeviceCapabilities* sourceCapabilities) final; |
| void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, InputDeviceCapabilities* sourceCapabilities) final; |