| OLD | NEW |
| 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 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6368 void Document::platformColorsChanged() { | 6368 void Document::platformColorsChanged() { |
| 6369 if (!isActive()) | 6369 if (!isActive()) |
| 6370 return; | 6370 return; |
| 6371 | 6371 |
| 6372 styleEngine().platformColorsChanged(); | 6372 styleEngine().platformColorsChanged(); |
| 6373 } | 6373 } |
| 6374 | 6374 |
| 6375 bool Document::isSecureContext( | 6375 bool Document::isSecureContext( |
| 6376 String& errorMessage, | 6376 String& errorMessage, |
| 6377 const SecureContextCheck privilegeContextCheck) const { | 6377 const SecureContextCheck privilegeContextCheck) const { |
| 6378 bool isSecure = isSecureContextImpl(privilegeContextCheck); | 6378 if (!isSecureContext(privilegeContextCheck)) { |
| 6379 if (getSandboxFlags() != SandboxNone) { | 6379 errorMessage = SecurityOrigin::isPotentiallyTrustworthyErrorMessage(); |
| 6380 UseCounter::count( | 6380 return false; |
| 6381 *this, isSecure | |
| 6382 ? UseCounter::SecureContextCheckForSandboxedOriginPassed | |
| 6383 : UseCounter::SecureContextCheckForSandboxedOriginFailed); | |
| 6384 } | 6381 } |
| 6385 UseCounter::count(*this, isSecure ? UseCounter::SecureContextCheckPassed | 6382 return true; |
| 6386 : UseCounter::SecureContextCheckFailed); | |
| 6387 | |
| 6388 if (isSecure) | |
| 6389 return true; | |
| 6390 | |
| 6391 errorMessage = SecurityOrigin::isPotentiallyTrustworthyErrorMessage(); | |
| 6392 return false; | |
| 6393 } | 6383 } |
| 6394 | 6384 |
| 6395 bool Document::isSecureContext( | 6385 bool Document::isSecureContext( |
| 6396 const SecureContextCheck privilegeContextCheck) const { | 6386 const SecureContextCheck privilegeContextCheck) const { |
| 6397 bool isSecure = isSecureContextImpl(privilegeContextCheck); | 6387 bool isSecure = isSecureContextImpl(privilegeContextCheck); |
| 6398 if (getSandboxFlags() != SandboxNone) { | 6388 if (getSandboxFlags() != SandboxNone) { |
| 6399 UseCounter::count( | 6389 UseCounter::count( |
| 6400 *this, isSecure | 6390 *this, isSecure |
| 6401 ? UseCounter::SecureContextCheckForSandboxedOriginPassed | 6391 ? UseCounter::SecureContextCheckForSandboxedOriginPassed |
| 6402 : UseCounter::SecureContextCheckForSandboxedOriginFailed); | 6392 : UseCounter::SecureContextCheckForSandboxedOriginFailed); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6590 } | 6580 } |
| 6591 | 6581 |
| 6592 void showLiveDocumentInstances() { | 6582 void showLiveDocumentInstances() { |
| 6593 WeakDocumentSet& set = liveDocumentSet(); | 6583 WeakDocumentSet& set = liveDocumentSet(); |
| 6594 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6584 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6595 for (Document* document : set) | 6585 for (Document* document : set) |
| 6596 fprintf(stderr, "- Document %p URL: %s\n", document, | 6586 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6597 document->url().getString().utf8().data()); | 6587 document->url().getString().utf8().data()); |
| 6598 } | 6588 } |
| 6599 #endif | 6589 #endif |
| OLD | NEW |