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

Side by Side Diff: Source/core/html/shadow/MediaControls.cpp

Issue 847493002: Simplify insertion of text track container (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | « no previous file | 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, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Google 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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 void MediaControls::createTextTrackDisplay() 535 void MediaControls::createTextTrackDisplay()
536 { 536 {
537 if (m_textDisplayContainer) 537 if (m_textDisplayContainer)
538 return; 538 return;
539 539
540 RefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> textDisplayContain er = MediaControlTextTrackContainerElement::create(*this); 540 RefPtrWillBeRawPtr<MediaControlTextTrackContainerElement> textDisplayContain er = MediaControlTextTrackContainerElement::create(*this);
541 m_textDisplayContainer = textDisplayContainer.get(); 541 m_textDisplayContainer = textDisplayContainer.get();
542 542
543 // Insert it before (behind) all other control elements. 543 // Insert it before (behind) all other control elements.
544 if (m_overlayPlayButton) 544 m_overlayEnclosure->insertBefore(textDisplayContainer.release(), m_overlayEn closure->firstChild());
545 m_overlayEnclosure->insertBefore(textDisplayContainer.release(), m_overl ayPlayButton);
546 else
547 m_overlayEnclosure->insertBefore(textDisplayContainer.release(), m_overl ayCastButton);
548 } 545 }
549 546
550 void MediaControls::showTextTrackDisplay() 547 void MediaControls::showTextTrackDisplay()
551 { 548 {
552 if (!m_textDisplayContainer) 549 if (!m_textDisplayContainer)
553 createTextTrackDisplay(); 550 createTextTrackDisplay();
554 m_textDisplayContainer->show(); 551 m_textDisplayContainer->show();
555 } 552 }
556 553
557 void MediaControls::hideTextTrackDisplay() 554 void MediaControls::hideTextTrackDisplay()
(...skipping 26 matching lines...) Expand all
584 visitor->trace(m_toggleClosedCaptionsButton); 581 visitor->trace(m_toggleClosedCaptionsButton);
585 visitor->trace(m_fullScreenButton); 582 visitor->trace(m_fullScreenButton);
586 visitor->trace(m_durationDisplay); 583 visitor->trace(m_durationDisplay);
587 visitor->trace(m_enclosure); 584 visitor->trace(m_enclosure);
588 visitor->trace(m_castButton); 585 visitor->trace(m_castButton);
589 visitor->trace(m_overlayCastButton); 586 visitor->trace(m_overlayCastButton);
590 HTMLDivElement::trace(visitor); 587 HTMLDivElement::trace(visitor);
591 } 588 }
592 589
593 } 590 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698