| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(document()); | 93 RefPtr<HTMLSourceElement> source = HTMLSourceElement::create(document()); |
| 94 source->setSrc(document()->url()); | 94 source->setSrc(document()->url()); |
| 95 | 95 |
| 96 if (DocumentLoader* loader = document()->loader()) | 96 if (DocumentLoader* loader = document()->loader()) |
| 97 source->setType(loader->responseMIMEType()); | 97 source->setType(loader->responseMIMEType()); |
| 98 | 98 |
| 99 media->appendChild(source.release(), ASSERT_NO_EXCEPTION, AttachLazily); | 99 media->appendChild(source.release(), ASSERT_NO_EXCEPTION, AttachLazily); |
| 100 | 100 |
| 101 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document()); | 101 RefPtr<HTMLBodyElement> body = HTMLBodyElement::create(document()); |
| 102 body->appendChild(media.release(), ASSERT_NO_EXCEPTION); | 102 body->appendChild(media.release(), ASSERT_NO_EXCEPTION, DeprecatedAttachNow)
; |
| 103 | 103 |
| 104 rootElement->appendChild(head.release(), ASSERT_NO_EXCEPTION, AttachLazily); | 104 rootElement->appendChild(head.release(), ASSERT_NO_EXCEPTION, AttachLazily); |
| 105 rootElement->appendChild(body.release(), ASSERT_NO_EXCEPTION, AttachLazily); | 105 rootElement->appendChild(body.release(), ASSERT_NO_EXCEPTION, AttachLazily); |
| 106 | 106 |
| 107 m_didBuildDocumentStructure = true; | 107 m_didBuildDocumentStructure = true; |
| 108 } | 108 } |
| 109 | 109 |
| 110 size_t MediaDocumentParser::appendBytes(const char*, size_t) | 110 size_t MediaDocumentParser::appendBytes(const char*, size_t) |
| 111 { | 111 { |
| 112 if (m_didBuildDocumentStructure) | 112 if (m_didBuildDocumentStructure) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 if (video->canPlay()) | 159 if (video->canPlay()) |
| 160 video->play(); | 160 video->play(); |
| 161 } else | 161 } else |
| 162 video->pause(); | 162 video->pause(); |
| 163 event->setDefaultHandled(); | 163 event->setDefaultHandled(); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 } | 168 } |
| OLD | NEW |