Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(785)

Side by Side Diff: Source/core/html/track/vtt/VTTCue.cpp

Issue 134173002: Remove position argument from VTTParser::collectTimeStamp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
668 { 668 {
669 DEFINE_STATIC_LOCAL(const String, timestampTag, ("timestamp")); 669 DEFINE_STATIC_LOCAL(const String, timestampTag, ("timestamp"));
670 670
671 bool isPastNode = true; 671 bool isPastNode = true;
672 double currentTimestamp = previousTimestamp; 672 double currentTimestamp = previousTimestamp;
673 if (currentTimestamp > movieTime) 673 if (currentTimestamp > movieTime)
674 isPastNode = false; 674 isPastNode = false;
675 675
676 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(*c hild, root)) { 676 for (Node* child = root->firstChild(); child; child = NodeTraversal::next(*c hild, root)) {
677 if (child->nodeName() == timestampTag) { 677 if (child->nodeName() == timestampTag) {
678 unsigned position = 0;
679 String timestamp = child->nodeValue();
680 double currentTimestamp; 678 double currentTimestamp;
681 bool check = VTTParser::collectTimeStamp(timestamp, &position, curre ntTimestamp); 679 bool check = VTTParser::collectTimeStamp(child->nodeValue(), current Timestamp);
682 ASSERT_UNUSED(check, check); 680 ASSERT_UNUSED(check, check);
683 681
684 if (currentTimestamp > movieTime) 682 if (currentTimestamp > movieTime)
685 isPastNode = false; 683 isPastNode = false;
686 } 684 }
687 685
688 if (child->isVTTElement()) { 686 if (child->isVTTElement()) {
689 toVTTElement(child)->setIsPastNode(isPastNode); 687 toVTTElement(child)->setIsPastNode(isPastNode);
690 // Make an elemenet id match a cue id for style matching purposes. 688 // Make an elemenet id match a cue id for style matching purposes.
691 if (!id().isEmpty()) 689 if (!id().isEmpty())
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 return m_cueBackgroundBox->executionContext(); 1087 return m_cueBackgroundBox->executionContext();
1090 } 1088 }
1091 1089
1092 Document& VTTCue::document() const 1090 Document& VTTCue::document() const
1093 { 1091 {
1094 ASSERT(m_cueBackgroundBox); 1092 ASSERT(m_cueBackgroundBox);
1095 return m_cueBackgroundBox->document(); 1093 return m_cueBackgroundBox->document();
1096 } 1094 }
1097 1095
1098 } // namespace WebCore 1096 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/track/vtt/VTTParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698