| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef FormController_h | 22 #ifndef FormController_h |
| 23 #define FormController_h | 23 #define FormController_h |
| 24 | 24 |
| 25 #include "core/html/forms/RadioButtonGroupScope.h" | 25 #include "core/html/forms/RadioButtonGroupScope.h" |
| 26 #include "platform/heap/Handle.h" | 26 #include "platform/heap/Handle.h" |
| 27 #include "wtf/Allocator.h" |
| 27 #include "wtf/Forward.h" | 28 #include "wtf/Forward.h" |
| 28 #include "wtf/ListHashSet.h" | 29 #include "wtf/ListHashSet.h" |
| 29 #include "wtf/Vector.h" | 30 #include "wtf/Vector.h" |
| 30 #include "wtf/text/AtomicStringHash.h" | 31 #include "wtf/text/AtomicStringHash.h" |
| 31 | 32 |
| 32 namespace blink { | 33 namespace blink { |
| 33 | 34 |
| 34 class FormKeyGenerator; | 35 class FormKeyGenerator; |
| 35 class HTMLFormControlElementWithState; | 36 class HTMLFormControlElementWithState; |
| 36 class HTMLFormElement; | 37 class HTMLFormElement; |
| 37 class SavedFormState; | 38 class SavedFormState; |
| 38 | 39 |
| 39 class FormControlState { | 40 class FormControlState { |
| 41 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 40 public: | 42 public: |
| 41 FormControlState() : m_type(TypeSkip) { } | 43 FormControlState() : m_type(TypeSkip) { } |
| 42 explicit FormControlState(const String& value) : m_type(TypeRestore) { m_val
ues.append(value); } | 44 explicit FormControlState(const String& value) : m_type(TypeRestore) { m_val
ues.append(value); } |
| 43 static FormControlState deserialize(const Vector<String>& stateVector, size_
t& index); | 45 static FormControlState deserialize(const Vector<String>& stateVector, size_
t& index); |
| 44 FormControlState(const FormControlState& another) : m_type(another.m_type),
m_values(another.m_values) { } | 46 FormControlState(const FormControlState& another) : m_type(another.m_type),
m_values(another.m_values) { } |
| 45 FormControlState& operator=(const FormControlState&); | 47 FormControlState& operator=(const FormControlState&); |
| 46 | 48 |
| 47 bool isFailure() const { return m_type == TypeFailure; } | 49 bool isFailure() const { return m_type == TypeFailure; } |
| 48 size_t valueSize() const { return m_values.size(); } | 50 size_t valueSize() const { return m_values.size(); } |
| 49 const String& operator[](size_t i) const { return m_values[i]; } | 51 const String& operator[](size_t i) const { return m_values[i]; } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); | 120 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); |
| 119 | 121 |
| 120 RadioButtonGroupScope m_radioButtonGroupScope; | 122 RadioButtonGroupScope m_radioButtonGroupScope; |
| 121 RefPtrWillBeMember<DocumentState> m_documentState; | 123 RefPtrWillBeMember<DocumentState> m_documentState; |
| 122 SavedFormStateMap m_savedFormStateMap; | 124 SavedFormStateMap m_savedFormStateMap; |
| 123 OwnPtrWillBeMember<FormKeyGenerator> m_formKeyGenerator; | 125 OwnPtrWillBeMember<FormKeyGenerator> m_formKeyGenerator; |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace blink | 128 } // namespace blink |
| 127 #endif | 129 #endif |
| OLD | NEW |