Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: Source/core/html/track/TextTrackCue.cpp

Issue 970203005: Simplify TextTrackCue::isActive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/track/TextTrackCue.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackCue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698