| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 PassRefPtr<DocumentParser> MediaDocument::createParser() | 128 PassRefPtr<DocumentParser> MediaDocument::createParser() |
| 129 { | 129 { |
| 130 return MediaDocumentParser::create(this); | 130 return MediaDocumentParser::create(this); |
| 131 } | 131 } |
| 132 | 132 |
| 133 static inline HTMLVideoElement* descendentVideoElement(Node* root) | 133 static inline HTMLVideoElement* descendentVideoElement(Node* root) |
| 134 { | 134 { |
| 135 ASSERT(root); | 135 ASSERT(root); |
| 136 | 136 |
| 137 for (Node* node = root; node; node = NodeTraversal::next(node, root)) { | 137 for (Node* node = root; node; node = NodeTraversal::next(*node, root)) { |
| 138 if (isHTMLVideoElement(node)) | 138 if (isHTMLVideoElement(node)) |
| 139 return toHTMLVideoElement(node); | 139 return toHTMLVideoElement(node); |
| 140 } | 140 } |
| 141 | 141 |
| 142 return 0; | 142 return 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 void MediaDocument::defaultEventHandler(Event* event) | 145 void MediaDocument::defaultEventHandler(Event* event) |
| 146 { | 146 { |
| 147 Node* targetNode = event->target()->toNode(); | 147 Node* targetNode = event->target()->toNode(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 160 if (video->canPlay()) | 160 if (video->canPlay()) |
| 161 video->play(); | 161 video->play(); |
| 162 } else | 162 } else |
| 163 video->pause(); | 163 video->pause(); |
| 164 event->setDefaultHandled(); | 164 event->setDefaultHandled(); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 } | 167 } |
| 168 | 168 |
| 169 } | 169 } |
| OLD | NEW |