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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 bool created; | 142 bool created; |
143 LocalFrame* newFrame = createWindow(*activeFrame, openerFrame, frameRequest,
windowFeatures, NavigationPolicyIgnore, MaybeSendReferrer, created); | 143 LocalFrame* newFrame = createWindow(*activeFrame, openerFrame, frameRequest,
windowFeatures, NavigationPolicyIgnore, MaybeSendReferrer, created); |
144 if (!newFrame) | 144 if (!newFrame) |
145 return nullptr; | 145 return nullptr; |
146 | 146 |
147 if (newFrame != &openerFrame && newFrame != openerFrame.tree().top()) | 147 if (newFrame != &openerFrame && newFrame != openerFrame.tree().top()) |
148 newFrame->loader().forceSandboxFlags(openerFrame.document()->sandboxFlag
s()); | 148 newFrame->loader().forceSandboxFlags(openerFrame.document()->sandboxFlag
s()); |
149 | 149 |
150 newFrame->loader().setOpener(&openerFrame); | 150 newFrame->loader().setOpener(&openerFrame); |
151 | 151 |
152 if (newFrame->domWindow()->isInsecureScriptAccess(callingWindow, completedUR
L)) | 152 if (newFrame->localDOMWindow()->isInsecureScriptAccess(callingWindow, comple
tedURL)) |
153 return newFrame; | 153 return newFrame; |
154 | 154 |
155 if (function) | 155 if (function) |
156 function(newFrame->domWindow(), functionContext); | 156 function(newFrame->localDOMWindow(), functionContext); |
157 | 157 |
158 if (created) | 158 if (created) |
159 newFrame->loader().load(FrameLoadRequest(callingWindow.document(), compl
etedURL)); | 159 newFrame->loader().load(FrameLoadRequest(callingWindow.document(), compl
etedURL)); |
160 else if (!urlString.isEmpty()) | 160 else if (!urlString.isEmpty()) |
161 newFrame->navigationScheduler().scheduleLocationChange(callingWindow.doc
ument(), completedURL.string(), false); | 161 newFrame->navigationScheduler().scheduleLocationChange(callingWindow.doc
ument(), completedURL.string(), false); |
162 return newFrame; | 162 return newFrame; |
163 } | 163 } |
164 | 164 |
165 void createWindowForRequest(const FrameLoadRequest& request, LocalFrame& openerF
rame, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer) | 165 void createWindowForRequest(const FrameLoadRequest& request, LocalFrame& openerF
rame, NavigationPolicy policy, ShouldSendReferrer shouldSendReferrer) |
166 { | 166 { |
(...skipping 17 matching lines...) Expand all Loading... |
184 if (shouldSendReferrer == MaybeSendReferrer) { | 184 if (shouldSendReferrer == MaybeSendReferrer) { |
185 newFrame->loader().setOpener(&openerFrame); | 185 newFrame->loader().setOpener(&openerFrame); |
186 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); | 186 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer
Policy()); |
187 } | 187 } |
188 FrameLoadRequest newRequest(0, request.resourceRequest()); | 188 FrameLoadRequest newRequest(0, request.resourceRequest()); |
189 newRequest.setFormState(request.formState()); | 189 newRequest.setFormState(request.formState()); |
190 newFrame->loader().load(newRequest); | 190 newFrame->loader().load(newRequest); |
191 } | 191 } |
192 | 192 |
193 } // namespace blink | 193 } // namespace blink |
OLD | NEW |