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

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

Issue 598533003: Revert "Mixed Content: Make MixedContentChecker completely static." (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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/core/html/HTMLFormElement.cpp ('k') | Source/core/html/parser/XSSAuditor.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 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 21 matching lines...) Expand all
32 #include "core/dom/shadow/ShadowRoot.h" 32 #include "core/dom/shadow/ShadowRoot.h"
33 #include "core/events/Event.h" 33 #include "core/events/Event.h"
34 #include "core/frame/FrameView.h" 34 #include "core/frame/FrameView.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/frame/Settings.h" 36 #include "core/frame/Settings.h"
37 #include "core/frame/csp/ContentSecurityPolicy.h" 37 #include "core/frame/csp/ContentSecurityPolicy.h"
38 #include "core/html/HTMLContentElement.h" 38 #include "core/html/HTMLContentElement.h"
39 #include "core/html/HTMLImageLoader.h" 39 #include "core/html/HTMLImageLoader.h"
40 #include "core/html/PluginDocument.h" 40 #include "core/html/PluginDocument.h"
41 #include "core/loader/FrameLoaderClient.h" 41 #include "core/loader/FrameLoaderClient.h"
42 #include "core/loader/MixedContentChecker.h"
43 #include "core/page/EventHandler.h" 42 #include "core/page/EventHandler.h"
44 #include "core/page/Page.h" 43 #include "core/page/Page.h"
45 #include "core/plugins/PluginView.h" 44 #include "core/plugins/PluginView.h"
46 #include "core/rendering/RenderBlockFlow.h" 45 #include "core/rendering/RenderBlockFlow.h"
47 #include "core/rendering/RenderEmbeddedObject.h" 46 #include "core/rendering/RenderEmbeddedObject.h"
48 #include "core/rendering/RenderImage.h" 47 #include "core/rendering/RenderImage.h"
49 #include "core/rendering/RenderWidget.h" 48 #include "core/rendering/RenderWidget.h"
50 #include "platform/Logging.h" 49 #include "platform/Logging.h"
51 #include "platform/MIMETypeFromURL.h" 50 #include "platform/MIMETypeFromURL.h"
52 #include "platform/MIMETypeRegistry.h" 51 #include "platform/MIMETypeRegistry.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 554
556 AtomicString declaredMimeType = document().isPluginDocument() && document(). ownerElement() ? 555 AtomicString declaredMimeType = document().isPluginDocument() && document(). ownerElement() ?
557 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) : 556 document().ownerElement()->fastGetAttribute(HTMLNames::typeAttr) :
558 fastGetAttribute(HTMLNames::typeAttr); 557 fastGetAttribute(HTMLNames::typeAttr);
559 if (!document().contentSecurityPolicy()->allowObjectFromSource(url) 558 if (!document().contentSecurityPolicy()->allowObjectFromSource(url)
560 || !document().contentSecurityPolicy()->allowPluginType(mimeType, declar edMimeType, url)) { 559 || !document().contentSecurityPolicy()->allowPluginType(mimeType, declar edMimeType, url)) {
561 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy); 560 renderEmbeddedObject()->setPluginUnavailabilityReason(RenderEmbeddedObje ct::PluginBlockedByContentSecurityPolicy);
562 return false; 561 return false;
563 } 562 }
564 563
565 return !MixedContentChecker::shouldBlockFetch(frame, WebURLRequest::RequestC ontextObject, WebURLRequest::FrameTypeNone, url); 564 return frame->loader().mixedContentChecker()->canRunInsecureContent(document ().securityOrigin(), url);
566 } 565 }
567 566
568 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&) 567 void HTMLPlugInElement::didAddUserAgentShadowRoot(ShadowRoot&)
569 { 568 {
570 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document())); 569 userAgentShadowRoot()->appendChild(HTMLContentElement::create(document()));
571 } 570 }
572 571
573 void HTMLPlugInElement::willAddFirstAuthorShadowRoot() 572 void HTMLPlugInElement::willAddFirstAuthorShadowRoot()
574 { 573 {
575 lazyReattachIfAttached(); 574 lazyReattachIfAttached();
(...skipping 11 matching lines...) Expand all
587 586
588 void HTMLPlugInElement::setUsePlaceholderContent(bool use) 587 void HTMLPlugInElement::setUsePlaceholderContent(bool use)
589 { 588 {
590 if (use != m_usePlaceholderContent) { 589 if (use != m_usePlaceholderContent) {
591 m_usePlaceholderContent = use; 590 m_usePlaceholderContent = use;
592 lazyReattachIfAttached(); 591 lazyReattachIfAttached();
593 } 592 }
594 } 593 }
595 594
596 } 595 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLFormElement.cpp ('k') | Source/core/html/parser/XSSAuditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698