OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1489 if (targetFrame->domWindow()->isInsecureScriptAccess(*callingWindow, com
pletedURL)) | 1489 if (targetFrame->domWindow()->isInsecureScriptAccess(*callingWindow, com
pletedURL)) |
1490 return targetFrame->domWindow(); | 1490 return targetFrame->domWindow(); |
1491 | 1491 |
1492 if (urlString.isEmpty()) | 1492 if (urlString.isEmpty()) |
1493 return targetFrame->domWindow(); | 1493 return targetFrame->domWindow(); |
1494 | 1494 |
1495 targetFrame->navigate(*activeDocument, completedURL, false, UserGestureS
tatus::None); | 1495 targetFrame->navigate(*activeDocument, completedURL, false, UserGestureS
tatus::None); |
1496 return targetFrame->domWindow(); | 1496 return targetFrame->domWindow(); |
1497 } | 1497 } |
1498 | 1498 |
1499 return createWindow(urlString, frameName, WindowFeatures(windowFeaturesStrin
g), *callingWindow, *firstFrame, *frame()); | 1499 WindowFeatures features(windowFeaturesString); |
| 1500 RefPtrWillBeRawPtr<DOMWindow> newWindow = createWindow(urlString, frameName,
features, *callingWindow, *firstFrame, *frame()); |
| 1501 return features.noopener ? nullptr : newWindow; |
1500 } | 1502 } |
1501 | 1503 |
1502 DEFINE_TRACE(LocalDOMWindow) | 1504 DEFINE_TRACE(LocalDOMWindow) |
1503 { | 1505 { |
1504 #if ENABLE(OILPAN) | 1506 #if ENABLE(OILPAN) |
1505 visitor->trace(m_frameObserver); | 1507 visitor->trace(m_frameObserver); |
1506 visitor->trace(m_document); | 1508 visitor->trace(m_document); |
1507 visitor->trace(m_properties); | 1509 visitor->trace(m_properties); |
1508 visitor->trace(m_screen); | 1510 visitor->trace(m_screen); |
1509 visitor->trace(m_history); | 1511 visitor->trace(m_history); |
(...skipping 19 matching lines...) Expand all Loading... |
1529 { | 1531 { |
1530 // If the LocalDOMWindow still has a frame reference, that frame must point | 1532 // If the LocalDOMWindow still has a frame reference, that frame must point |
1531 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1533 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
1532 // where script execution leaks between different LocalDOMWindows. | 1534 // where script execution leaks between different LocalDOMWindows. |
1533 if (m_frameObserver->frame()) | 1535 if (m_frameObserver->frame()) |
1534 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1536 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
1535 return m_frameObserver->frame(); | 1537 return m_frameObserver->frame(); |
1536 } | 1538 } |
1537 | 1539 |
1538 } // namespace blink | 1540 } // namespace blink |
OLD | NEW |