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

Side by Side Diff: Source/WebCore/html/PluginDocument.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/html/MediaDocument.cpp ('k') | Source/WebCore/platform/mac/HTMLConverter.mm » ('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) 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 rootElement->appendChild(body, ec); 85 rootElement->appendChild(body, ec);
86 86
87 RefPtr<Element> embedElement = document()->createElement(embedTag, false); 87 RefPtr<Element> embedElement = document()->createElement(embedTag, false);
88 88
89 m_embedElement = static_cast<HTMLEmbedElement*>(embedElement.get()); 89 m_embedElement = static_cast<HTMLEmbedElement*>(embedElement.get());
90 m_embedElement->setAttribute(widthAttr, "100%"); 90 m_embedElement->setAttribute(widthAttr, "100%");
91 m_embedElement->setAttribute(heightAttr, "100%"); 91 m_embedElement->setAttribute(heightAttr, "100%");
92 92
93 m_embedElement->setAttribute(nameAttr, "plugin"); 93 m_embedElement->setAttribute(nameAttr, "plugin");
94 m_embedElement->setAttribute(srcAttr, document()->url().string()); 94 m_embedElement->setAttribute(srcAttr, document()->url().string());
95 m_embedElement->setAttribute(typeAttr, document()->loader()->writer()->mimeT ype()); 95
96 DocumentLoader* loader = document()->loader();
97 ASSERT(loader);
98 if (loader)
99 m_embedElement->setAttribute(typeAttr, loader->writer()->mimeType());
96 100
97 static_cast<PluginDocument*>(document())->setPluginNode(m_embedElement); 101 static_cast<PluginDocument*>(document())->setPluginNode(m_embedElement);
98 102
99 body->appendChild(embedElement, ec); 103 body->appendChild(embedElement, ec);
100 } 104 }
101 105
102 void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, int, bool) 106 void PluginDocumentParser::appendBytes(DocumentWriter*, const char*, int, bool)
103 { 107 {
104 ASSERT(!m_embedElement); 108 ASSERT(!m_embedElement);
105 if (m_embedElement) 109 if (m_embedElement)
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // PluginDocument::cancelManualPluginLoad should only be called once, but th ere are issues 179 // PluginDocument::cancelManualPluginLoad should only be called once, but th ere are issues
176 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>. 180 // with how many times we call beforeload on object elements. <rdar://proble m/8441094>.
177 if (!shouldLoadPluginManually()) 181 if (!shouldLoadPluginManually())
178 return; 182 return;
179 183
180 frame()->loader()->activeDocumentLoader()->mainResourceLoader()->cancel(); 184 frame()->loader()->activeDocumentLoader()->mainResourceLoader()->cancel();
181 setShouldLoadPluginManually(false); 185 setShouldLoadPluginManually(false);
182 } 186 }
183 187
184 } 188 }
OLDNEW
« no previous file with comments | « Source/WebCore/html/MediaDocument.cpp ('k') | Source/WebCore/platform/mac/HTMLConverter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698