summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/FormController.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/FormController.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/html/FormController.h')
-rw-r--r--Source/WebCore/html/FormController.h26
1 files changed, 10 insertions, 16 deletions
diff --git a/Source/WebCore/html/FormController.h b/Source/WebCore/html/FormController.h
index e146b64f6..92ad0e672 100644
--- a/Source/WebCore/html/FormController.h
+++ b/Source/WebCore/html/FormController.h
@@ -19,10 +19,9 @@
*
*/
-#ifndef FormController_h
-#define FormController_h
+#pragma once
-#include "CheckedRadioButtons.h"
+#include "RadioButtonGroups.h"
#include <wtf/Forward.h>
#include <wtf/ListHashSet.h>
#include <wtf/Vector.h>
@@ -74,13 +73,10 @@ inline void FormControlState::append(const String& value)
class FormController {
WTF_MAKE_FAST_ALLOCATED;
public:
- static OwnPtr<FormController> create()
- {
- return adoptPtr(new FormController);
- }
+ FormController();
~FormController();
- CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; }
+ RadioButtonGroups& radioButtonGroups() { return m_radioButtonGroups; }
void registerFormElementWithState(HTMLFormControlElementWithState*);
void unregisterFormElementWithState(HTMLFormControlElementWithState*);
@@ -95,22 +91,20 @@ public:
void restoreControlStateFor(HTMLFormControlElementWithState&);
void restoreControlStateIn(HTMLFormElement&);
- static Vector<String> getReferencedFilePaths(const Vector<String>& stateVector);
+ WEBCORE_EXPORT static Vector<String> getReferencedFilePaths(const Vector<String>& stateVector);
private:
- typedef ListHashSet<RefPtr<HTMLFormControlElementWithState>, 64> FormElementListHashSet;
- typedef HashMap<RefPtr<AtomicStringImpl>, OwnPtr<SavedFormState>> SavedFormStateMap;
+ typedef ListHashSet<RefPtr<HTMLFormControlElementWithState>> FormElementListHashSet;
+ typedef HashMap<RefPtr<AtomicStringImpl>, std::unique_ptr<SavedFormState>> SavedFormStateMap;
- FormController();
- static OwnPtr<SavedFormStateMap> createSavedFormStateMap(const FormElementListHashSet&);
+ static std::unique_ptr<SavedFormStateMap> createSavedFormStateMap(const FormElementListHashSet&);
FormControlState takeStateForFormElement(const HTMLFormControlElementWithState&);
static void formStatesFromStateVector(const Vector<String>&, SavedFormStateMap&);
- CheckedRadioButtons m_checkedRadioButtons;
+ RadioButtonGroups m_radioButtonGroups;
FormElementListHashSet m_formElementsWithState;
SavedFormStateMap m_savedFormStateMap;
- OwnPtr<FormKeyGenerator> m_formKeyGenerator;
+ std::unique_ptr<FormKeyGenerator> m_formKeyGenerator;
};
} // namespace WebCore
-#endif