| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |