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

Side by Side Diff: Source/WebCore/html/MediaDocument.cpp

Issue 7147018: Merge 87756 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 6 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 | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/html/PluginDocument.cpp » ('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) 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
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
OLDNEW
« no previous file with comments | « Source/WebCore/dom/Document.cpp ('k') | Source/WebCore/html/PluginDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698