| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 NavigationPolicy policy, | 132 NavigationPolicy policy, |
| 133 bool& created) { | 133 bool& created) { |
| 134 ASSERT(!features.dialog || request.frameName().isEmpty()); | 134 ASSERT(!features.dialog || request.frameName().isEmpty()); |
| 135 ASSERT(request.resourceRequest().requestorOrigin() || | 135 ASSERT(request.resourceRequest().requestorOrigin() || |
| 136 openerFrame.document()->url().isEmpty()); | 136 openerFrame.document()->url().isEmpty()); |
| 137 ASSERT(request.resourceRequest().frameType() == | 137 ASSERT(request.resourceRequest().frameType() == |
| 138 WebURLRequest::FrameTypeAuxiliary); | 138 WebURLRequest::FrameTypeAuxiliary); |
| 139 | 139 |
| 140 created = false; | 140 created = false; |
| 141 | 141 |
| 142 Frame* window = reuseExistingWindow(activeFrame, lookupFrame, | 142 Frame* window = features.noopener |
| 143 request.frameName(), policy); | 143 ? nullptr |
| 144 : reuseExistingWindow(activeFrame, lookupFrame, |
| 145 request.frameName(), policy); |
| 144 | 146 |
| 145 if (!window) { | 147 if (!window) { |
| 146 // Sandboxed frames cannot open new auxiliary browsing contexts. | 148 // Sandboxed frames cannot open new auxiliary browsing contexts. |
| 147 if (openerFrame.document()->isSandboxed(SandboxPopups)) { | 149 if (openerFrame.document()->isSandboxed(SandboxPopups)) { |
| 148 // FIXME: This message should be moved off the console once a solution to | 150 // FIXME: This message should be moved off the console once a solution to |
| 149 // https://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 151 // https://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 150 openerFrame.document()->addConsoleMessage(ConsoleMessage::create( | 152 openerFrame.document()->addConsoleMessage(ConsoleMessage::create( |
| 151 SecurityMessageSource, ErrorMessageLevel, | 153 SecurityMessageSource, ErrorMessageLevel, |
| 152 "Blocked opening '" + request.resourceRequest().url().elidedString() + | 154 "Blocked opening '" + request.resourceRequest().url().elidedString() + |
| 153 "' in a new window because the request was made in a sandboxed " | 155 "' in a new window because the request was made in a sandboxed " |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 285 } |
| 284 | 286 |
| 285 // TODO(japhet): Form submissions on RemoteFrames don't work yet. | 287 // TODO(japhet): Form submissions on RemoteFrames don't work yet. |
| 286 FrameLoadRequest newRequest(0, request.resourceRequest()); | 288 FrameLoadRequest newRequest(0, request.resourceRequest()); |
| 287 newRequest.setForm(request.form()); | 289 newRequest.setForm(request.form()); |
| 288 if (newFrame->isLocalFrame()) | 290 if (newFrame->isLocalFrame()) |
| 289 toLocalFrame(newFrame)->loader().load(newRequest); | 291 toLocalFrame(newFrame)->loader().load(newRequest); |
| 290 } | 292 } |
| 291 | 293 |
| 292 } // namespace blink | 294 } // namespace blink |
| OLD | NEW |