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

Side by Side Diff: third_party/WebKit/Source/core/style/ShapeValue.h

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 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) 2012 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 enum ShapeValueType { 44 enum ShapeValueType {
45 // The Auto value is defined by a null ShapeValue* 45 // The Auto value is defined by a null ShapeValue*
46 Shape, 46 Shape,
47 Box, 47 Box,
48 Image 48 Image
49 }; 49 };
50 50
51 static ShapeValue* createShapeValue(PassRefPtr<BasicShape> shape, CSSBoxType cssBox) 51 static ShapeValue* createShapeValue(PassRefPtr<BasicShape> shape, CSSBoxType cssBox)
52 { 52 {
53 return new ShapeValue(shape, cssBox); 53 return new ShapeValue(std::move(shape), cssBox);
54 } 54 }
55 55
56 static ShapeValue* createBoxShapeValue(CSSBoxType cssBox) 56 static ShapeValue* createBoxShapeValue(CSSBoxType cssBox)
57 { 57 {
58 return new ShapeValue(cssBox); 58 return new ShapeValue(cssBox);
59 } 59 }
60 60
61 static ShapeValue* createImageValue(StyleImage* image) 61 static ShapeValue* createImageValue(StyleImage* image)
62 { 62 {
63 return new ShapeValue(image); 63 return new ShapeValue(image);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return dataEquivalent(image(), other.image()); 135 return dataEquivalent(image(), other.image());
136 } 136 }
137 137
138 ASSERT_NOT_REACHED(); 138 ASSERT_NOT_REACHED();
139 return false; 139 return false;
140 } 140 }
141 141
142 } // namespace blink 142 } // namespace blink
143 143
144 #endif 144 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698