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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 // Normally, FrameLoader would take care of setting the referrer for a navig
ation that is | 163 // Normally, FrameLoader would take care of setting the referrer for a navig
ation that is |
164 // triggered from javascript. However, creating a window goes through suffic
ient processing | 164 // triggered from javascript. However, creating a window goes through suffic
ient processing |
165 // that it eventually enters FrameLoader as an embedder-initiated navigation
. FrameLoader | 165 // that it eventually enters FrameLoader as an embedder-initiated navigation
. FrameLoader |
166 // assumes no responsibility for generating an embedder-initiated navigation
's referrer, | 166 // assumes no responsibility for generating an embedder-initiated navigation
's referrer, |
167 // so we need to ensure the proper referrer is set now. | 167 // so we need to ensure the proper referrer is set now. |
168 frameRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::generateRefer
rer(activeFrame->document()->getReferrerPolicy(), completedURL, activeFrame->doc
ument()->outgoingReferrer())); | 168 frameRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::generateRefer
rer(activeFrame->document()->getReferrerPolicy(), completedURL, activeFrame->doc
ument()->outgoingReferrer())); |
169 | 169 |
170 // Records HasUserGesture before the value is invalidated inside createWindo
w(LocalFrame& openerFrame, ...). | 170 // Records HasUserGesture before the value is invalidated inside createWindo
w(LocalFrame& openerFrame, ...). |
171 // This value will be set in ResourceRequest loaded in a new LocalFrame. | 171 // This value will be set in ResourceRequest loaded in a new LocalFrame. |
172 bool hasUserGesture = UserGestureIndicator::processingUserGesture(); | 172 bool hasUserGesture = UserGestureIndicator::processingUserGestureUntracked()
; |
173 | 173 |
174 // We pass the opener frame for the lookupFrame in case the active frame is
different from | 174 // We pass the opener frame for the lookupFrame in case the active frame is
different from |
175 // the opener frame, and the name references a frame relative to the opener
frame. | 175 // the opener frame, and the name references a frame relative to the opener
frame. |
176 bool created; | 176 bool created; |
177 ShouldSetOpener opener = windowFeatures.noopener ? NeverSetOpener : MaybeSet
Opener; | 177 ShouldSetOpener opener = windowFeatures.noopener ? NeverSetOpener : MaybeSet
Opener; |
178 Frame* newFrame = createWindowHelper(openerFrame, *activeFrame, openerFrame,
frameRequest, windowFeatures, NavigationPolicyIgnore, opener, created); | 178 Frame* newFrame = createWindowHelper(openerFrame, *activeFrame, openerFrame,
frameRequest, windowFeatures, NavigationPolicyIgnore, opener, created); |
179 if (!newFrame) | 179 if (!newFrame) |
180 return nullptr; | 180 return nullptr; |
181 | 181 |
182 if (!newFrame->domWindow()->isInsecureScriptAccess(callingWindow, completedU
RL)) { | 182 if (!newFrame->domWindow()->isInsecureScriptAccess(callingWindow, completedU
RL)) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 214 } |
215 | 215 |
216 // TODO(japhet): Form submissions on RemoteFrames don't work yet. | 216 // TODO(japhet): Form submissions on RemoteFrames don't work yet. |
217 FrameLoadRequest newRequest(0, request.resourceRequest()); | 217 FrameLoadRequest newRequest(0, request.resourceRequest()); |
218 newRequest.setForm(request.form()); | 218 newRequest.setForm(request.form()); |
219 if (newFrame->isLocalFrame()) | 219 if (newFrame->isLocalFrame()) |
220 toLocalFrame(newFrame)->loader().load(newRequest); | 220 toLocalFrame(newFrame)->loader().load(newRequest); |
221 } | 221 } |
222 | 222 |
223 } // namespace blink | 223 } // namespace blink |
OLD | NEW |