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

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

Issue 2557063002: Upgrade Insecure Requests: bugfixes, tests, and support for OOPIF.
Patch Set: Addressed comments (@nasko #2). Created 4 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 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
(...skipping 6392 matching lines...) Expand 10 before | Expand all | Expand 10 after
6403 // inherited from a remote parent before this page's policy is set. In other 6403 // inherited from a remote parent before this page's policy is set. In other
6404 // words, insecure requests should be upgraded or blocked if _either_ the 6404 // words, insecure requests should be upgraded or blocked if _either_ the
6405 // existing policy or the newly enforced policy triggers upgrades or 6405 // existing policy or the newly enforced policy triggers upgrades or
6406 // blockage. 6406 // blockage.
6407 setInsecureRequestPolicy(getInsecureRequestPolicy() | policy); 6407 setInsecureRequestPolicy(getInsecureRequestPolicy() | policy);
6408 if (frame()) 6408 if (frame())
6409 frame()->loader().client()->didEnforceInsecureRequestPolicy( 6409 frame()->loader().client()->didEnforceInsecureRequestPolicy(
6410 getInsecureRequestPolicy()); 6410 getInsecureRequestPolicy());
6411 } 6411 }
6412 6412
6413 void Document::enforceInsecureNavigationsSet(
6414 const InsecureNavigationsSet& set) {
6415 for (unsigned hash : set)
6416 addInsecureNavigationUpgrade(hash);
6417 if (frame()) {
6418 frame()->loader().client()->didEnforceInsecureNavigationsSet(
6419 SecurityContext::serializeInsecureNavigationSet(
6420 *insecureNavigationsToUpgrade()));
6421 }
6422 }
6423
6413 void Document::setShadowCascadeOrder(ShadowCascadeOrder order) { 6424 void Document::setShadowCascadeOrder(ShadowCascadeOrder order) {
6414 DCHECK_NE(order, ShadowCascadeOrder::ShadowCascadeNone); 6425 DCHECK_NE(order, ShadowCascadeOrder::ShadowCascadeNone);
6415 6426
6416 if (order == m_shadowCascadeOrder) 6427 if (order == m_shadowCascadeOrder)
6417 return; 6428 return;
6418 6429
6419 if (order == ShadowCascadeOrder::ShadowCascadeV0) { 6430 if (order == ShadowCascadeOrder::ShadowCascadeV0) {
6420 m_mayContainV0Shadow = true; 6431 m_mayContainV0Shadow = true;
6421 if (m_shadowCascadeOrder == ShadowCascadeOrder::ShadowCascadeV1) 6432 if (m_shadowCascadeOrder == ShadowCascadeOrder::ShadowCascadeV1)
6422 UseCounter::count(*this, UseCounter::MixedShadowRootV0AndV1); 6433 UseCounter::count(*this, UseCounter::MixedShadowRootV0AndV1);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
6582 } 6593 }
6583 6594
6584 void showLiveDocumentInstances() { 6595 void showLiveDocumentInstances() {
6585 WeakDocumentSet& set = liveDocumentSet(); 6596 WeakDocumentSet& set = liveDocumentSet();
6586 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6597 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6587 for (Document* document : set) 6598 for (Document* document : set)
6588 fprintf(stderr, "- Document %p URL: %s\n", document, 6599 fprintf(stderr, "- Document %p URL: %s\n", document,
6589 document->url().getString().utf8().data()); 6600 document->url().getString().utf8().data());
6590 } 6601 }
6591 #endif 6602 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/SecurityContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698