| 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 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 // Because FrameTree::find() returns true for empty strings, we must check | 1580 // Because FrameTree::find() returns true for empty strings, we must check |
| 1581 // for empty frame names. Otherwise, illegitimate window.open() calls with | 1581 // for empty frame names. Otherwise, illegitimate window.open() calls with |
| 1582 // no name will pass right through the popup blocker. | 1582 // no name will pass right through the popup blocker. |
| 1583 if (frameName.isEmpty() || !frame()->tree().find(frameName)) | 1583 if (frameName.isEmpty() || !frame()->tree().find(frameName)) |
| 1584 return nullptr; | 1584 return nullptr; |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 // Get the target frame for the special cases of _top and _parent. | 1587 // Get the target frame for the special cases of _top and _parent. |
| 1588 // In those cases, we schedule a location change right now and return early. | 1588 // In those cases, we schedule a location change right now and return early. |
| 1589 Frame* targetFrame = nullptr; | 1589 Frame* targetFrame = nullptr; |
| 1590 if (frameName == "_top") { | 1590 if (equalIgnoringASCIICase(frameName, "_top")) { |
| 1591 targetFrame = frame()->tree().top(); | 1591 targetFrame = frame()->tree().top(); |
| 1592 } else if (frameName == "_parent") { | 1592 } else if (equalIgnoringASCIICase(frameName, "_parent")) { |
| 1593 if (Frame* parent = frame()->tree().parent()) | 1593 if (Frame* parent = frame()->tree().parent()) |
| 1594 targetFrame = parent; | 1594 targetFrame = parent; |
| 1595 else | 1595 else |
| 1596 targetFrame = frame(); | 1596 targetFrame = frame(); |
| 1597 } | 1597 } |
| 1598 | 1598 |
| 1599 if (targetFrame) { | 1599 if (targetFrame) { |
| 1600 if (!activeDocument->frame() || | 1600 if (!activeDocument->frame() || |
| 1601 !activeDocument->frame()->canNavigate(*targetFrame)) | 1601 !activeDocument->frame()->canNavigate(*targetFrame)) |
| 1602 return nullptr; | 1602 return nullptr; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 DOMWindow::trace(visitor); | 1643 DOMWindow::trace(visitor); |
| 1644 Supplementable<LocalDOMWindow>::trace(visitor); | 1644 Supplementable<LocalDOMWindow>::trace(visitor); |
| 1645 } | 1645 } |
| 1646 | 1646 |
| 1647 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { | 1647 DEFINE_TRACE_WRAPPERS(LocalDOMWindow) { |
| 1648 visitor->traceWrappers(m_customElements); | 1648 visitor->traceWrappers(m_customElements); |
| 1649 DOMWindow::traceWrappers(visitor); | 1649 DOMWindow::traceWrappers(visitor); |
| 1650 } | 1650 } |
| 1651 | 1651 |
| 1652 } // namespace blink | 1652 } // namespace blink |
| OLD | NEW |