| 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
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
| 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. | 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 virtual bool shouldDispatchFormControlChangeEvent(String&, String&); | 127 virtual bool shouldDispatchFormControlChangeEvent(String&, String&); |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 int computeSelectionStart() const; | 130 int computeSelectionStart() const; |
| 131 int computeSelectionEnd() const; | 131 int computeSelectionEnd() const; |
| 132 TextFieldSelectionDirection computeSelectionDirection() const; | 132 TextFieldSelectionDirection computeSelectionDirection() const; |
| 133 | 133 |
| 134 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE FINAL; | 134 virtual void dispatchFocusEvent(Element* oldFocusedElement, FocusType) OVERR
IDE FINAL; |
| 135 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE FINAL; | 135 virtual void dispatchBlurEvent(Element* newFocusedElement) OVERRIDE FINAL; |
| 136 virtual void dispatchFocusInEvent(const AtomicString& eventType, Element* ol
dFocusedElement, FocusType) OVERRIDE FINAL; |
| 136 | 137 |
| 137 // Returns true if user-editable value is empty. Used to check placeholder v
isibility. | 138 // Returns true if user-editable value is empty. Used to check placeholder v
isibility. |
| 138 virtual bool isEmptyValue() const = 0; | 139 virtual bool isEmptyValue() const = 0; |
| 139 // Returns true if suggested value is empty. Used to check placeholder visib
ility. | 140 // Returns true if suggested value is empty. Used to check placeholder visib
ility. |
| 140 virtual bool isEmptySuggestedValue() const { return true; } | 141 virtual bool isEmptySuggestedValue() const { return true; } |
| 141 // Called in dispatchFocusEvent(), after placeholder process, before calling
parent's dispatchFocusEvent(). | 142 // Called in dispatchFocusEvent(), after placeholder process, before calling
parent's dispatchFocusEvent(). |
| 142 virtual void handleFocusEvent(Element* /* oldFocusedNode */, FocusType) { } | 143 virtual void handleFocusEvent(Element* /* oldFocusedNode */, FocusType) { } |
| 143 // Called in dispatchBlurEvent(), after placeholder process, before calling
parent's dispatchBlurEvent(). | 144 // Called in dispatchBlurEvent(), after placeholder process, before calling
parent's dispatchBlurEvent(). |
| 144 virtual void handleBlurEvent() { } | 145 virtual void handleBlurEvent() { } |
| 146 // Called in dispatchFocusInEvent(), before calling parent's dispatchFocusIn
Event(). |
| 147 virtual void handleFocusInEvent(Element* /* oldFocusedNode */, FocusType) {
} |
| 145 | 148 |
| 146 String m_textAsOfLastFormControlChangeEvent; | 149 String m_textAsOfLastFormControlChangeEvent; |
| 147 bool m_lastChangeWasUserEdit; | 150 bool m_lastChangeWasUserEdit; |
| 148 | 151 |
| 149 int m_cachedSelectionStart; | 152 int m_cachedSelectionStart; |
| 150 int m_cachedSelectionEnd; | 153 int m_cachedSelectionEnd; |
| 151 TextFieldSelectionDirection m_cachedSelectionDirection; | 154 TextFieldSelectionDirection m_cachedSelectionDirection; |
| 152 }; | 155 }; |
| 153 | 156 |
| 154 inline bool isHTMLTextFormControlElement(const Element& element) | 157 inline bool isHTMLTextFormControlElement(const Element& element) |
| 155 { | 158 { |
| 156 return element.isTextFormControl(); | 159 return element.isTextFormControl(); |
| 157 } | 160 } |
| 158 | 161 |
| 159 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement); | 162 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLTextFormControlElement); |
| 160 | 163 |
| 161 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); | 164 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); |
| 162 HTMLTextFormControlElement* enclosingTextFormControl(Node*); | 165 HTMLTextFormControlElement* enclosingTextFormControl(Node*); |
| 163 | 166 |
| 164 } // namespace | 167 } // namespace |
| 165 | 168 |
| 166 #endif | 169 #endif |
| OLD | NEW |