OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv
ed. |
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 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2825 | 2825 |
2826 RefPtr<TextTrack> textTrack = trackElement->track(); | 2826 RefPtr<TextTrack> textTrack = trackElement->track(); |
2827 if (!textTrack) | 2827 if (!textTrack) |
2828 return; | 2828 return; |
2829 | 2829 |
2830 // 4.8.10.12.3 Sourcing out-of-band text tracks | 2830 // 4.8.10.12.3 Sourcing out-of-band text tracks |
2831 // When a track element's parent element changes and the old parent was a me
dia element, | 2831 // When a track element's parent element changes and the old parent was a me
dia element, |
2832 // then the user agent must remove the track element's corresponding text tr
ack from the | 2832 // then the user agent must remove the track element's corresponding text tr
ack from the |
2833 // media element's list of text tracks. | 2833 // media element's list of text tracks. |
2834 m_textTracks->remove(textTrack.get()); | 2834 m_textTracks->remove(textTrack.get()); |
| 2835 if (textTrack->cues()) { |
| 2836 TextTrackCueList* cues = textTrack->cues(); |
| 2837 beginIgnoringTrackDisplayUpdateRequests(); |
| 2838 for (size_t i = 0; i < cues->length(); ++i) |
| 2839 textTrackRemoveCue(cues->item(i)->track(), cues->item(i)); |
| 2840 endIgnoringTrackDisplayUpdateRequests(); |
| 2841 } |
| 2842 |
2835 size_t index = m_textTracksWhenResourceSelectionBegan.find(textTrack.get()); | 2843 size_t index = m_textTracksWhenResourceSelectionBegan.find(textTrack.get()); |
2836 if (index != notFound) | 2844 if (index != notFound) |
2837 m_textTracksWhenResourceSelectionBegan.remove(index); | 2845 m_textTracksWhenResourceSelectionBegan.remove(index); |
2838 } | 2846 } |
2839 | 2847 |
2840 bool HTMLMediaElement::userPrefersCaptions() const | 2848 bool HTMLMediaElement::userPrefersCaptions() const |
2841 { | 2849 { |
2842 Page* page = document()->page(); | 2850 Page* page = document()->page(); |
2843 if (!page) | 2851 if (!page) |
2844 return false; | 2852 return false; |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4574 return mediaPlayerOwningDocument()->view()->windowClipRect(); | 4582 return mediaPlayerOwningDocument()->view()->windowClipRect(); |
4575 } | 4583 } |
4576 | 4584 |
4577 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture() | 4585 void HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture() |
4578 { | 4586 { |
4579 m_restrictions = NoRestrictions; | 4587 m_restrictions = NoRestrictions; |
4580 } | 4588 } |
4581 | 4589 |
4582 } | 4590 } |
4583 #endif | 4591 #endif |
OLD | NEW |