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

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

Issue 939193002: Remove TextTrackCue::notifyRegionWhenRemovingDisplayTree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Hoist removeDisplayTree-call from setIsActive. Created 5 years, 10 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') | Source/core/html/track/TextTrackCueList.cpp » ('j') | 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/html/track/TextTrackCue.h ('k') | Source/core/html/track/TextTrackCueList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698