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

Side by Side Diff: Source/core/html/HTMLPlugInElement.cpp

Issue 143983007: Remove PostAttachCallbacks and replace with something more specialized (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update Created 6 years, 9 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 | Annotate | Revision Log
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 Apple Computer, Inc. 5 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 11 matching lines...) Expand all
22 22
23 #include "config.h" 23 #include "config.h"
24 #include "core/html/HTMLPlugInElement.h" 24 #include "core/html/HTMLPlugInElement.h"
25 25
26 #include "CSSPropertyNames.h" 26 #include "CSSPropertyNames.h"
27 #include "HTMLNames.h" 27 #include "HTMLNames.h"
28 #include "bindings/v8/ScriptController.h" 28 #include "bindings/v8/ScriptController.h"
29 #include "bindings/v8/npruntime_impl.h" 29 #include "bindings/v8/npruntime_impl.h"
30 #include "core/dom/Document.h" 30 #include "core/dom/Document.h"
31 #include "core/dom/Node.h" 31 #include "core/dom/Node.h"
32 #include "core/dom/PostAttachCallbacks.h"
33 #include "core/dom/shadow/ShadowRoot.h" 32 #include "core/dom/shadow/ShadowRoot.h"
34 #include "core/events/Event.h" 33 #include "core/events/Event.h"
35 #include "core/frame/LocalFrame.h" 34 #include "core/frame/LocalFrame.h"
36 #include "core/frame/csp/ContentSecurityPolicy.h" 35 #include "core/frame/csp/ContentSecurityPolicy.h"
37 #include "core/html/HTMLContentElement.h" 36 #include "core/html/HTMLContentElement.h"
38 #include "core/html/HTMLImageLoader.h" 37 #include "core/html/HTMLImageLoader.h"
39 #include "core/html/PluginDocument.h" 38 #include "core/html/PluginDocument.h"
40 #include "core/loader/FrameLoaderClient.h" 39 #include "core/loader/FrameLoaderClient.h"
41 #include "core/page/EventHandler.h" 40 #include "core/page/EventHandler.h"
42 #include "core/page/Page.h" 41 #include "core/page/Page.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 RefPtr<Widget> widget = frame->loader().client()->createPlugin(this, url, pa ramNames, paramValues, mimeType, loadManually, FrameLoaderClient::FailOnDetached Plugin); 445 RefPtr<Widget> widget = frame->loader().client()->createPlugin(this, url, pa ramNames, paramValues, mimeType, loadManually, FrameLoaderClient::FailOnDetached Plugin);
447 446
448 if (!widget) { 447 if (!widget) {
449 if (!renderer->showsUnavailablePluginIndicator()) 448 if (!renderer->showsUnavailablePluginIndicator())
450 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing); 449 renderer->setPluginUnavailabilityReason(RenderEmbeddedObject::Plugin Missing);
451 return false; 450 return false;
452 } 451 }
453 452
454 renderer->setWidget(widget); 453 renderer->setWidget(widget);
455 document().setContainsPlugins(); 454 document().setContainsPlugins();
456 setNeedsStyleRecalc(LocalStyleChange, StyleChangeFromRenderer); 455 scheduleLayerUpdate();
457 return true; 456 return true;
458 } 457 }
459 458
460 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback) 459 bool HTMLPlugInElement::shouldUsePlugin(const KURL& url, const String& mimeType, bool hasFallback, bool& useFallback)
461 { 460 {
462 // Allow other plug-ins to win over QuickTime because if the user has 461 // Allow other plug-ins to win over QuickTime because if the user has
463 // installed a plug-in that can handle TIFF (which QuickTime can also 462 // installed a plug-in that can handle TIFF (which QuickTime can also
464 // handle) they probably intended to override QT. 463 // handle) they probably intended to override QT.
465 if (document().frame()->page() && (mimeType == "image/tiff" || mimeType == " image/tif" || mimeType == "image/x-tiff")) { 464 if (document().frame()->page() && (mimeType == "image/tiff" || mimeType == " image/tif" || mimeType == "image/x-tiff")) {
466 const PluginData* pluginData = document().frame()->page()->pluginData(); 465 const PluginData* pluginData = document().frame()->page()->pluginData();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (root.isOldestAuthorShadowRoot()) 524 if (root.isOldestAuthorShadowRoot())
526 lazyReattachIfAttached(); 525 lazyReattachIfAttached();
527 } 526 }
528 527
529 bool HTMLPlugInElement::useFallbackContent() const 528 bool HTMLPlugInElement::useFallbackContent() const
530 { 529 {
531 return hasAuthorShadowRoot(); 530 return hasAuthorShadowRoot();
532 } 531 }
533 532
534 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698