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

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

Issue 2425623003: Revert of Fix <object data=> YouTube Flash rewrites. (Closed)
Patch Set: Created 4 years, 2 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 | « chrome/test/data/flash_embeds.html ('k') | no next file » | 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, 2007, 2008, 2009, 2011 Apple Inc. All rights 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights
6 * reserved. 6 * reserved.
7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 15 matching lines...) Expand all
26 26
27 #include "bindings/core/v8/ScriptEventListener.h" 27 #include "bindings/core/v8/ScriptEventListener.h"
28 #include "core/HTMLNames.h" 28 #include "core/HTMLNames.h"
29 #include "core/dom/Attribute.h" 29 #include "core/dom/Attribute.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/dom/ElementTraversal.h" 31 #include "core/dom/ElementTraversal.h"
32 #include "core/dom/TagCollection.h" 32 #include "core/dom/TagCollection.h"
33 #include "core/dom/Text.h" 33 #include "core/dom/Text.h"
34 #include "core/dom/shadow/ShadowRoot.h" 34 #include "core/dom/shadow/ShadowRoot.h"
35 #include "core/fetch/ImageResource.h" 35 #include "core/fetch/ImageResource.h"
36 #include "core/frame/LocalFrame.h"
37 #include "core/frame/Settings.h" 36 #include "core/frame/Settings.h"
38 #include "core/html/HTMLImageLoader.h" 37 #include "core/html/HTMLImageLoader.h"
39 #include "core/html/HTMLMetaElement.h" 38 #include "core/html/HTMLMetaElement.h"
40 #include "core/html/HTMLParamElement.h" 39 #include "core/html/HTMLParamElement.h"
41 #include "core/html/parser/HTMLParserIdioms.h" 40 #include "core/html/parser/HTMLParserIdioms.h"
42 #include "core/layout/api/LayoutEmbeddedItem.h" 41 #include "core/layout/api/LayoutEmbeddedItem.h"
43 #include "core/loader/FrameLoaderClient.h"
44 #include "core/plugins/PluginView.h" 42 #include "core/plugins/PluginView.h"
45 #include "platform/MIMETypeRegistry.h" 43 #include "platform/MIMETypeRegistry.h"
46 #include "platform/Widget.h" 44 #include "platform/Widget.h"
47 45
48 namespace blink { 46 namespace blink {
49 47
50 using namespace HTMLNames; 48 using namespace HTMLNames;
51 49
52 inline HTMLObjectElement::HTMLObjectElement(Document& document, 50 inline HTMLObjectElement::HTMLObjectElement(Document& document,
53 HTMLFormElement* form, 51 HTMLFormElement* form,
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (!allowedToLoadFrameURL(url)) { 306 if (!allowedToLoadFrameURL(url)) {
309 dispatchErrorEvent(); 307 dispatchErrorEvent();
310 return; 308 return;
311 } 309 }
312 310
313 // TODO(schenney): crbug.com/572908 Is it possible to get here without a 311 // TODO(schenney): crbug.com/572908 Is it possible to get here without a
314 // layoutObject now that we don't have beforeload events? 312 // layoutObject now that we don't have beforeload events?
315 if (!layoutObject()) 313 if (!layoutObject())
316 return; 314 return;
317 315
318 // Overwrites the URL and MIME type of a Flash embed to use an HTML5 embed.
319 KURL overridenUrl =
320 document().frame()->loader().client()->overrideFlashEmbedWithHTML(
321 document().completeURL(m_url));
322 if (!overridenUrl.isEmpty()) {
323 url = m_url = overridenUrl.getString();
324 serviceType = m_serviceType = "text/html";
325 }
326
327 if (!hasValidClassId() || 316 if (!hasValidClassId() ||
328 !requestObject(url, serviceType, paramNames, paramValues)) { 317 !requestObject(url, serviceType, paramNames, paramValues)) {
329 if (!url.isEmpty()) 318 if (!url.isEmpty())
330 dispatchErrorEvent(); 319 dispatchErrorEvent();
331 if (hasFallbackContent()) 320 if (hasFallbackContent())
332 renderFallbackContent(); 321 renderFallbackContent();
333 } 322 }
334 } 323 }
335 324
336 Node::InsertionNotificationRequest HTMLObjectElement::insertedInto( 325 Node::InsertionNotificationRequest HTMLObjectElement::insertedInto(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 444
456 bool HTMLObjectElement::isInteractiveContent() const { 445 bool HTMLObjectElement::isInteractiveContent() const {
457 return fastHasAttribute(usemapAttr); 446 return fastHasAttribute(usemapAttr);
458 } 447 }
459 448
460 bool HTMLObjectElement::useFallbackContent() const { 449 bool HTMLObjectElement::useFallbackContent() const {
461 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 450 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
462 } 451 }
463 452
464 } // namespace blink 453 } // namespace blink
OLDNEW
« no previous file with comments | « chrome/test/data/flash_embeds.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698