| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 if (openerFrame.document()->isSandboxed(SandboxPopups)) { | 61 if (openerFrame.document()->isSandboxed(SandboxPopups)) { |
| 62 // FIXME: This message should be moved off the console once a solution t
o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. | 62 // FIXME: This message should be moved off the console once a solution t
o https://bugs.webkit.org/show_bug.cgi?id=103274 exists. |
| 63 openerFrame.document()->addConsoleMessage(SecurityMessageSource, ErrorMe
ssageLevel, "Blocked opening '" + request.resourceRequest().url().elidedString()
+ "' in a new window because the request was made in a sandboxed frame whose 'a
llow-popups' permission is not set."); | 63 openerFrame.document()->addConsoleMessage(SecurityMessageSource, ErrorMe
ssageLevel, "Blocked opening '" + request.resourceRequest().url().elidedString()
+ "' in a new window because the request was made in a sandboxed frame whose 'a
llow-popups' permission is not set."); |
| 64 return 0; | 64 return 0; |
| 65 } | 65 } |
| 66 | 66 |
| 67 if (openerFrame.settings() && !openerFrame.settings()->supportsMultipleWindo
ws()) { | 67 if (openerFrame.settings() && !openerFrame.settings()->supportsMultipleWindo
ws()) { |
| 68 created = false; | 68 created = false; |
| 69 if (!openerFrame.tree().top()->isLocalFrame()) | 69 if (!openerFrame.tree().top()->isLocalFrame()) |
| 70 return 0; | 70 return 0; |
| 71 return openerFrame.tree().top(); | 71 return toLocalFrame(openerFrame.tree().top()); |
| 72 } | 72 } |
| 73 | 73 |
| 74 Page* oldPage = openerFrame.page(); | 74 Page* oldPage = openerFrame.page(); |
| 75 if (!oldPage) | 75 if (!oldPage) |
| 76 return 0; | 76 return 0; |
| 77 | 77 |
| 78 Page* page = oldPage->chrome().client().createWindow(&openerFrame, request,
features, policy, shouldSendReferrer); | 78 Page* page = oldPage->chrome().client().createWindow(&openerFrame, request,
features, policy, shouldSendReferrer); |
| 79 if (!page) | 79 if (!page) |
| 80 return 0; | 80 return 0; |
| 81 FrameHost* host = &page->frameHost(); | 81 FrameHost* host = &page->frameHost(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 if (shouldSendReferrer == MaybeSendReferrer) { | 183 if (shouldSendReferrer == MaybeSendReferrer) { |
| 184 newFrame->loader().setOpener(&openerFrame); | 184 newFrame->loader().setOpener(&openerFrame); |
| 185 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); | 185 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); |
| 186 } | 186 } |
| 187 FrameLoadRequest newRequest(0, request.resourceRequest()); | 187 FrameLoadRequest newRequest(0, request.resourceRequest()); |
| 188 newRequest.setFormState(request.formState()); | 188 newRequest.setFormState(request.formState()); |
| 189 newFrame->loader().load(newRequest); | 189 newFrame->loader().load(newRequest); |
| 190 } | 190 } |
| 191 | 191 |
| 192 } // namespace WebCore | 192 } // namespace WebCore |
| OLD | NEW |