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, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 m_values = another.m_values; | 64 m_values = another.m_values; |
65 return *this; | 65 return *this; |
66 } | 66 } |
67 | 67 |
68 inline void FormControlState::append(const String& value) | 68 inline void FormControlState::append(const String& value) |
69 { | 69 { |
70 m_type = TypeRestore; | 70 m_type = TypeRestore; |
71 m_values.append(value); | 71 m_values.append(value); |
72 } | 72 } |
73 | 73 |
74 typedef HashMap<AtomicString, OwnPtr<SavedFormState>> SavedFormStateMap; | 74 using SavedFormStateMap = HashMap<AtomicString, OwnPtr<SavedFormState>>; |
75 | 75 |
76 class DocumentState final : public RefCountedWillBeGarbageCollected<DocumentStat
e> { | 76 class DocumentState final : public RefCountedWillBeGarbageCollected<DocumentStat
e> { |
77 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentState); | 77 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentState); |
78 public: | 78 public: |
79 static PassRefPtrWillBeRawPtr<DocumentState> create(); | 79 static PassRefPtrWillBeRawPtr<DocumentState> create(); |
80 DECLARE_TRACE(); | 80 DECLARE_TRACE(); |
81 | 81 |
82 void addControl(HTMLFormControlElementWithState*); | 82 void addControl(HTMLFormControlElementWithState*); |
83 void removeControl(HTMLFormControlElementWithState*); | 83 void removeControl(HTMLFormControlElementWithState*); |
84 Vector<String> toStateVector(); | 84 Vector<String> toStateVector(); |
85 | 85 |
86 private: | 86 private: |
87 typedef WillBeHeapListHashSet<RefPtrWillBeMember<HTMLFormControlElementWithS
tate>, 64> FormElementListHashSet; | 87 using FormElementListHashSet = WillBeHeapListHashSet<RefPtrWillBeMember<HTML
FormControlElementWithState>, 64>; |
88 FormElementListHashSet m_formControls; | 88 FormElementListHashSet m_formControls; |
89 }; | 89 }; |
90 | 90 |
91 class FormController final : public NoBaseWillBeGarbageCollectedFinalized<FormCo
ntroller> { | 91 class FormController final : public NoBaseWillBeGarbageCollectedFinalized<FormCo
ntroller> { |
92 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 92 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
93 public: | 93 public: |
94 static PassOwnPtrWillBeRawPtr<FormController> create() | 94 static PassOwnPtrWillBeRawPtr<FormController> create() |
95 { | 95 { |
96 return adoptPtrWillBeNoop(new FormController); | 96 return adoptPtrWillBeNoop(new FormController); |
97 } | 97 } |
(...skipping 20 matching lines...) Expand all Loading... |
118 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); | 118 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); |
119 | 119 |
120 RadioButtonGroupScope m_radioButtonGroupScope; | 120 RadioButtonGroupScope m_radioButtonGroupScope; |
121 RefPtrWillBeMember<DocumentState> m_documentState; | 121 RefPtrWillBeMember<DocumentState> m_documentState; |
122 SavedFormStateMap m_savedFormStateMap; | 122 SavedFormStateMap m_savedFormStateMap; |
123 OwnPtrWillBeMember<FormKeyGenerator> m_formKeyGenerator; | 123 OwnPtrWillBeMember<FormKeyGenerator> m_formKeyGenerator; |
124 }; | 124 }; |
125 | 125 |
126 } // namespace blink | 126 } // namespace blink |
127 #endif | 127 #endif |
OLD | NEW |