OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. | 2 * Copyright (c) 2013, Opera Software ASA. 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 // If cue has an empty text track cue region identifier or there is no | 804 // If cue has an empty text track cue region identifier or there is no |
805 // WebVTT region whose region identifier is identical to cue's text | 805 // WebVTT region whose region identifier is identical to cue's text |
806 // track cue region identifier, run the following substeps: | 806 // track cue region identifier, run the following substeps: |
807 if (displayBox->hasChildren() && !container.contains(displayBox.get()))
{ | 807 if (displayBox->hasChildren() && !container.contains(displayBox.get()))
{ |
808 // Note: the display tree of a cue is removed when the active flag o
f the cue is unset. | 808 // Note: the display tree of a cue is removed when the active flag o
f the cue is unset. |
809 container.appendChild(displayBox); | 809 container.appendChild(displayBox); |
810 } | 810 } |
811 } else { | 811 } else { |
812 // Let region be the WebVTT region whose region identifier | 812 // Let region be the WebVTT region whose region identifier |
813 // matches the text track cue region identifier of cue. | 813 // matches the text track cue region identifier of cue. |
814 RefPtr<HTMLDivElement> regionNode = region->getDisplayTree(document()); | 814 RefPtrWillBeRawPtr<HTMLDivElement> regionNode = region->getDisplayTree(d
ocument()); |
815 | 815 |
816 // Append the region to the viewport, if it was not already. | 816 // Append the region to the viewport, if it was not already. |
817 if (!container.contains(regionNode.get())) | 817 if (!container.contains(regionNode.get())) |
818 container.appendChild(regionNode); | 818 container.appendChild(regionNode); |
819 | 819 |
820 region->appendVTTCueBox(displayBox); | 820 region->appendVTTCueBox(displayBox); |
821 } | 821 } |
822 } | 822 } |
823 | 823 |
824 std::pair<double, double> VTTCue::getPositionCoordinates() const | 824 std::pair<double, double> VTTCue::getPositionCoordinates() const |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 | 1098 |
1099 void VTTCue::trace(Visitor* visitor) | 1099 void VTTCue::trace(Visitor* visitor) |
1100 { | 1100 { |
1101 visitor->trace(m_vttNodeTree); | 1101 visitor->trace(m_vttNodeTree); |
1102 visitor->trace(m_cueBackgroundBox); | 1102 visitor->trace(m_cueBackgroundBox); |
1103 visitor->trace(m_displayTree); | 1103 visitor->trace(m_displayTree); |
1104 TextTrackCue::trace(visitor); | 1104 TextTrackCue::trace(visitor); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace WebCore | 1107 } // namespace WebCore |
OLD | NEW |