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

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

Issue 310353003: Oilpan: Replace RefPtrs and raw pointers to Node and its subclasses in core/frame and core/page wit… (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
« no previous file with comments | « Source/core/frame/SmartClip.cpp ('k') | Source/core/page/NetworkStateNotifierTest.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 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 RefPtrWillBeRawPtr<Node> anchorText = document.createTextNode(ti tle);
175 anchor->appendChild(anchorText); 175 anchor->appendChild(anchorText);
176 RefPtrWillBeRawPtr<DocumentFragment> fragment = document.createD ocumentFragment(); 176 RefPtrWillBeRawPtr<DocumentFragment> fragment = document.createD ocumentFragment();
177 fragment->appendChild(anchor); 177 fragment->appendChild(anchor);
178 return fragment.release(); 178 return fragment.release();
179 } 179 }
180 } 180 }
181 } 181 }
182 if (allowPlainText && dragData->containsPlainText()) { 182 if (allowPlainText && dragData->containsPlainText()) {
183 chosePlainText = true; 183 chosePlainText = true;
184 return createFragmentFromText(context.get(), dragData->asPlainText()).ge t(); 184 return createFragmentFromText(context.get(), dragData->asPlainText()).ge t();
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 void DragController::trace(Visitor* visitor) 966 void DragController::trace(Visitor* visitor)
967 { 967 {
968 visitor->trace(m_page); 968 visitor->trace(m_page);
969 visitor->trace(m_documentUnderMouse); 969 visitor->trace(m_documentUnderMouse);
970 visitor->trace(m_dragInitiator); 970 visitor->trace(m_dragInitiator);
971 visitor->trace(m_fileInputElementUnderMouse); 971 visitor->trace(m_fileInputElementUnderMouse);
972 } 972 }
973 973
974 } // namespace WebCore 974 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/SmartClip.cpp ('k') | Source/core/page/NetworkStateNotifierTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698