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) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 << "setValueBeforeFirstUserEditIfNotSet should be called beforehand."; | 205 << "setValueBeforeFirstUserEditIfNotSet should be called beforehand."; |
206 String non_null_value = value.IsNull() ? g_empty_string : value; | 206 String non_null_value = value.IsNull() ? g_empty_string : value; |
207 if (value_before_first_user_edit_ == non_null_value) | 207 if (value_before_first_user_edit_ == non_null_value) |
208 ClearValueBeforeFirstUserEdit(); | 208 ClearValueBeforeFirstUserEdit(); |
209 } | 209 } |
210 | 210 |
211 void TextControlElement::ClearValueBeforeFirstUserEdit() { | 211 void TextControlElement::ClearValueBeforeFirstUserEdit() { |
212 value_before_first_user_edit_ = String(); | 212 value_before_first_user_edit_ = String(); |
213 } | 213 } |
214 | 214 |
215 void TextControlElement::SetFocused(bool flag, WebFocusType focus_type) { | 215 void TextControlElement::SetFocused(bool flag, |
216 HTMLFormControlElementWithState::SetFocused(flag, focus_type); | 216 WebFocusType focus_type, |
| 217 Node* common_ancestor) { |
| 218 HTMLFormControlElementWithState::SetFocused(flag, focus_type, |
| 219 common_ancestor); |
217 | 220 |
218 if (!flag) | 221 if (!flag) |
219 DispatchFormControlChangeEvent(); | 222 DispatchFormControlChangeEvent(); |
220 } | 223 } |
221 | 224 |
222 void TextControlElement::DispatchFormControlChangeEvent() { | 225 void TextControlElement::DispatchFormControlChangeEvent() { |
223 if (!value_before_first_user_edit_.IsNull() && | 226 if (!value_before_first_user_edit_.IsNull() && |
224 !EqualIgnoringNullity(value_before_first_user_edit_, value())) { | 227 !EqualIgnoringNullity(value_before_first_user_edit_, value())) { |
225 ClearValueBeforeFirstUserEdit(); | 228 ClearValueBeforeFirstUserEdit(); |
226 DispatchChangeEvent(); | 229 DispatchChangeEvent(); |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 962 |
960 void TextControlElement::CopyNonAttributePropertiesFromElement( | 963 void TextControlElement::CopyNonAttributePropertiesFromElement( |
961 const Element& source) { | 964 const Element& source) { |
962 const TextControlElement& source_element = | 965 const TextControlElement& source_element = |
963 static_cast<const TextControlElement&>(source); | 966 static_cast<const TextControlElement&>(source); |
964 last_change_was_user_edit_ = source_element.last_change_was_user_edit_; | 967 last_change_was_user_edit_ = source_element.last_change_was_user_edit_; |
965 HTMLFormControlElement::CopyNonAttributePropertiesFromElement(source); | 968 HTMLFormControlElement::CopyNonAttributePropertiesFromElement(source); |
966 } | 969 } |
967 | 970 |
968 } // namespace blink | 971 } // namespace blink |
OLD | NEW |