OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 , m_popup(0) | 61 , m_popup(0) |
62 { | 62 { |
63 setShadowPseudoId("-webkit-calendar-picker-indicator"); | 63 setShadowPseudoId("-webkit-calendar-picker-indicator"); |
64 } | 64 } |
65 | 65 |
66 PassRefPtr<CalendarPickerElement> CalendarPickerElement::create(Document* docume
nt) | 66 PassRefPtr<CalendarPickerElement> CalendarPickerElement::create(Document* docume
nt) |
67 { | 67 { |
68 return adoptRef(new CalendarPickerElement(document)); | 68 return adoptRef(new CalendarPickerElement(document)); |
69 } | 69 } |
70 | 70 |
| 71 CalendarPickerElement::~CalendarPickerElement() |
| 72 { |
| 73 closePopup(); |
| 74 ASSERT(!m_popup); |
| 75 } |
| 76 |
71 RenderObject* CalendarPickerElement::createRenderer(RenderArena* arena, RenderSt
yle*) | 77 RenderObject* CalendarPickerElement::createRenderer(RenderArena* arena, RenderSt
yle*) |
72 { | 78 { |
73 return new (arena) RenderDetailsMarker(this); | 79 return new (arena) RenderDetailsMarker(this); |
74 } | 80 } |
75 | 81 |
76 inline HTMLInputElement* CalendarPickerElement::hostInput() | 82 inline HTMLInputElement* CalendarPickerElement::hostInput() |
77 { | 83 { |
78 ASSERT(shadowAncestorNode()); | 84 ASSERT(shadowAncestorNode()); |
79 ASSERT(shadowAncestorNode()->hasTagName(inputTag)); | 85 ASSERT(shadowAncestorNode()->hasTagName(inputTag)); |
80 return static_cast<HTMLInputElement*>(shadowAncestorNode()); | 86 return static_cast<HTMLInputElement*>(shadowAncestorNode()); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 250 } |
245 | 251 |
246 void CalendarPickerElement::didClosePopup() | 252 void CalendarPickerElement::didClosePopup() |
247 { | 253 { |
248 m_popup = 0; | 254 m_popup = 0; |
249 } | 255 } |
250 | 256 |
251 } | 257 } |
252 | 258 |
253 #endif | 259 #endif |
OLD | NEW |