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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
668 | 668 |
669 bool isPastNode = true; | 669 bool isPastNode = true; |
670 double currentTimestamp = previousTimestamp; | 670 double currentTimestamp = previousTimestamp; |
671 if (currentTimestamp > movieTime) | 671 if (currentTimestamp > movieTime) |
672 isPastNode = false; | 672 isPastNode = false; |
673 | 673 |
674 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(*c hild, root)) { | 674 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(*c hild, root)) { |
675 if (child->nodeName() == timestampTag) { | 675 if (child->nodeName() == timestampTag) { |
676 unsigned position = 0; | 676 unsigned position = 0; |
677 String timestamp = child->nodeValue(); | 677 String timestamp = child->nodeValue(); |
678 double currentTimestamp = VTTParser::collectTimeStamp(timestamp, &po sition); | 678 double currentTimestamp; |
679 ASSERT(currentTimestamp != -1); | 679 VTTParser::collectTimeStamp(timestamp, &position, currentTimestamp); |
jochen (gone - plz use gerrit)
2013/12/05 09:00:36
why not ASSERT() around this call?
| |
680 | 680 |
681 if (currentTimestamp > movieTime) | 681 if (currentTimestamp > movieTime) |
682 isPastNode = false; | 682 isPastNode = false; |
683 } | 683 } |
684 | 684 |
685 if (child->isVTTElement()) { | 685 if (child->isVTTElement()) { |
686 toVTTElement(child)->setIsPastNode(isPastNode); | 686 toVTTElement(child)->setIsPastNode(isPastNode); |
687 // Make an elemenet id match a cue id for style matching purposes. | 687 // Make an elemenet id match a cue id for style matching purposes. |
688 if (!id().isEmpty()) | 688 if (!id().isEmpty()) |
689 toElement(child)->setIdAttribute(id()); | 689 toElement(child)->setIdAttribute(id()); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1098 return m_cueBackgroundBox->executionContext(); | 1098 return m_cueBackgroundBox->executionContext(); |
1099 } | 1099 } |
1100 | 1100 |
1101 Document& VTTCue::document() const | 1101 Document& VTTCue::document() const |
1102 { | 1102 { |
1103 ASSERT(m_cueBackgroundBox); | 1103 ASSERT(m_cueBackgroundBox); |
1104 return m_cueBackgroundBox->document(); | 1104 return m_cueBackgroundBox->document(); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace WebCore | 1107 } // namespace WebCore |
OLD | NEW |