| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011, 2012, 2013 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * 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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 | 784 |
| 785 bool isPastNode = true; | 785 bool isPastNode = true; |
| 786 double currentTimestamp = previousTimestamp; | 786 double currentTimestamp = previousTimestamp; |
| 787 if (currentTimestamp > movieTime) | 787 if (currentTimestamp > movieTime) |
| 788 isPastNode = false; | 788 isPastNode = false; |
| 789 | 789 |
| 790 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(ch
ild, root)) { | 790 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(ch
ild, root)) { |
| 791 if (child->nodeName() == timestampTag) { | 791 if (child->nodeName() == timestampTag) { |
| 792 unsigned position = 0; | 792 unsigned position = 0; |
| 793 String timestamp = child->nodeValue(); | 793 String timestamp = child->nodeValue(); |
| 794 double currentTimestamp = WebVTTParser::create(0, document())->colle
ctTimeStamp(timestamp, &position); | 794 double currentTimestamp = WebVTTParser::collectTimeStamp(timestamp,
&position); |
| 795 ASSERT(currentTimestamp != -1); | 795 ASSERT(currentTimestamp != -1); |
| 796 | 796 |
| 797 if (currentTimestamp > movieTime) | 797 if (currentTimestamp > movieTime) |
| 798 isPastNode = false; | 798 isPastNode = false; |
| 799 } | 799 } |
| 800 | 800 |
| 801 if (child->isWebVTTElement()) { | 801 if (child->isWebVTTElement()) { |
| 802 toWebVTTElement(child)->setIsPastNode(isPastNode); | 802 toWebVTTElement(child)->setIsPastNode(isPastNode); |
| 803 // Make an elemenet id match a cue id for style matching purposes. | 803 // Make an elemenet id match a cue id for style matching purposes. |
| 804 if (!m_id.isEmpty()) | 804 if (!m_id.isEmpty()) |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1227 return false; | 1227 return false; |
| 1228 if (m_cueSize != cue.size()) | 1228 if (m_cueSize != cue.size()) |
| 1229 return false; | 1229 return false; |
| 1230 if (align() != cue.align()) | 1230 if (align() != cue.align()) |
| 1231 return false; | 1231 return false; |
| 1232 | 1232 |
| 1233 return true; | 1233 return true; |
| 1234 } | 1234 } |
| 1235 | 1235 |
| 1236 } // namespace WebCore | 1236 } // namespace WebCore |
| OLD | NEW |