| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/dom/Document.h" | 31 #include "core/dom/Document.h" |
| 32 #include "core/dom/shadow/ShadowRoot.h" | 32 #include "core/dom/shadow/ShadowRoot.h" |
| 33 #include "core/frame/FrameHost.h" | 33 #include "core/frame/FrameHost.h" |
| 34 #include "core/html/HTMLDivElement.h" | 34 #include "core/html/HTMLDivElement.h" |
| 35 #include "core/html/HTMLInputElement.h" | 35 #include "core/html/HTMLInputElement.h" |
| 36 #include "core/page/ChromeClient.h" | 36 #include "core/page/ChromeClient.h" |
| 37 #include "platform/UserGestureIndicator.h" | 37 #include "platform/UserGestureIndicator.h" |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 BaseChooserOnlyDateAndTimeInputType::BaseChooserOnlyDateAndTimeInputType(HTMLInp
utElement& element) |
| 42 : BaseDateAndTimeInputType(element) |
| 43 { |
| 44 #if ENABLE(OILPAN) |
| 45 ThreadState::current()->registerPreFinalizer(this); |
| 46 #endif |
| 47 } |
| 48 |
| 41 BaseChooserOnlyDateAndTimeInputType::~BaseChooserOnlyDateAndTimeInputType() | 49 BaseChooserOnlyDateAndTimeInputType::~BaseChooserOnlyDateAndTimeInputType() |
| 42 { | 50 { |
| 51 #if !ENABLE(OILPAN) |
| 43 closeDateTimeChooser(); | 52 closeDateTimeChooser(); |
| 53 #endif |
| 54 ASSERT(!m_dateTimeChooser); |
| 55 } |
| 56 |
| 57 DEFINE_TRACE(BaseChooserOnlyDateAndTimeInputType) |
| 58 { |
| 59 visitor->trace(m_dateTimeChooser); |
| 60 BaseDateAndTimeInputType::trace(visitor); |
| 61 DateTimeChooserClient::trace(visitor); |
| 44 } | 62 } |
| 45 | 63 |
| 46 void BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent(Event*) | 64 void BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent(Event*) |
| 47 { | 65 { |
| 48 if (element().isDisabledOrReadOnly() || !element().layoutObject() || !UserGe
stureIndicator::processingUserGesture() || element().openShadowRoot()) | 66 if (element().isDisabledOrReadOnly() || !element().layoutObject() || !UserGe
stureIndicator::processingUserGesture() || element().openShadowRoot()) |
| 49 return; | 67 return; |
| 50 | 68 |
| 51 if (m_dateTimeChooser) | 69 if (m_dateTimeChooser) |
| 52 return; | 70 return; |
| 53 if (!element().document().isActive()) | 71 if (!element().document().isActive()) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 } | 161 } |
| 144 | 162 |
| 145 void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents) | 163 void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents) |
| 146 { | 164 { |
| 147 BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents); | 165 BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents); |
| 148 BaseClickableWithKeyInputType::accessKeyAction(element(), sendMouseEvents); | 166 BaseClickableWithKeyInputType::accessKeyAction(element(), sendMouseEvents); |
| 149 } | 167 } |
| 150 | 168 |
| 151 } | 169 } |
| 152 #endif | 170 #endif |
| OLD | NEW |