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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 } | 497 } |
498 | 498 |
499 void TextTrackCue::invalidateCueIndex() | 499 void TextTrackCue::invalidateCueIndex() |
500 { | 500 { |
501 m_cueIndex = invalidCueIndex; | 501 m_cueIndex = invalidCueIndex; |
502 } | 502 } |
503 | 503 |
504 void TextTrackCue::createWebVTTNodeTree() | 504 void TextTrackCue::createWebVTTNodeTree() |
505 { | 505 { |
506 if (!m_webVTTNodeTree) | 506 if (!m_webVTTNodeTree) |
507 m_webVTTNodeTree = WebVTTParser::create(0, document())->createDocumentFr
agmentFromCueText(m_content); | 507 m_webVTTNodeTree = WebVTTParser::createDocumentFragmentFromCueText(docum
ent(), m_content); |
508 } | 508 } |
509 | 509 |
510 void TextTrackCue::copyWebVTTNodeToDOMTree(ContainerNode* webVTTNode, ContainerN
ode* parent) | 510 void TextTrackCue::copyWebVTTNodeToDOMTree(ContainerNode* webVTTNode, ContainerN
ode* parent) |
511 { | 511 { |
512 for (Node* node = webVTTNode->firstChild(); node; node = node->nextSibling()
) { | 512 for (Node* node = webVTTNode->firstChild(); node; node = node->nextSibling()
) { |
513 RefPtr<Node> clonedNode; | 513 RefPtr<Node> clonedNode; |
514 if (node->isWebVTTElement()) | 514 if (node->isWebVTTElement()) |
515 clonedNode = toWebVTTElement(node)->createEquivalentHTMLElement(&doc
ument()); | 515 clonedNode = toWebVTTElement(node)->createEquivalentHTMLElement(&doc
ument()); |
516 else | 516 else |
517 clonedNode = node->cloneNode(false); | 517 clonedNode = node->cloneNode(false); |
(...skipping 709 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 |