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

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

Issue 313813002: Oilpan: Replace RefPtrs to Node and its subclasses in core/dom/ with Oilpan transtion types. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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) 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if (!url.isEmpty()) { 164 if (!url.isEmpty()) {
165 RefPtrWillBeRawPtr<HTMLAnchorElement> anchor = HTMLAnchorElement ::create(document); 165 RefPtrWillBeRawPtr<HTMLAnchorElement> anchor = HTMLAnchorElement ::create(document);
166 anchor->setHref(AtomicString(url)); 166 anchor->setHref(AtomicString(url));
167 if (title.isEmpty()) { 167 if (title.isEmpty()) {
168 // Try the plain text first because the url might be normali zed or escaped. 168 // Try the plain text first because the url might be normali zed or escaped.
169 if (dragData->containsPlainText()) 169 if (dragData->containsPlainText())
170 title = dragData->asPlainText(); 170 title = dragData->asPlainText();
171 if (title.isEmpty()) 171 if (title.isEmpty())
172 title = url; 172 title = url;
173 } 173 }
174 RefPtr<Node> anchorText = document.createTextNode(title); 174 anchor->appendChild(document.createTextNode(title));
175 anchor->appendChild(anchorText);
176 RefPtrWillBeRawPtr<DocumentFragment> fragment = document.createD ocumentFragment(); 175 RefPtrWillBeRawPtr<DocumentFragment> fragment = document.createD ocumentFragment();
177 fragment->appendChild(anchor); 176 fragment->appendChild(anchor);
178 return fragment.release(); 177 return fragment.release();
179 } 178 }
180 } 179 }
181 } 180 }
182 if (allowPlainText && dragData->containsPlainText()) { 181 if (allowPlainText && dragData->containsPlainText()) {
183 chosePlainText = true; 182 chosePlainText = true;
184 return createFragmentFromText(context.get(), dragData->asPlainText()).ge t(); 183 return createFragmentFromText(context.get(), dragData->asPlainText()).ge t();
185 } 184 }
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 964
966 void DragController::trace(Visitor* visitor) 965 void DragController::trace(Visitor* visitor)
967 { 966 {
968 visitor->trace(m_page); 967 visitor->trace(m_page);
969 visitor->trace(m_documentUnderMouse); 968 visitor->trace(m_documentUnderMouse);
970 visitor->trace(m_dragInitiator); 969 visitor->trace(m_dragInitiator);
971 visitor->trace(m_fileInputElementUnderMouse); 970 visitor->trace(m_fileInputElementUnderMouse);
972 } 971 }
973 972
974 } // namespace WebCore 973 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698