| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 htmlBody->setAttribute(marginheightAttr, "0"); | 202 htmlBody->setAttribute(marginheightAttr, "0"); |
| 203 | 203 |
| 204 if (HTMLVideoElement* videoElement = descendentVideoElement(htmlBody)) { | 204 if (HTMLVideoElement* videoElement = descendentVideoElement(htmlBody)) { |
| 205 RefPtr<Element> element = Document::createElement(embedTag, false); | 205 RefPtr<Element> element = Document::createElement(embedTag, false); |
| 206 HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(element.
get()); | 206 HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(element.
get()); |
| 207 | 207 |
| 208 embedElement->setAttribute(widthAttr, "100%"); | 208 embedElement->setAttribute(widthAttr, "100%"); |
| 209 embedElement->setAttribute(heightAttr, "100%"); | 209 embedElement->setAttribute(heightAttr, "100%"); |
| 210 embedElement->setAttribute(nameAttr, "plugin"); | 210 embedElement->setAttribute(nameAttr, "plugin"); |
| 211 embedElement->setAttribute(srcAttr, url().string()); | 211 embedElement->setAttribute(srcAttr, url().string()); |
| 212 embedElement->setAttribute(typeAttr, loader()->writer()->mimeType()); | 212 |
| 213 DocumentLoader* documentLoader = loader(); |
| 214 ASSERT(documentLoader); |
| 215 if (documentLoader) |
| 216 embedElement->setAttribute(typeAttr, documentLoader->writer()->mimeT
ype()); |
| 213 | 217 |
| 214 ExceptionCode ec; | 218 ExceptionCode ec; |
| 215 videoElement->parentNode()->replaceChild(embedElement, videoElement, ec)
; | 219 videoElement->parentNode()->replaceChild(embedElement, videoElement, ec)
; |
| 216 } | 220 } |
| 217 } | 221 } |
| 218 | 222 |
| 219 } | 223 } |
| 220 #endif | 224 #endif |
| OLD | NEW |