Chromium Code Reviews| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 void defaultEventHandler(Event*) override; | 149 void defaultEventHandler(Event*) override; |
| 150 virtual void subtreeHasChanged() = 0; | 150 virtual void subtreeHasChanged() = 0; |
| 151 | 151 |
| 152 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; } | 152 void setLastChangeWasNotUserEdit() { m_lastChangeWasUserEdit = false; } |
| 153 void addPlaceholderBreakElementIfNecessary(); | 153 void addPlaceholderBreakElementIfNecessary(); |
| 154 String valueWithHardLineBreaks() const; | 154 String valueWithHardLineBreaks() const; |
| 155 | 155 |
| 156 virtual bool shouldDispatchFormControlChangeEvent(String&, String&); | 156 virtual bool shouldDispatchFormControlChangeEvent(String&, String&); |
| 157 void copyNonAttributePropertiesFromElement(const Element&) override; | 157 void copyNonAttributePropertiesFromElement(const Element&) override; |
| 158 | 158 |
| 159 void attributeChanged(const AttributeModificationParams&) override; | |
|
tkent
2017/02/06 23:28:07
You don't need to override |attributeChanged|. You
Manuel Rego
2017/02/07 10:26:24
Done.
| |
| 160 | |
| 159 private: | 161 private: |
| 160 int computeSelectionStart() const; | 162 int computeSelectionStart() const; |
| 161 int computeSelectionEnd() const; | 163 int computeSelectionEnd() const; |
| 162 TextFieldSelectionDirection computeSelectionDirection() const; | 164 TextFieldSelectionDirection computeSelectionDirection() const; |
| 163 void cacheSelection(int start, | 165 void cacheSelection(int start, |
| 164 int end, | 166 int end, |
| 165 TextFieldSelectionDirection direction) { | 167 TextFieldSelectionDirection direction) { |
| 166 DCHECK_GE(start, 0); | 168 DCHECK_GE(start, 0); |
| 167 DCHECK_LE(start, end); | 169 DCHECK_LE(start, end); |
| 168 m_cachedSelectionStart = start; | 170 m_cachedSelectionStart = start; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 } | 212 } |
| 211 | 213 |
| 212 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); | 214 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(TextControlElement); |
| 213 | 215 |
| 214 TextControlElement* enclosingTextControl(const Position&); | 216 TextControlElement* enclosingTextControl(const Position&); |
| 215 TextControlElement* enclosingTextControl(const Node*); | 217 TextControlElement* enclosingTextControl(const Node*); |
| 216 | 218 |
| 217 } // namespace blink | 219 } // namespace blink |
| 218 | 220 |
| 219 #endif | 221 #endif |
| OLD | NEW |