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

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

Issue 18205009: Introduce isHTMLVideoElement and toHTMLVideoElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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 | « Source/core/html/MediaDocument.cpp ('k') | Source/core/rendering/HitTestResult.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) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 688 }
689 689
690 HTMLMediaElement* mediaElement = toParentMediaElement(this); 690 HTMLMediaElement* mediaElement = toParentMediaElement(this);
691 // 1. If the media element is an audio element, or is another playback 691 // 1. If the media element is an audio element, or is another playback
692 // mechanism with no rendering area, abort these steps. There is nothing to 692 // mechanism with no rendering area, abort these steps. There is nothing to
693 // render. 693 // render.
694 if (!mediaElement || !mediaElement->isVideo()) 694 if (!mediaElement || !mediaElement->isVideo())
695 return; 695 return;
696 696
697 // 2. Let video be the media element or other playback mechanism. 697 // 2. Let video be the media element or other playback mechanism.
698 HTMLVideoElement* video = static_cast<HTMLVideoElement*>(mediaElement); 698 HTMLVideoElement* video = toHTMLVideoElement(mediaElement);
699 699
700 // 3. Let output be an empty list of absolutely positioned CSS block boxes. 700 // 3. Let output be an empty list of absolutely positioned CSS block boxes.
701 Vector<RefPtr<HTMLDivElement> > output; 701 Vector<RefPtr<HTMLDivElement> > output;
702 702
703 // 4. If the user agent is exposing a user interface for video, add to 703 // 4. If the user agent is exposing a user interface for video, add to
704 // output one or more completely transparent positioned CSS block boxes that 704 // output one or more completely transparent positioned CSS block boxes that
705 // cover the same region as the user interface. 705 // cover the same region as the user interface.
706 706
707 // 5. If the last time these rules were run, the user agent was not exposing 707 // 5. If the last time these rules were run, the user agent was not exposing
708 // a user interface for video, but now it is, let reset be true. Otherwise, 708 // a user interface for video, but now it is, let reset be true. Otherwise,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 CueList activeCues = mediaElement->currentlyActiveCues(); 804 CueList activeCues = mediaElement->currentlyActiveCues();
805 for (size_t i = 0; i < activeCues.size(); ++i) { 805 for (size_t i = 0; i < activeCues.size(); ++i) {
806 TextTrackCue* cue = activeCues[i].data(); 806 TextTrackCue* cue = activeCues[i].data();
807 cue->videoSizeDidChange(m_videoDisplaySize.size()); 807 cue->videoSizeDidChange(m_videoDisplaySize.size());
808 } 808 }
809 } 809 }
810 810
811 // ---------------------------- 811 // ----------------------------
812 812
813 } // namespace WebCore 813 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/MediaDocument.cpp ('k') | Source/core/rendering/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698