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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 1489253002: Plumb document's strict mixed content checking for RemoteFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: alexmos test comments Created 5 years 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
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) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 , m_registrationContext(initializer.registrationContext(this)) 440 , m_registrationContext(initializer.registrationContext(this))
441 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red) 441 , m_elementDataCacheClearTimer(this, &Document::elementDataCacheClearTimerFi red)
442 , m_timeline(AnimationTimeline::create(this)) 442 , m_timeline(AnimationTimeline::create(this))
443 , m_templateDocumentHost(nullptr) 443 , m_templateDocumentHost(nullptr)
444 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired) 444 , m_didAssociateFormControlsTimer(this, &Document::didAssociateFormControlsT imerFired)
445 , m_timers(timerTaskRunner()->adoptClone()) 445 , m_timers(timerTaskRunner()->adoptClone())
446 , m_hasViewportUnits(false) 446 , m_hasViewportUnits(false)
447 , m_styleRecalcElementCounter(0) 447 , m_styleRecalcElementCounter(0)
448 , m_parserSyncPolicy(AllowAsynchronousParsing) 448 , m_parserSyncPolicy(AllowAsynchronousParsing)
449 , m_nodeCount(0) 449 , m_nodeCount(0)
450 , m_strictMixedContentCheckingEnforced(false)
450 { 451 {
451 if (m_frame) { 452 if (m_frame) {
452 ASSERT(m_frame->page()); 453 ASSERT(m_frame->page());
453 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); 454 provideContextFeaturesToDocumentFrom(*this, *m_frame->page());
454 455
455 m_fetcher = m_frame->loader().documentLoader()->fetcher(); 456 m_fetcher = m_frame->loader().documentLoader()->fetcher();
456 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); 457 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
457 } else if (m_importsController) { 458 } else if (m_importsController) {
458 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr); 459 m_fetcher = FrameFetchContext::createContextAndFetcher(nullptr);
459 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this); 460 FrameFetchContext::provideDocumentToContext(m_fetcher->context(), this);
(...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5760 { 5761 {
5761 if (frame()) 5762 if (frame())
5762 return m_frame->frameScheduler()->timerTaskRunner(); 5763 return m_frame->frameScheduler()->timerTaskRunner();
5763 if (m_importsController) 5764 if (m_importsController)
5764 return m_importsController->master()->timerTaskRunner(); 5765 return m_importsController->master()->timerTaskRunner();
5765 if (m_contextDocument) 5766 if (m_contextDocument)
5766 return m_contextDocument->timerTaskRunner(); 5767 return m_contextDocument->timerTaskRunner();
5767 return Platform::current()->currentThread()->scheduler()->timerTaskRunner(); 5768 return Platform::current()->currentThread()->scheduler()->timerTaskRunner();
5768 } 5769 }
5769 5770
5771 void Document::enforceStrictMixedContentChecking()
5772 {
5773 securityContext().setShouldEnforceStrictMixedContentChecking(true);
5774 if (frame())
5775 frame()->loader().client()->didEnforceStrictMixedContentChecking();
5776 }
5777
5770 DEFINE_TRACE(Document) 5778 DEFINE_TRACE(Document)
5771 { 5779 {
5772 #if ENABLE(OILPAN) 5780 #if ENABLE(OILPAN)
5773 visitor->trace(m_importsController); 5781 visitor->trace(m_importsController);
5774 visitor->trace(m_docType); 5782 visitor->trace(m_docType);
5775 visitor->trace(m_implementation); 5783 visitor->trace(m_implementation);
5776 visitor->trace(m_autofocusElement); 5784 visitor->trace(m_autofocusElement);
5777 visitor->trace(m_focusedElement); 5785 visitor->trace(m_focusedElement);
5778 visitor->trace(m_hoverNode); 5786 visitor->trace(m_hoverNode);
5779 visitor->trace(m_activeHoverElement); 5787 visitor->trace(m_activeHoverElement);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
5838 #ifndef NDEBUG 5846 #ifndef NDEBUG
5839 using namespace blink; 5847 using namespace blink;
5840 void showLiveDocumentInstances() 5848 void showLiveDocumentInstances()
5841 { 5849 {
5842 Document::WeakDocumentSet& set = Document::liveDocumentSet(); 5850 Document::WeakDocumentSet& set = Document::liveDocumentSet();
5843 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5851 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5844 for (Document* document : set) 5852 for (Document* document : set)
5845 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5853 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5846 } 5854 }
5847 #endif 5855 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698