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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1370 { | 1370 { |
1371 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 1371 if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
1372 return; | 1372 return; |
1373 | 1373 |
1374 client()->dispatchDidClearWindowObjectInMainWorld(); | 1374 client()->dispatchDidClearWindowObjectInMainWorld(); |
1375 } | 1375 } |
1376 | 1376 |
1377 SandboxFlags FrameLoader::effectiveSandboxFlags() const | 1377 SandboxFlags FrameLoader::effectiveSandboxFlags() const |
1378 { | 1378 { |
1379 SandboxFlags flags = m_forcedSandboxFlags; | 1379 SandboxFlags flags = m_forcedSandboxFlags; |
1380 // FIXME: We need a way to propagate sandbox flags to out-of-process frames. | |
1381 if (FrameOwner* frameOwner = m_frame->owner()) | 1380 if (FrameOwner* frameOwner = m_frame->owner()) |
1382 flags |= frameOwner->sandboxFlags(); | 1381 flags |= frameOwner->sandboxFlags(); |
1382 // Frames need to inherit the sandbox flags of their parent frame. | |
1383 if (Frame* parentFrame = m_frame->tree().parent()) | |
1384 flags |= parentFrame->securityContext()->sandboxFlags(); | |
Nate Chapin
2015/01/22 19:00:28
This is ok, but I can't help but feel that we shou
dcheng
2015/01/22 19:05:53
I guess the counter-argument is it's nice to have
| |
1383 return flags; | 1385 return flags; |
1384 } | 1386 } |
1385 | 1387 |
1386 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const | 1388 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const |
1387 { | 1389 { |
1388 Frame* parentFrame = m_frame->tree().parent(); | 1390 Frame* parentFrame = m_frame->tree().parent(); |
1389 if (!parentFrame) | 1391 if (!parentFrame) |
1390 return false; | 1392 return false; |
1391 | 1393 |
1392 // FIXME: We need a way to propagate strict mixed content checking flags to | 1394 // FIXME: We need a way to propagate strict mixed content checking flags to |
1393 // out-of-process frames. For now, we'll always enforce. | 1395 // out-of-process frames. For now, we'll always enforce. |
1394 if (!parentFrame->isLocalFrame()) | 1396 if (!parentFrame->isLocalFrame()) |
1395 return true; | 1397 return true; |
1396 | 1398 |
1397 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking(); | 1399 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking(); |
1398 } | 1400 } |
1399 | 1401 |
1400 } // namespace blink | 1402 } // namespace blink |
OLD | NEW |