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

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

Issue 112653006: Make calls to AtomicString(const String&) explicit in page/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 11 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
« no previous file with comments | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Google Inc. 3 * Copyright (C) 2008 Google Inc.
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Document& document = context->ownerDocument(); 159 Document& document = context->ownerDocument();
160 if (dragData->containsCompatibleContent()) { 160 if (dragData->containsCompatibleContent()) {
161 if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(frame, context, allowPlainText, chosePlainText)) 161 if (PassRefPtr<DocumentFragment> fragment = dragData->asFragment(frame, context, allowPlainText, chosePlainText))
162 return fragment; 162 return fragment;
163 163
164 if (dragData->containsURL(DragData::DoNotConvertFilenames)) { 164 if (dragData->containsURL(DragData::DoNotConvertFilenames)) {
165 String title; 165 String title;
166 String url = dragData->asURL(DragData::DoNotConvertFilenames, &title ); 166 String url = dragData->asURL(DragData::DoNotConvertFilenames, &title );
167 if (!url.isEmpty()) { 167 if (!url.isEmpty()) {
168 RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(doc ument); 168 RefPtr<HTMLAnchorElement> anchor = HTMLAnchorElement::create(doc ument);
169 anchor->setHref(url); 169 anchor->setHref(AtomicString(url));
170 if (title.isEmpty()) { 170 if (title.isEmpty()) {
171 // Try the plain text first because the url might be normali zed or escaped. 171 // Try the plain text first because the url might be normali zed or escaped.
172 if (dragData->containsPlainText()) 172 if (dragData->containsPlainText())
173 title = dragData->asPlainText(); 173 title = dragData->asPlainText();
174 if (title.isEmpty()) 174 if (title.isEmpty())
175 title = url; 175 title = url;
176 } 176 }
177 RefPtr<Node> anchorText = document.createTextNode(title); 177 RefPtr<Node> anchorText = document.createTextNode(title);
178 anchor->appendChild(anchorText); 178 anchor->appendChild(anchorText);
179 RefPtr<DocumentFragment> fragment = document.createDocumentFragm ent(); 179 RefPtr<DocumentFragment> fragment = document.createDocumentFragm ent();
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 return false; 959 return false;
960 #endif 960 #endif
961 } 961 }
962 962
963 void DragController::cleanupAfterSystemDrag() 963 void DragController::cleanupAfterSystemDrag()
964 { 964 {
965 } 965 }
966 966
967 } // namespace WebCore 967 } // namespace WebCore
968 968
OLDNEW
« no previous file with comments | « Source/core/page/CreateWindow.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698