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

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

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 DOMWindow* createWindow(const String& urlString, 178 DOMWindow* createWindow(const String& urlString,
179 const AtomicString& frameName, 179 const AtomicString& frameName,
180 const WindowFeatures& windowFeatures, 180 const WindowFeatures& windowFeatures,
181 LocalDOMWindow& callingWindow, 181 LocalDOMWindow& callingWindow,
182 LocalFrame& firstFrame, 182 LocalFrame& firstFrame,
183 LocalFrame& openerFrame) { 183 LocalFrame& openerFrame) {
184 LocalFrame* activeFrame = callingWindow.frame(); 184 LocalFrame* activeFrame = callingWindow.frame();
185 ASSERT(activeFrame); 185 ASSERT(activeFrame);
186 186
187 KURL completedURL = urlString.isEmpty() 187 KURL completedURL = urlString.isEmpty()
188 ? KURL(ParsedURLString, emptyString()) 188 ? KURL(ParsedURLString, emptyString)
189 : firstFrame.document()->completeURL(urlString); 189 : firstFrame.document()->completeURL(urlString);
190 if (!completedURL.isEmpty() && !completedURL.isValid()) { 190 if (!completedURL.isEmpty() && !completedURL.isValid()) {
191 // Don't expose client code to invalid URLs. 191 // Don't expose client code to invalid URLs.
192 callingWindow.printErrorMessage( 192 callingWindow.printErrorMessage(
193 "Unable to open a window with invalid URL '" + 193 "Unable to open a window with invalid URL '" +
194 completedURL.getString() + "'.\n"); 194 completedURL.getString() + "'.\n");
195 return nullptr; 195 return nullptr;
196 } 196 }
197 197
198 FrameLoadRequest frameRequest(callingWindow.document(), completedURL, 198 FrameLoadRequest frameRequest(callingWindow.document(), completedURL,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 } 289 }
290 290
291 // TODO(japhet): Form submissions on RemoteFrames don't work yet. 291 // TODO(japhet): Form submissions on RemoteFrames don't work yet.
292 FrameLoadRequest newRequest(0, request.resourceRequest()); 292 FrameLoadRequest newRequest(0, request.resourceRequest());
293 newRequest.setForm(request.form()); 293 newRequest.setForm(request.form());
294 if (newFrame->isLocalFrame()) 294 if (newFrame->isLocalFrame())
295 toLocalFrame(newFrame)->loader().load(newRequest); 295 toLocalFrame(newFrame)->loader().load(newRequest);
296 } 296 }
297 297
298 } // namespace blink 298 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/page/PagePopupController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698