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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLEmbedElement.cpp

Issue 2262053002: Allow rewriting of Flash embeds in PluginDocument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | third_party/WebKit/Source/core/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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2011 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 // FIXME: These should be joined into a PluginParameters class. 141 // FIXME: These should be joined into a PluginParameters class.
142 Vector<String> paramNames; 142 Vector<String> paramNames;
143 Vector<String> paramValues; 143 Vector<String> paramValues;
144 parametersForPlugin(paramNames, paramValues); 144 parametersForPlugin(paramNames, paramValues);
145 145
146 // FIXME: Can we not have layoutObject here now that beforeload events are g one? 146 // FIXME: Can we not have layoutObject here now that beforeload events are g one?
147 if (!layoutObject()) 147 if (!layoutObject())
148 return; 148 return;
149 149
150 // Overwrites the URL and MIME type of a Flash embed to use an HTML5 embed 150 // Overwrites the URL and MIME type of a Flash embed to use an HTML5 embed.
151 // when outside of a PluginDocument. 151 KURL overridenUrl = document().frame()->loader().client()->overrideFlashEmbe dWithHTML(document().completeURL(m_url));
152 if (!document().isPluginDocument()) { 152 if (!overridenUrl.isEmpty()) {
153 KURL overridenUrl = document().frame()->loader().client()->overrideFlash EmbedWithHTML(document().completeURL(m_url)); 153 m_url = overridenUrl.getString();
154 if (!overridenUrl.isEmpty()) { 154 m_serviceType = "text/html";
155 m_url = overridenUrl.getString();
156 m_serviceType = "text/html";
157 }
158 } 155 }
159 156
160 requestObject(m_url, m_serviceType, paramNames, paramValues); 157 requestObject(m_url, m_serviceType, paramNames, paramValues);
161 } 158 }
162 159
163 bool HTMLEmbedElement::layoutObjectIsNeeded(const ComputedStyle& style) 160 bool HTMLEmbedElement::layoutObjectIsNeeded(const ComputedStyle& style)
164 { 161 {
165 if (isImageType()) 162 if (isImageType())
166 return HTMLPlugInElement::layoutObjectIsNeeded(style); 163 return HTMLPlugInElement::layoutObjectIsNeeded(style);
167 164
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 206 {
210 // http://www.whatwg.org/specs/web-apps/current-work/#exposed 207 // http://www.whatwg.org/specs/web-apps/current-work/#exposed
211 for (HTMLObjectElement* object = Traversal<HTMLObjectElement>::firstAncestor (*this); object; object = Traversal<HTMLObjectElement>::firstAncestor(*object)) { 208 for (HTMLObjectElement* object = Traversal<HTMLObjectElement>::firstAncestor (*this); object; object = Traversal<HTMLObjectElement>::firstAncestor(*object)) {
212 if (object->isExposed()) 209 if (object->isExposed())
213 return false; 210 return false;
214 } 211 }
215 return true; 212 return true;
216 } 213 }
217 214
218 } // namespace blink 215 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/PluginDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698