diff options
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 |