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

Side by Side Diff: Source/core/loader/FrameLoader.cpp

Issue 838903002: Replicate sandbox flags for OOPIF (Blink part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@iframe-sandbox-flags-part1
Patch Set: Simplify the plumbing by making HTMLFrameOwnerElement::sandboxFlags() public Created 5 years, 11 months 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) 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
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();
1383 return flags; 1382 return flags;
1384 } 1383 }
1385 1384
1386 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const 1385 bool FrameLoader::shouldEnforceStrictMixedContentChecking() const
1387 { 1386 {
1388 Frame* parentFrame = m_frame->tree().parent(); 1387 Frame* parentFrame = m_frame->tree().parent();
1389 if (!parentFrame) 1388 if (!parentFrame)
1390 return false; 1389 return false;
1391 1390
1392 // FIXME: We need a way to propagate strict mixed content checking flags to 1391 // FIXME: We need a way to propagate strict mixed content checking flags to
1393 // out-of-process frames. For now, we'll always enforce. 1392 // out-of-process frames. For now, we'll always enforce.
1394 if (!parentFrame->isLocalFrame()) 1393 if (!parentFrame->isLocalFrame())
1395 return true; 1394 return true;
1396 1395
1397 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking(); 1396 return toLocalFrame(parentFrame)->document()->shouldEnforceStrictMixedConten tChecking();
1398 } 1397 }
1399 1398
1400 } // namespace blink 1399 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698