| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 void cacheSelection(unsigned start, | 163 void cacheSelection(unsigned start, |
| 164 unsigned end, | 164 unsigned end, |
| 165 TextFieldSelectionDirection direction) { | 165 TextFieldSelectionDirection direction) { |
| 166 DCHECK_LE(start, end); | 166 DCHECK_LE(start, end); |
| 167 m_cachedSelectionStart = start; | 167 m_cachedSelectionStart = start; |
| 168 m_cachedSelectionEnd = end; | 168 m_cachedSelectionEnd = end; |
| 169 m_cachedSelectionDirection = direction; | 169 m_cachedSelectionDirection = direction; |
| 170 } | 170 } |
| 171 static unsigned indexForPosition(HTMLElement* innerEditor, const Position&); | 171 static unsigned indexForPosition(HTMLElement* innerEditor, const Position&); |
| 172 | 172 |
| 173 void dispatchFocusEvent(Element* oldFocusedElement, | 173 void dispatchFocusEvent( |
| 174 WebFocusType, | 174 Element* oldFocusedElement, |
| 175 InputDeviceCapabilities* sourceCapabilities) final; | 175 WebFocusType, |
| 176 void dispatchBlurEvent(Element* newFocusedElement, | 176 const InputDeviceCapabilitiesValue& sourceCapabilities) final; |
| 177 WebFocusType, | 177 void dispatchBlurEvent( |
| 178 InputDeviceCapabilities* sourceCapabilities) final; | 178 Element* newFocusedElement, |
| 179 WebFocusType, |
| 180 const InputDeviceCapabilitiesValue& sourceCapabilities) final; |
| 179 void scheduleSelectEvent(); | 181 void scheduleSelectEvent(); |
| 180 | 182 |
| 181 // Returns true if user-editable value is empty. Used to check placeholder | 183 // Returns true if user-editable value is empty. Used to check placeholder |
| 182 // visibility. | 184 // visibility. |
| 183 virtual bool isEmptyValue() const = 0; | 185 virtual bool isEmptyValue() const = 0; |
| 184 // Returns true if suggested value is empty. Used to check placeholder | 186 // Returns true if suggested value is empty. Used to check placeholder |
| 185 // visibility. | 187 // visibility. |
| 186 virtual bool isEmptySuggestedValue() const { return true; } | 188 virtual bool isEmptySuggestedValue() const { return true; } |
| 187 // Called in dispatchFocusEvent(), after placeholder process, before calling | 189 // Called in dispatchFocusEvent(), after placeholder process, before calling |
| 188 // parent's dispatchFocusEvent(). | 190 // parent's dispatchFocusEvent(). |
| (...skipping 20 matching lines...) Expand all Loading... |
| 209 } | 211 } |
| 210 | 212 |
| 211 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); | 213 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); |
| 212 | 214 |
| 213 TextControlElement* enclosingTextControl(const Position&); | 215 TextControlElement* enclosingTextControl(const Position&); |
| 214 TextControlElement* enclosingTextControl(const Node*); | 216 TextControlElement* enclosingTextControl(const Node*); |
| 215 | 217 |
| 216 } // namespace blink | 218 } // namespace blink |
| 217 | 219 |
| 218 #endif | 220 #endif |
| OLD | NEW |