Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: Source/core/page/CreateWindow.cpp

Issue 1139933002: Prototype an 'allow-unsandboxed-auxiliary' sandbox flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 if (features.ySet) 111 if (features.ySet)
112 windowRect.setY(features.y); 112 windowRect.setY(features.y);
113 if (features.widthSet) 113 if (features.widthSet)
114 windowRect.setWidth(features.width + (windowRect.width() - viewportSize. width())); 114 windowRect.setWidth(features.width + (windowRect.width() - viewportSize. width()));
115 if (features.heightSet) 115 if (features.heightSet)
116 windowRect.setHeight(features.height + (windowRect.height() - viewportSi ze.height())); 116 windowRect.setHeight(features.height + (windowRect.height() - viewportSi ze.height()));
117 117
118 host->chrome().setWindowRect(windowRect); 118 host->chrome().setWindowRect(windowRect);
119 host->chrome().show(policy); 119 host->chrome().show(policy);
120 120
121 frame.loader().forceSandboxFlags(openerFrame.document()->sandboxFlags()); 121 if (openerFrame.document()->isSandboxed(SandboxUnsandboxedAuxiliary))
philipj_slow 2015/05/13 10:36:19 The name is quite cryptic in this context. If you
Mike West 2015/05/13 11:22:01 That's a fair point. Maybe something like "Sandbox
philipj_slow 2015/05/13 12:29:04 That name is much more clear for now, thanks!
122 frame.loader().forceSandboxFlags(openerFrame.document()->sandboxFlags()) ;
122 123
123 created = true; 124 created = true;
124 return &frame; 125 return &frame;
125 } 126 }
126 127
127 LocalFrame* createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures& windowFeatures, 128 LocalFrame* createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures& windowFeatures,
128 LocalDOMWindow& callingWindow, LocalFrame& firstFrame, LocalFrame& openerFra me) 129 LocalDOMWindow& callingWindow, LocalFrame& firstFrame, LocalFrame& openerFra me)
129 { 130 {
130 LocalFrame* activeFrame = callingWindow.frame(); 131 LocalFrame* activeFrame = callingWindow.frame();
131 ASSERT(activeFrame); 132 ASSERT(activeFrame);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 if (shouldSendReferrer == MaybeSendReferrer) { 194 if (shouldSendReferrer == MaybeSendReferrer) {
194 newFrame->loader().setOpener(&openerFrame); 195 newFrame->loader().setOpener(&openerFrame);
195 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer Policy()); 196 newFrame->document()->setReferrerPolicy(openerFrame.document()->referrer Policy());
196 } 197 }
197 FrameLoadRequest newRequest(0, request.resourceRequest()); 198 FrameLoadRequest newRequest(0, request.resourceRequest());
198 newRequest.setFormState(request.formState()); 199 newRequest.setFormState(request.formState());
199 newFrame->loader().load(newRequest); 200 newFrame->loader().load(newRequest);
200 } 201 }
201 202
202 } // namespace blink 203 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698