OLD | NEW |
---|---|
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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
6 * reserved. | 6 * reserved. |
7 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 7 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
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 10 matching lines...) Expand all Loading... | |
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 #ifndef TextControlElement_h | 26 #ifndef TextControlElement_h |
27 #define TextControlElement_h | 27 #define TextControlElement_h |
28 | 28 |
29 #include "base/gtest_prod_util.h" | 29 #include "base/gtest_prod_util.h" |
30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
31 #include "core/editing/SelectionTemplate.h" | |
31 #include "core/editing/VisiblePosition.h" | 32 #include "core/editing/VisiblePosition.h" |
32 #include "core/html/HTMLFormControlElementWithState.h" | 33 #include "core/html/HTMLFormControlElementWithState.h" |
33 | |
34 namespace blink { | 34 namespace blink { |
Shanmuga Pandi
2017/03/14 14:31:48
Keep empty line as it is.
tanvir
2017/03/14 14:59:36
Done.
| |
35 | 35 |
36 class ExceptionState; | 36 class ExceptionState; |
37 class Range; | |
38 | 37 |
39 enum TextFieldSelectionDirection { | 38 enum TextFieldSelectionDirection { |
40 SelectionHasNoDirection, | 39 SelectionHasNoDirection, |
41 SelectionHasForwardDirection, | 40 SelectionHasForwardDirection, |
42 SelectionHasBackwardDirection | 41 SelectionHasBackwardDirection |
43 }; | 42 }; |
44 enum TextFieldEventBehavior { | 43 enum TextFieldEventBehavior { |
45 DispatchNoEvent, | 44 DispatchNoEvent, |
46 DispatchChangeEvent, | 45 DispatchChangeEvent, |
47 DispatchInputAndChangeEvent | 46 DispatchInputAndChangeEvent |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 // 'select' event. | 92 // 'select' event. |
94 void setSelectionRangeForBinding(unsigned start, | 93 void setSelectionRangeForBinding(unsigned start, |
95 unsigned end, | 94 unsigned end, |
96 const String& direction = "none"); | 95 const String& direction = "none"); |
97 // Blink-internal version of setSelectionRange(). This translates "none" | 96 // Blink-internal version of setSelectionRange(). This translates "none" |
98 // direction to "forward" on platforms without "none" direction. | 97 // direction to "forward" on platforms without "none" direction. |
99 // This returns true if it updated cached selection and/or FrameSelection. | 98 // This returns true if it updated cached selection and/or FrameSelection. |
100 bool setSelectionRange(unsigned start, | 99 bool setSelectionRange(unsigned start, |
101 unsigned end, | 100 unsigned end, |
102 TextFieldSelectionDirection = SelectionHasNoDirection); | 101 TextFieldSelectionDirection = SelectionHasNoDirection); |
103 Range* selection() const; | 102 const SelectionInDOMTree selection() const; |
104 | 103 |
105 virtual bool supportsAutocapitalize() const = 0; | 104 virtual bool supportsAutocapitalize() const = 0; |
106 virtual const AtomicString& defaultAutocapitalize() const = 0; | 105 virtual const AtomicString& defaultAutocapitalize() const = 0; |
107 const AtomicString& autocapitalize() const; | 106 const AtomicString& autocapitalize() const; |
108 void setAutocapitalize(const AtomicString&); | 107 void setAutocapitalize(const AtomicString&); |
109 | 108 |
110 int maxLength() const; | 109 int maxLength() const; |
111 int minLength() const; | 110 int minLength() const; |
112 void setMaxLength(int, ExceptionState&); | 111 void setMaxLength(int, ExceptionState&); |
113 void setMinLength(int, ExceptionState&); | 112 void setMinLength(int, ExceptionState&); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 } | 212 } |
214 | 213 |
215 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); | 214 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); |
216 | 215 |
217 TextControlElement* enclosingTextControl(const Position&); | 216 TextControlElement* enclosingTextControl(const Position&); |
218 TextControlElement* enclosingTextControl(const Node*); | 217 TextControlElement* enclosingTextControl(const Node*); |
219 | 218 |
220 } // namespace blink | 219 } // namespace blink |
221 | 220 |
222 #endif | 221 #endif |
OLD | NEW |