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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1686063002: Remove unnecessary variable HTMLMediaElement::m_haveVisibleTextTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 , m_autoplaying(true) 317 , m_autoplaying(true)
318 , m_muted(false) 318 , m_muted(false)
319 , m_paused(true) 319 , m_paused(true)
320 , m_seeking(false) 320 , m_seeking(false)
321 , m_sentStalledEvent(false) 321 , m_sentStalledEvent(false)
322 , m_sentEndEvent(false) 322 , m_sentEndEvent(false)
323 , m_closedCaptionsVisible(false) 323 , m_closedCaptionsVisible(false)
324 , m_completelyLoaded(false) 324 , m_completelyLoaded(false)
325 , m_havePreparedToPlay(false) 325 , m_havePreparedToPlay(false)
326 , m_tracksAreReady(true) 326 , m_tracksAreReady(true)
327 , m_haveVisibleTextTrack(false)
328 , m_processingPreferenceChange(false) 327 , m_processingPreferenceChange(false)
329 , m_remoteRoutesAvailable(false) 328 , m_remoteRoutesAvailable(false)
330 , m_playingRemotely(false) 329 , m_playingRemotely(false)
331 , m_isFinalizing(false) 330 , m_isFinalizing(false)
332 , m_initialPlayWithoutUserGesture(false) 331 , m_initialPlayWithoutUserGesture(false)
333 , m_autoplayMediaCounted(false) 332 , m_autoplayMediaCounted(false)
334 , m_inOverlayFullscreenVideo(false) 333 , m_inOverlayFullscreenVideo(false)
335 , m_audioTracks(AudioTrackList::create(*this)) 334 , m_audioTracks(AudioTrackList::create(*this))
336 , m_videoTracks(VideoTrackList::create(*this)) 335 , m_videoTracks(VideoTrackList::create(*this))
337 , m_textTracks(nullptr) 336 , m_textTracks(nullptr)
(...skipping 3018 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 } 3355 }
3357 3356
3358 void HTMLMediaElement::configureTextTrackDisplay() 3357 void HTMLMediaElement::configureTextTrackDisplay()
3359 { 3358 {
3360 ASSERT(m_textTracks); 3359 ASSERT(m_textTracks);
3361 WTF_LOG(Media, "HTMLMediaElement::configureTextTrackDisplay(%p)", this); 3360 WTF_LOG(Media, "HTMLMediaElement::configureTextTrackDisplay(%p)", this);
3362 3361
3363 if (m_processingPreferenceChange) 3362 if (m_processingPreferenceChange)
3364 return; 3363 return;
3365 3364
3366 m_haveVisibleTextTrack = m_textTracks->hasShowingTracks(); 3365 bool haveVisibleTextTrack = m_textTracks->hasShowingTracks();
3367 m_closedCaptionsVisible = m_haveVisibleTextTrack; 3366 m_closedCaptionsVisible = haveVisibleTextTrack;
3368 3367
3369 if (!m_haveVisibleTextTrack && !mediaControls()) 3368 if (!haveVisibleTextTrack && !mediaControls())
Srirama 2016/02/10 12:50:50 Local variable can be removed and use m_closedCapt
fs 2016/02/10 14:29:34 I don't mind either way. I think I agree that usin
philipj_slow 2016/02/11 14:41:38 WFM too
3370 return; 3369 return;
3371 3370
3372 if (mediaControls()) 3371 if (mediaControls())
3373 mediaControls()->changedClosedCaptionsVisibility(); 3372 mediaControls()->changedClosedCaptionsVisibility();
3374 3373
3375 cueTimeline().updateActiveCues(currentTime()); 3374 cueTimeline().updateActiveCues(currentTime());
3376 3375
3377 // Note: The "time marches on" algorithm (updateActiveCues) runs the "rules 3376 // Note: The "time marches on" algorithm (updateActiveCues) runs the "rules
3378 // for updating the text track rendering" (updateTextTrackDisplay) only for 3377 // for updating the text track rendering" (updateTextTrackDisplay) only for
3379 // "affected tracks", i.e. tracks where the the active cues have changed. 3378 // "affected tracks", i.e. tracks where the the active cues have changed.
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
3624 { 3623 {
3625 visitor->trace(m_client); 3624 visitor->trace(m_client);
3626 } 3625 }
3627 3626
3628 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3627 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3629 { 3628 {
3630 visitor->trace(m_client); 3629 visitor->trace(m_client);
3631 } 3630 }
3632 3631
3633 } // namespace blink 3632 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698