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

Side by Side Diff: Source/platform/DragImage.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return adoptPtr(new DragImage(skBitmap, deviceScaleFactor)); 108 return adoptPtr(new DragImage(skBitmap, deviceScaleFactor));
109 } 109 }
110 110
111 static Font deriveDragLabelFont(int size, FontWeight fontWeight, const FontDescr iption& systemFont) 111 static Font deriveDragLabelFont(int size, FontWeight fontWeight, const FontDescr iption& systemFont)
112 { 112 {
113 FontDescription description = systemFont; 113 FontDescription description = systemFont;
114 description.setWeight(fontWeight); 114 description.setWeight(fontWeight);
115 description.setSpecifiedSize(size); 115 description.setSpecifiedSize(size);
116 description.setComputedSize(size); 116 description.setComputedSize(size);
117 Font result(description); 117 Font result(description);
118 result.update(0); 118 result.update(nullptr);
119 return result; 119 return result;
120 } 120 }
121 121
122 PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel, const FontDescription& systemFont, float deviceScaleFactor) 122 PassOwnPtr<DragImage> DragImage::create(const KURL& url, const String& inLabel, const FontDescription& systemFont, float deviceScaleFactor)
123 { 123 {
124 const Font labelFont = deriveDragLabelFont(kDragLinkLabelFontSize, FontWeigh tBold, systemFont); 124 const Font labelFont = deriveDragLabelFont(kDragLinkLabelFontSize, FontWeigh tBold, systemFont);
125 const Font urlFont = deriveDragLabelFont(kDragLinkUrlFontSize, FontWeightNor mal, systemFont); 125 const Font urlFont = deriveDragLabelFont(kDragLinkUrlFontSize, FontWeightNor mal, systemFont);
126 FontCachePurgePreventer fontCachePurgePreventer; 126 FontCachePurgePreventer fontCachePurgePreventer;
127 127
128 bool drawURLString = true; 128 bool drawURLString = true;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 *pixel = SkPreMultiplyARGB( 265 *pixel = SkPreMultiplyARGB(
266 SkColorGetA(*pixel) * fraction, 266 SkColorGetA(*pixel) * fraction,
267 SkColorGetR(*pixel), 267 SkColorGetR(*pixel),
268 SkColorGetG(*pixel), 268 SkColorGetG(*pixel),
269 SkColorGetB(*pixel)); 269 SkColorGetB(*pixel));
270 } 270 }
271 } 271 }
272 } 272 }
273 273
274 } // namespace WebCore 274 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/websockets/WorkerThreadableWebSocketChannel.cpp ('k') | Source/platform/JSONValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698