| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 // Don't ask if we are loading an empty URL. | 1364 // Don't ask if we are loading an empty URL. |
| 1365 if (request.url().isEmpty() || substituteData.isValid()) | 1365 if (request.url().isEmpty() || substituteData.isValid()) |
| 1366 return true; | 1366 return true; |
| 1367 | 1367 |
| 1368 // If we're loading content into a subframe, check against the parent's Cont
ent Security Policy | 1368 // If we're loading content into a subframe, check against the parent's Cont
ent Security Policy |
| 1369 // and kill the load if that check fails, unless we should bypass the main w
orld's CSP. | 1369 // and kill the load if that check fails, unless we should bypass the main w
orld's CSP. |
| 1370 if (shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy)
{ | 1370 if (shouldCheckMainWorldContentSecurityPolicy == CheckContentSecurityPolicy)
{ |
| 1371 Frame* parentFrame = m_frame->tree().parent(); | 1371 Frame* parentFrame = m_frame->tree().parent(); |
| 1372 if (parentFrame) { | 1372 if (parentFrame) { |
| 1373 ContentSecurityPolicy* parentPolicy = parentFrame->securityContext()
->contentSecurityPolicy(); | 1373 ContentSecurityPolicy* parentPolicy = parentFrame->securityContext()
->contentSecurityPolicy(); |
| 1374 ContentSecurityPolicy::RedirectStatus redirectStatus = request.follo
wedRedirect() | 1374 if (!parentPolicy->allowChildFrameFromSource(request.url(), request.
redirectStatus())) { |
| 1375 ? ContentSecurityPolicy::DidRedirect | |
| 1376 : ContentSecurityPolicy::DidNotRedirect; | |
| 1377 if (!parentPolicy->allowChildFrameFromSource(request.url(), redirect
Status)) { | |
| 1378 // Fire a load event, as timing attacks would otherwise reveal t
hat the | 1375 // Fire a load event, as timing attacks would otherwise reveal t
hat the |
| 1379 // frame was blocked. This way, it looks like every other cross-
origin | 1376 // frame was blocked. This way, it looks like every other cross-
origin |
| 1380 // page load. | 1377 // page load. |
| 1381 m_frame->document()->enforceSandboxFlags(SandboxOrigin); | 1378 m_frame->document()->enforceSandboxFlags(SandboxOrigin); |
| 1382 m_frame->owner()->dispatchLoad(); | 1379 m_frame->owner()->dispatchLoad(); |
| 1383 return false; | 1380 return false; |
| 1384 } | 1381 } |
| 1385 } | 1382 } |
| 1386 } | 1383 } |
| 1387 | 1384 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); | 1625 tracedValue->setString("documentLoaderURL", m_documentLoader ? m_documentLoa
der->url() : String()); |
| 1629 return tracedValue; | 1626 return tracedValue; |
| 1630 } | 1627 } |
| 1631 | 1628 |
| 1632 inline void FrameLoader::takeObjectSnapshot() const | 1629 inline void FrameLoader::takeObjectSnapshot() const |
| 1633 { | 1630 { |
| 1634 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); | 1631 TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID("loading", "FrameLoader", this, toTraced
Value()); |
| 1635 } | 1632 } |
| 1636 | 1633 |
| 1637 } // namespace blink | 1634 } // namespace blink |
| OLD | NEW |