Chromium Code Reviews| 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 | |
|
haraken
2015/11/21 17:10:22
Maybe worth adding ASSERT(!m_datatimeChooser).
| |
| 54 } | |
| 55 | |
| 56 DEFINE_TRACE(BaseChooserOnlyDateAndTimeInputType) | |
| 57 { | |
| 58 visitor->trace(m_dateTimeChooser); | |
| 59 BaseDateAndTimeInputType::trace(visitor); | |
| 60 DateTimeChooserClient::trace(visitor); | |
| 44 } | 61 } |
| 45 | 62 |
| 46 void BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent(Event*) | 63 void BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent(Event*) |
| 47 { | 64 { |
| 48 if (element().isDisabledOrReadOnly() || !element().layoutObject() || !UserGe stureIndicator::processingUserGesture() || element().openShadowRoot()) | 65 if (element().isDisabledOrReadOnly() || !element().layoutObject() || !UserGe stureIndicator::processingUserGesture() || element().openShadowRoot()) |
| 49 return; | 66 return; |
| 50 | 67 |
| 51 if (m_dateTimeChooser) | 68 if (m_dateTimeChooser) |
| 52 return; | 69 return; |
| 53 if (!element().document().isActive()) | 70 if (!element().document().isActive()) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 143 } | 160 } |
| 144 | 161 |
| 145 void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents) | 162 void BaseChooserOnlyDateAndTimeInputType::accessKeyAction(bool sendMouseEvents) |
| 146 { | 163 { |
| 147 BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents); | 164 BaseDateAndTimeInputType::accessKeyAction(sendMouseEvents); |
| 148 BaseClickableWithKeyInputType::accessKeyAction(element(), sendMouseEvents); | 165 BaseClickableWithKeyInputType::accessKeyAction(element(), sendMouseEvents); |
| 149 } | 166 } |
| 150 | 167 |
| 151 } | 168 } |
| 152 #endif | 169 #endif |
| OLD | NEW |