| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // https://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 151 // https://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 152 openerFrame.document()->addConsoleMessage(ConsoleMessage::create( | 152 openerFrame.document()->addConsoleMessage(ConsoleMessage::create( |
| 153 SecurityMessageSource, ErrorMessageLevel, | 153 SecurityMessageSource, ErrorMessageLevel, |
| 154 "Blocked opening '" + request.resourceRequest().url().elidedString() + | 154 "Blocked opening '" + request.resourceRequest().url().elidedString() + |
| 155 "' 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 " |
| 156 "frame whose 'allow-popups' permission is not set.")); | 156 "frame whose 'allow-popups' permission is not set.")); |
| 157 return nullptr; | 157 return nullptr; |
| 158 } | 158 } |
| 159 | 159 |
| 160 if (openerFrame.settings() && | 160 if (openerFrame.settings() && |
| 161 !openerFrame.settings()->supportsMultipleWindows()) | 161 !openerFrame.settings()->getSupportsMultipleWindows()) |
| 162 window = openerFrame.tree().top(); | 162 window = openerFrame.tree().top(); |
| 163 } | 163 } |
| 164 | 164 |
| 165 if (window) { | 165 if (window) { |
| 166 // JS can run inside reuseExistingWindow (via onblur), which can detach | 166 // JS can run inside reuseExistingWindow (via onblur), which can detach |
| 167 // the target window. | 167 // the target window. |
| 168 if (!window->client()) | 168 if (!window->client()) |
| 169 return nullptr; | 169 return nullptr; |
| 170 if (request.getShouldSetOpener() == MaybeSetOpener) | 170 if (request.getShouldSetOpener() == MaybeSetOpener) |
| 171 window->client()->setOpener(&openerFrame); | 171 window->client()->setOpener(&openerFrame); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 } | 289 } |
| 290 | 290 |
| 291 // TODO(japhet): Form submissions on RemoteFrames don't work yet. | 291 // TODO(japhet): Form submissions on RemoteFrames don't work yet. |
| 292 FrameLoadRequest newRequest(0, request.resourceRequest()); | 292 FrameLoadRequest newRequest(0, request.resourceRequest()); |
| 293 newRequest.setForm(request.form()); | 293 newRequest.setForm(request.form()); |
| 294 if (newFrame->isLocalFrame()) | 294 if (newFrame->isLocalFrame()) |
| 295 toLocalFrame(newFrame)->loader().load(newRequest); | 295 toLocalFrame(newFrame)->loader().load(newRequest); |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace blink | 298 } // namespace blink |
| OLD | NEW |