Chromium Code Reviews| Index: Source/core/html/HTMLTextFormControlElement.h |
| diff --git a/Source/core/html/HTMLTextFormControlElement.h b/Source/core/html/HTMLTextFormControlElement.h |
| index 906661dfbc87adbeddf081002595d84ecfed4abc..027bd1282b513be13926174055ded455a8c9d281 100644 |
| --- a/Source/core/html/HTMLTextFormControlElement.h |
| +++ b/Source/core/html/HTMLTextFormControlElement.h |
| @@ -68,8 +68,8 @@ public: |
| VisiblePosition visiblePositionForIndex(int) const; |
| int indexForVisiblePosition(const VisiblePosition&) const; |
| - int selectionStart() const; |
| - int selectionEnd() const; |
| + unsigned selectionStart() const; |
|
philipj_slow
2015/08/14 07:45:53
If you're changing this you should change it in th
tanay.c
2015/08/17 12:06:32
Modified the IDL and the handled the internal call
|
| + unsigned selectionEnd() const; |
| const AtomicString& selectionDirection() const; |
| void setSelectionStart(int); |
| void setSelectionEnd(int); |
| @@ -77,8 +77,8 @@ public: |
| void select(NeedToDispatchSelectEvent = DispatchSelectEvent); |
| virtual void setRangeText(const String& replacement, ExceptionState&); |
| virtual void setRangeText(const String& replacement, unsigned start, unsigned end, const String& selectionMode, ExceptionState&); |
| - void setSelectionRange(int start, int end, const String& direction); |
| - void setSelectionRange(int start, int end, TextFieldSelectionDirection = SelectionHasNoDirection, NeedToDispatchSelectEvent = DispatchSelectEvent, SelectionOption = ChangeSelection); |
| + void setSelectionRange(unsigned start, unsigned end, const String& direction); |
| + void setSelectionRange(unsigned start, unsigned end, TextFieldSelectionDirection = SelectionHasNoDirection, NeedToDispatchSelectEvent = DispatchSelectEvent, SelectionOption = ChangeSelection); |
| PassRefPtrWillBeRawPtr<Range> selection() const; |
| virtual bool supportsAutocapitalize() const = 0; |
| @@ -116,9 +116,8 @@ protected: |
| void parseAttribute(const QualifiedName&, const AtomicString&) override; |
| - void cacheSelection(int start, int end, TextFieldSelectionDirection direction) |
| + void cacheSelection(unsigned start, unsigned end, TextFieldSelectionDirection direction) |
| { |
| - ASSERT(start >= 0); |
| m_cachedSelectionStart = start; |
| m_cachedSelectionEnd = end; |
| m_cachedSelectionDirection = direction; |
| @@ -137,8 +136,8 @@ protected: |
| void copyNonAttributePropertiesFromElement(const Element&) override; |
| private: |
| - int computeSelectionStart() const; |
| - int computeSelectionEnd() const; |
| + unsigned computeSelectionStart() const; |
| + unsigned computeSelectionEnd() const; |
| TextFieldSelectionDirection computeSelectionDirection() const; |
| void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, InputDevice* sourceDevice) final; |
| @@ -157,8 +156,8 @@ private: |
| String m_textAsOfLastFormControlChangeEvent; |
| bool m_lastChangeWasUserEdit; |
| - int m_cachedSelectionStart; |
| - int m_cachedSelectionEnd; |
| + unsigned m_cachedSelectionStart; |
| + unsigned m_cachedSelectionEnd; |
| TextFieldSelectionDirection m_cachedSelectionDirection; |
| }; |