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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 return false; | 141 return false; |
142 | 142 |
143 return EventTarget::dispatchEvent(event); | 143 return EventTarget::dispatchEvent(event); |
144 } | 144 } |
145 | 145 |
146 bool TextTrackCue::isActive() | 146 bool TextTrackCue::isActive() |
147 { | 147 { |
148 return m_isActive && track() && track()->mode() != TextTrack::disabledKeywor
d(); | 148 return m_isActive && track() && track()->mode() != TextTrack::disabledKeywor
d(); |
149 } | 149 } |
150 | 150 |
151 void TextTrackCue::setIsActive(bool active) | |
152 { | |
153 m_isActive = active; | |
154 | |
155 // Remove the display tree as soon as the cue becomes inactive. | |
156 if (!active) | |
157 removeDisplayTree(); | |
158 } | |
159 | |
160 const AtomicString& TextTrackCue::interfaceName() const | 151 const AtomicString& TextTrackCue::interfaceName() const |
161 { | 152 { |
162 return EventTargetNames::TextTrackCue; | 153 return EventTargetNames::TextTrackCue; |
163 } | 154 } |
164 | 155 |
165 DEFINE_TRACE(TextTrackCue) | 156 DEFINE_TRACE(TextTrackCue) |
166 { | 157 { |
167 visitor->trace(m_track); | 158 visitor->trace(m_track); |
168 EventTargetWithInlineData::trace(visitor); | 159 EventTargetWithInlineData::trace(visitor); |
169 } | 160 } |
170 | 161 |
171 } // namespace blink | 162 } // namespace blink |
OLD | NEW |