OLD | NEW |
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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "RuntimeEnabledFeatures.h" | 33 #include "RuntimeEnabledFeatures.h" |
34 #include "bindings/v8/ExceptionStatePlaceholder.h" | 34 #include "bindings/v8/ExceptionStatePlaceholder.h" |
35 #include "core/dom/DOMTokenList.h" | 35 #include "core/dom/DOMTokenList.h" |
36 #include "core/dom/FullscreenElementStack.h" | 36 #include "core/dom/FullscreenElementStack.h" |
37 #include "core/events/MouseEvent.h" | 37 #include "core/events/MouseEvent.h" |
38 #include "core/events/ThreadLocalEventNames.h" | 38 #include "core/events/ThreadLocalEventNames.h" |
39 #include "core/html/HTMLVideoElement.h" | 39 #include "core/html/HTMLVideoElement.h" |
40 #include "core/html/shadow/MediaControls.h" | 40 #include "core/html/shadow/MediaControls.h" |
41 #include "core/html/track/TextTrack.h" | 41 #include "core/html/track/TextTrack.h" |
42 #include "core/html/track/TextTrackRegionList.h" | 42 #include "core/html/track/VTTRegionList.h" |
43 #include "core/page/EventHandler.h" | 43 #include "core/page/EventHandler.h" |
44 #include "core/frame/Frame.h" | 44 #include "core/frame/Frame.h" |
45 #include "core/page/Page.h" | 45 #include "core/page/Page.h" |
46 #include "core/page/Settings.h" | 46 #include "core/page/Settings.h" |
47 #include "core/rendering/RenderMediaControlElements.h" | 47 #include "core/rendering/RenderMediaControlElements.h" |
48 #include "core/rendering/RenderSlider.h" | 48 #include "core/rendering/RenderSlider.h" |
49 #include "core/rendering/RenderTheme.h" | 49 #include "core/rendering/RenderTheme.h" |
50 #include "core/rendering/RenderVideo.h" | 50 #include "core/rendering/RenderVideo.h" |
51 | 51 |
52 namespace WebCore { | 52 namespace WebCore { |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 // corresponding CSS boxes added to output, in text track cue order, run the | 728 // corresponding CSS boxes added to output, in text track cue order, run the |
729 // following substeps: | 729 // following substeps: |
730 for (size_t i = 0; i < activeCues.size(); ++i) { | 730 for (size_t i = 0; i < activeCues.size(); ++i) { |
731 TextTrackCue* cue = activeCues[i].data(); | 731 TextTrackCue* cue = activeCues[i].data(); |
732 | 732 |
733 ASSERT(cue->isActive()); | 733 ASSERT(cue->isActive()); |
734 if (!cue->track() || !cue->track()->isRendered() || !cue->isActive()) | 734 if (!cue->track() || !cue->track()->isRendered() || !cue->isActive()) |
735 continue; | 735 continue; |
736 | 736 |
737 RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplayS
ize.size()); | 737 RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplayS
ize.size()); |
738 TextTrackRegion* region = 0; | 738 VTTRegion* region = 0; |
739 if (cue->track()->regions()) | 739 if (cue->track()->regions()) |
740 region = cue->track()->regions()->getRegionById(cue->regionId()); | 740 region = cue->track()->regions()->getRegionById(cue->regionId()); |
741 | 741 |
742 if (!region) { | 742 if (!region) { |
743 // If cue has an empty text track cue region identifier or there is
no | 743 // If cue has an empty text track cue region identifier or there is
no |
744 // WebVTT region whose region identifier is identical to cue's text | 744 // WebVTT region whose region identifier is identical to cue's text |
745 // track cue region identifier, run the following substeps: | 745 // track cue region identifier, run the following substeps: |
746 if (displayBox->hasChildNodes() && !contains(displayBox.get())) | 746 if (displayBox->hasChildNodes() && !contains(displayBox.get())) |
747 // Note: the display tree of a cue is removed when the active fl
ag of the cue is unset. | 747 // Note: the display tree of a cue is removed when the active fl
ag of the cue is unset. |
748 appendChild(displayBox); | 748 appendChild(displayBox); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 CueList activeCues = mediaElement->currentlyActiveCues(); | 796 CueList activeCues = mediaElement->currentlyActiveCues(); |
797 for (size_t i = 0; i < activeCues.size(); ++i) { | 797 for (size_t i = 0; i < activeCues.size(); ++i) { |
798 TextTrackCue* cue = activeCues[i].data(); | 798 TextTrackCue* cue = activeCues[i].data(); |
799 cue->videoSizeDidChange(m_videoDisplaySize.size()); | 799 cue->videoSizeDidChange(m_videoDisplaySize.size()); |
800 } | 800 } |
801 } | 801 } |
802 | 802 |
803 // ---------------------------- | 803 // ---------------------------- |
804 | 804 |
805 } // namespace WebCore | 805 } // namespace WebCore |
OLD | NEW |