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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 } | 67 } |
68 | 68 |
69 inline void FormControlState::append(const String& value) | 69 inline void FormControlState::append(const String& value) |
70 { | 70 { |
71 m_type = TypeRestore; | 71 m_type = TypeRestore; |
72 m_values.append(value); | 72 m_values.append(value); |
73 } | 73 } |
74 | 74 |
75 typedef HashMap<AtomicString, OwnPtr<SavedFormState> > SavedFormStateMap; | 75 typedef HashMap<AtomicString, OwnPtr<SavedFormState> > SavedFormStateMap; |
76 | 76 |
77 class DocumentState : public RefCountedWillBeGarbageCollectedFinalized<DocumentS
tate> { | 77 class DocumentState FINAL : public RefCountedWillBeGarbageCollected<DocumentStat
e> { |
| 78 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentState); |
78 public: | 79 public: |
79 static PassRefPtrWillBeRawPtr<DocumentState> create(); | 80 static PassRefPtrWillBeRawPtr<DocumentState> create(); |
80 ~DocumentState(); | |
81 void trace(Visitor*); | 81 void trace(Visitor*); |
82 | 82 |
83 void addControl(HTMLFormControlElementWithState*); | 83 void addControl(HTMLFormControlElementWithState*); |
84 void removeControl(HTMLFormControlElementWithState*); | 84 void removeControl(HTMLFormControlElementWithState*); |
85 Vector<String> toStateVector(); | 85 Vector<String> toStateVector(); |
86 | 86 |
87 private: | 87 private: |
88 typedef WillBeHeapListHashSet<RefPtrWillBeMember<HTMLFormControlElementWithS
tate>, 64> FormElementListHashSet; | 88 typedef WillBeHeapListHashSet<RefPtrWillBeMember<HTMLFormControlElementWithS
tate>, 64> FormElementListHashSet; |
89 FormElementListHashSet m_formControls; | 89 FormElementListHashSet m_formControls; |
90 }; | 90 }; |
91 | 91 |
92 class FormController : public NoBaseWillBeGarbageCollectedFinalized<FormControll
er> { | 92 class FormController FINAL : public NoBaseWillBeGarbageCollectedFinalized<FormCo
ntroller> { |
93 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 93 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
94 public: | 94 public: |
95 static PassOwnPtrWillBeRawPtr<FormController> create() | 95 static PassOwnPtrWillBeRawPtr<FormController> create() |
96 { | 96 { |
97 return adoptPtrWillBeNoop(new FormController); | 97 return adoptPtrWillBeNoop(new FormController); |
98 } | 98 } |
99 ~FormController(); | 99 ~FormController(); |
100 void trace(Visitor*); | 100 void trace(Visitor*); |
101 | 101 |
102 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } | 102 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } |
(...skipping 16 matching lines...) Expand all Loading... |
119 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); | 119 static void formStatesFromStateVector(const Vector<String>&, SavedFormStateM
ap&); |
120 | 120 |
121 RadioButtonGroupScope m_radioButtonGroupScope; | 121 RadioButtonGroupScope m_radioButtonGroupScope; |
122 RefPtrWillBeMember<DocumentState> m_documentState; | 122 RefPtrWillBeMember<DocumentState> m_documentState; |
123 SavedFormStateMap m_savedFormStateMap; | 123 SavedFormStateMap m_savedFormStateMap; |
124 OwnPtr<FormKeyGenerator> m_formKeyGenerator; | 124 OwnPtr<FormKeyGenerator> m_formKeyGenerator; |
125 }; | 125 }; |
126 | 126 |
127 } // namespace WebCore | 127 } // namespace WebCore |
128 #endif | 128 #endif |
OLD | NEW |