diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/FormController.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/FormController.h')
-rw-r--r-- | Source/WebCore/html/FormController.h | 26 |
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 |