summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/ValidationMessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/ValidationMessage.h')
-rw-r--r--Source/WebCore/html/ValidationMessage.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/WebCore/html/ValidationMessage.h b/Source/WebCore/html/ValidationMessage.h
index 6aec40d23..b9c26a564 100644
--- a/Source/WebCore/html/ValidationMessage.h
+++ b/Source/WebCore/html/ValidationMessage.h
@@ -28,12 +28,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ValidationMessage_h
-#define ValidationMessage_h
+#pragma once
#include "Timer.h"
+#include <memory>
#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/text/WTFString.h>
@@ -49,29 +48,27 @@ class ValidationMessageClient;
class ValidationMessage {
WTF_MAKE_NONCOPYABLE(ValidationMessage); WTF_MAKE_FAST_ALLOCATED;
public:
- static OwnPtr<ValidationMessage> create(HTMLFormControlElement*);
+ explicit ValidationMessage(HTMLFormControlElement*);
~ValidationMessage();
+
void updateValidationMessage(const String&);
void requestToHideMessage();
bool isVisible() const;
bool shadowTreeContains(const Node&) const;
private:
- explicit ValidationMessage(HTMLFormControlElement*);
ValidationMessageClient* validationMessageClient() const;
void setMessage(const String&);
- void setMessageDOMAndStartTimer(Timer<ValidationMessage>* = 0);
- void buildBubbleTree(Timer<ValidationMessage>*);
- void deleteBubbleTree(Timer<ValidationMessage>* = 0);
+ void setMessageDOMAndStartTimer();
+ void buildBubbleTree();
+ void deleteBubbleTree();
HTMLFormControlElement* m_element;
String m_message;
- OwnPtr<Timer<ValidationMessage>> m_timer;
+ std::unique_ptr<Timer> m_timer;
RefPtr<HTMLElement> m_bubble;
RefPtr<HTMLElement> m_messageHeading;
RefPtr<HTMLElement> m_messageBody;
};
} // namespace WebCore
-
-#endif // ValidationMessage_h