| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 newFrame->loader().setOpener(&openerFrame); | 147 newFrame->loader().setOpener(&openerFrame); |
| 148 | 148 |
| 149 if (newFrame->domWindow()->isInsecureScriptAccess(callingWindow, completedUR
L)) | 149 if (newFrame->domWindow()->isInsecureScriptAccess(callingWindow, completedUR
L)) |
| 150 return newFrame; | 150 return newFrame; |
| 151 | 151 |
| 152 if (function) | 152 if (function) |
| 153 function(newFrame->domWindow(), functionContext); | 153 function(newFrame->domWindow(), functionContext); |
| 154 | 154 |
| 155 if (created) { | 155 if (created) { |
| 156 FrameLoadRequest request(callingWindow.document(), ResourceRequest(compl
etedURL, referrer)); | 156 ResourceRequest resourceRequest = ResourceRequest::createMainResourceReq
uest( |
| 157 completedURL, newFrame->isMainFrame(), referrer); |
| 158 FrameLoadRequest request(callingWindow.document(), resourceRequest); |
| 157 newFrame->loader().load(request); | 159 newFrame->loader().load(request); |
| 158 } else if (!urlString.isEmpty()) { | 160 } else if (!urlString.isEmpty()) { |
| 159 newFrame->navigationScheduler().scheduleLocationChange(callingWindow.doc
ument(), completedURL.string(), referrer, false); | 161 newFrame->navigationScheduler().scheduleLocationChange(callingWindow.doc
ument(), completedURL.string(), referrer, false); |
| 160 } | 162 } |
| 161 return newFrame; | 163 return newFrame; |
| 162 } | 164 } |
| 163 | 165 |
| 164 void createWindowForRequest(const FrameLoadRequest& request, LocalFrame& openerF
rame, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer) | 166 void createWindowForRequest(const FrameLoadRequest& request, LocalFrame& openerF
rame, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer) |
| 165 { | 167 { |
| 166 if (openerFrame.document()->pageDismissalEventBeingDispatched() != Document:
:NoDismissal) | 168 if (openerFrame.document()->pageDismissalEventBeingDispatched() != Document:
:NoDismissal) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 183 if (shouldSendReferrer == MaybeSendReferrer) { | 185 if (shouldSendReferrer == MaybeSendReferrer) { |
| 184 newFrame->loader().setOpener(&openerFrame); | 186 newFrame->loader().setOpener(&openerFrame); |
| 185 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); | 187 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); |
| 186 } | 188 } |
| 187 FrameLoadRequest newRequest(0, request.resourceRequest()); | 189 FrameLoadRequest newRequest(0, request.resourceRequest()); |
| 188 newRequest.setFormState(request.formState()); | 190 newRequest.setFormState(request.formState()); |
| 189 newFrame->loader().load(newRequest); | 191 newFrame->loader().load(newRequest); |
| 190 } | 192 } |
| 191 | 193 |
| 192 } // namespace WebCore | 194 } // namespace WebCore |
| OLD | NEW |