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

Side by Side Diff: Source/core/css/CSSGradientValue.cpp

Issue 654933004: Remove now-unnecessary VectorTraits specializations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated to just use improved VectorTraits.h Created 6 years, 2 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 | « no previous file | Source/core/css/RuleFeature.h » ('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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 Color color; 107 Color color;
108 float offset; 108 float offset;
109 bool specified; 109 bool specified;
110 110
111 GradientStop() 111 GradientStop()
112 : offset(0) 112 : offset(0)
113 , specified(false) 113 , specified(false)
114 { } 114 { }
115 }; 115 };
116 116
117 } // namespace blink
118
119 // Escape out and declare VectorTraits for GradientStop before it is used
120 // in a HeapVector with an inline capacity.
121 namespace WTF {
122
123 template<>
124 struct VectorTraits<blink::GradientStop> : SimpleClassVectorTraits<blink::Gradie ntStop> {
125 // IsPod<> doesn't handle embedded structs/enums (e.g., Color.)
126 static const bool needsDestruction = false;
127 };
128
129 } // namespace WTF
130
131 namespace blink {
132
133 PassRefPtrWillBeRawPtr<CSSGradientValue> CSSGradientValue::gradientWithStylesRes olved(const TextLinkColors& textLinkColors, Color currentColor) 117 PassRefPtrWillBeRawPtr<CSSGradientValue> CSSGradientValue::gradientWithStylesRes olved(const TextLinkColors& textLinkColors, Color currentColor)
134 { 118 {
135 bool derived = false; 119 bool derived = false;
136 for (auto& stop : m_stops) { 120 for (auto& stop : m_stops) {
137 if (!stop.isHint() && stop.m_color->colorIsDerivedFromElement()) { 121 if (!stop.isHint() && stop.m_color->colorIsDerivedFromElement()) {
138 stop.m_colorIsDerivedFromElement = true; 122 stop.m_colorIsDerivedFromElement = true;
139 derived = true; 123 derived = true;
140 break; 124 break;
141 } 125 }
142 } 126 }
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 visitor->trace(m_firstRadius); 1305 visitor->trace(m_firstRadius);
1322 visitor->trace(m_secondRadius); 1306 visitor->trace(m_secondRadius);
1323 visitor->trace(m_shape); 1307 visitor->trace(m_shape);
1324 visitor->trace(m_sizingBehavior); 1308 visitor->trace(m_sizingBehavior);
1325 visitor->trace(m_endHorizontalSize); 1309 visitor->trace(m_endHorizontalSize);
1326 visitor->trace(m_endVerticalSize); 1310 visitor->trace(m_endVerticalSize);
1327 CSSGradientValue::traceAfterDispatch(visitor); 1311 CSSGradientValue::traceAfterDispatch(visitor);
1328 } 1312 }
1329 1313
1330 } // namespace blink 1314 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698