| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 | 139 |
| 140 bool TextTrackCue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) | 140 bool TextTrackCue::dispatchEvent(PassRefPtrWillBeRawPtr<Event> event) |
| 141 { | 141 { |
| 142 // When a TextTrack's mode is disabled: no cues are active, no events fired. | 142 // When a TextTrack's mode is disabled: no cues are active, no events fired. |
| 143 if (!track() || track()->mode() == TextTrack::disabledKeyword()) | 143 if (!track() || track()->mode() == TextTrack::disabledKeyword()) |
| 144 return false; | 144 return false; |
| 145 | 145 |
| 146 return EventTarget::dispatchEvent(event); | 146 return EventTarget::dispatchEvent(event); |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool TextTrackCue::isActive() | |
| 150 { | |
| 151 return m_isActive && track() && track()->mode() != TextTrack::disabledKeywor
d(); | |
| 152 } | |
| 153 | |
| 154 const AtomicString& TextTrackCue::interfaceName() const | 149 const AtomicString& TextTrackCue::interfaceName() const |
| 155 { | 150 { |
| 156 return EventTargetNames::TextTrackCue; | 151 return EventTargetNames::TextTrackCue; |
| 157 } | 152 } |
| 158 | 153 |
| 159 DEFINE_TRACE(TextTrackCue) | 154 DEFINE_TRACE(TextTrackCue) |
| 160 { | 155 { |
| 161 visitor->trace(m_track); | 156 visitor->trace(m_track); |
| 162 EventTargetWithInlineData::trace(visitor); | 157 EventTargetWithInlineData::trace(visitor); |
| 163 } | 158 } |
| 164 | 159 |
| 165 } // namespace blink | 160 } // namespace blink |
| OLD | NEW |