OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
3 * | 3 * |
4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com> | 4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com> |
5 * Copyright (C) 2010 Apple Inc. All rights reserved. | 5 * Copyright (C) 2010 Apple Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 12 matching lines...) Expand all Loading... | |
23 | 23 |
24 #ifndef ValidityState_h | 24 #ifndef ValidityState_h |
25 #define ValidityState_h | 25 #define ValidityState_h |
26 | 26 |
27 #include "bindings/v8/ScriptWrappable.h" | 27 #include "bindings/v8/ScriptWrappable.h" |
28 #include "core/html/FormAssociatedElement.h" | 28 #include "core/html/FormAssociatedElement.h" |
29 #include "wtf/PassOwnPtr.h" | 29 #include "wtf/PassOwnPtr.h" |
30 | 30 |
31 namespace WebCore { | 31 namespace WebCore { |
32 | 32 |
33 class ValidityState : public ScriptWrappable { | 33 class ValidityState : public NoBaseWillBeGarbageCollectedFinalized<ValidityState >, public ScriptWrappable { |
zerny-chromium
2014/05/08 07:48:24
This can just be GarbageCollected<>
haraken
2014/05/08 08:00:33
Unfortunately no, due to ScriptWrappable :)
| |
34 WTF_MAKE_NONCOPYABLE(ValidityState); WTF_MAKE_FAST_ALLOCATED; | 34 WTF_MAKE_NONCOPYABLE(ValidityState); |
35 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | |
35 public: | 36 public: |
36 static PassOwnPtr<ValidityState> create(FormAssociatedElement* control) | 37 static PassOwnPtrWillBeRawPtr<ValidityState> create(FormAssociatedElement* c ontrol) |
37 { | 38 { |
38 return adoptPtr(new ValidityState(control)); | 39 return adoptPtrWillBeNoop(new ValidityState(control)); |
39 } | 40 } |
41 void trace(Visitor* visitor) { visitor->trace(m_control); } | |
40 | 42 |
43 #if !ENABLE(OILPAN) | |
41 void ref() { m_control->ref(); } | 44 void ref() { m_control->ref(); } |
42 void deref() { m_control->deref(); } | 45 void deref() { m_control->deref(); } |
46 #endif | |
43 | 47 |
44 String validationMessage() const; | 48 String validationMessage() const; |
45 | 49 |
46 void setCustomErrorMessage(const String&); | 50 void setCustomErrorMessage(const String&); |
47 | 51 |
48 bool valueMissing() const; | 52 bool valueMissing() const; |
49 bool typeMismatch() const; | 53 bool typeMismatch() const; |
50 bool patternMismatch() const; | 54 bool patternMismatch() const; |
51 bool tooLong() const; | 55 bool tooLong() const; |
52 bool rangeUnderflow() const; | 56 bool rangeUnderflow() const; |
53 bool rangeOverflow() const; | 57 bool rangeOverflow() const; |
54 bool stepMismatch() const; | 58 bool stepMismatch() const; |
55 bool badInput() const; | 59 bool badInput() const; |
56 bool customError() const; | 60 bool customError() const; |
57 bool valid() const; | 61 bool valid() const; |
58 | 62 |
59 private: | 63 private: |
60 ValidityState(FormAssociatedElement* control) : m_control(control) | 64 explicit ValidityState(FormAssociatedElement* control) : m_control(control) |
61 { | 65 { |
62 ScriptWrappable::init(this); | 66 ScriptWrappable::init(this); |
63 } | 67 } |
64 | 68 |
65 FormAssociatedElement* m_control; | 69 RawPtrWillBeMember<FormAssociatedElement> m_control; |
66 }; | 70 }; |
67 | 71 |
68 } // namespace WebCore | 72 } // namespace WebCore |
69 | 73 |
70 #endif // ValidityState_h | 74 #endif // ValidityState_h |
OLD | NEW |