Chromium Code Reviews| Index: Source/core/html/shadow/DateTimeEditElement.h |
| diff --git a/Source/core/html/shadow/DateTimeEditElement.h b/Source/core/html/shadow/DateTimeEditElement.h |
| index eb2c0a6e59c93bb1bdd1e3030c0ab211271c26b1..e169f40960db333805abb70a6c150f24ad60c8ab 100644 |
| --- a/Source/core/html/shadow/DateTimeEditElement.h |
| +++ b/Source/core/html/shadow/DateTimeEditElement.h |
| @@ -45,11 +45,12 @@ class StepRange; |
| // - Hour, Minute, Second, Millisecond, AM/PM |
| class DateTimeEditElement FINAL : public HTMLDivElement, public DateTimeFieldElement::FieldOwner { |
| WTF_MAKE_NONCOPYABLE(DateTimeEditElement); |
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(DateTimeEditElement); |
| public: |
| // EditControlOwner implementer must call removeEditControlOwner when |
| // it doesn't handle event, e.g. at destruction. |
| - class EditControlOwner { |
| + class EditControlOwner : public WillBeGarbageCollectedMixin { |
| public: |
| virtual ~EditControlOwner(); |
| virtual void didBlurFromControl() = 0; |
| @@ -80,10 +81,12 @@ public: |
| } |
| }; |
| - static PassRefPtr<DateTimeEditElement> create(Document&, EditControlOwner&); |
| + static PassRefPtrWillBeRawPtr<DateTimeEditElement> create(Document&, EditControlOwner&); |
| virtual ~DateTimeEditElement(); |
| - void addField(PassRefPtr<DateTimeFieldElement>); |
| + virtual void trace(Visitor*) OVERRIDE; |
| + |
| + void addField(PassRefPtrWillBeRawPtr<DateTimeFieldElement>); |
| bool anyEditableFieldsHaveValues() const; |
| void blurByOwner(); |
| virtual void defaultEventHandler(Event*) OVERRIDE; |
| @@ -95,7 +98,7 @@ public: |
| void focusByOwner(Element* oldFocusedElement = 0); |
| bool hasFocusedField(); |
| void readOnlyStateChanged(); |
| - void removeEditControlOwner() { m_editControlOwner = 0; } |
| + void removeEditControlOwner() { m_editControlOwner = nullptr; } |
| void resetFields(); |
| void setEmptyValue(const LayoutParameters&, const DateComponents& dateForReadOnlyField); |
| void setValueAsDate(const LayoutParameters&, const DateComponents&); |
| @@ -147,8 +150,8 @@ private: |
| virtual AtomicString localeIdentifier() const OVERRIDE; |
| virtual void fieldDidChangeValueByKeyboard() OVERRIDE; |
| - Vector<DateTimeFieldElement*, maximumNumberOfFields> m_fields; |
| - EditControlOwner* m_editControlOwner; |
| + WillBeHeapVector<RawPtrWillBeMember<DateTimeFieldElement>, maximumNumberOfFields> m_fields; |
| + RawPtrWillBeWeakMember<EditControlOwner> m_editControlOwner; |
|
Mads Ager (chromium)
2014/05/07 14:55:08
Can this be a Member instead of a WeakMember? I lo
tkent
2014/05/08 01:11:37
Right. It can be a Member. I'll make a CL.
It's
|
| }; |
| DEFINE_TYPE_CASTS(DateTimeEditElement, Element, element, element->isDateTimeEditElement(), element.isDateTimeEditElement()); |