| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 else if (isLinearGradient()) | 130 else if (isLinearGradient()) |
| 131 result = static_cast<CSSLinearGradientValue*>(this)->clone(); | 131 result = static_cast<CSSLinearGradientValue*>(this)->clone(); |
| 132 else if (isRadialGradient()) | 132 else if (isRadialGradient()) |
| 133 result = static_cast<CSSRadialGradientValue*>(this)->clone(); | 133 result = static_cast<CSSRadialGradientValue*>(this)->clone(); |
| 134 else { | 134 else { |
| 135 ASSERT_NOT_REACHED(); | 135 ASSERT_NOT_REACHED(); |
| 136 return 0; | 136 return 0; |
| 137 } | 137 } |
| 138 | 138 |
| 139 for (unsigned i = 0; i < result->m_stops.size(); i++) | 139 for (unsigned i = 0; i < result->m_stops.size(); i++) |
| 140 result->m_stops[i].m_resolvedColor = styleResolverState.resolveColorFrom
PrimitiveValue(result->m_stops[i].m_color.get()); | 140 result->m_stops[i].m_resolvedColor = styleResolverState.document()->text
LinkColors().colorFromPrimitiveValue(result->m_stops[i].m_color.get(), styleReso
lverState.style()->visitedDependentColor(CSSPropertyColor)); |
| 141 | 141 |
| 142 return result.release(); | 142 return result.release(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
erStyle* rootStyle, float maxLengthForRepeat) | 145 void CSSGradientValue::addStops(Gradient* gradient, RenderObject* renderer, Rend
erStyle* rootStyle, float maxLengthForRepeat) |
| 146 { | 146 { |
| 147 RenderStyle* style = renderer->style(); | 147 RenderStyle* style = renderer->style(); |
| 148 | 148 |
| 149 if (m_gradientType == CSSDeprecatedLinearGradient || m_gradientType == CSSDe
precatedRadialGradient) { | 149 if (m_gradientType == CSSDeprecatedLinearGradient || m_gradientType == CSSDe
precatedRadialGradient) { |
| 150 sortStopsIfNeeded(); | 150 sortStopsIfNeeded(); |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo); | 1203 CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo); |
| 1204 info.addMember(m_firstRadius, "firstRadius"); | 1204 info.addMember(m_firstRadius, "firstRadius"); |
| 1205 info.addMember(m_secondRadius, "secondRadius"); | 1205 info.addMember(m_secondRadius, "secondRadius"); |
| 1206 info.addMember(m_shape, "shape"); | 1206 info.addMember(m_shape, "shape"); |
| 1207 info.addMember(m_sizingBehavior, "sizingBehavior"); | 1207 info.addMember(m_sizingBehavior, "sizingBehavior"); |
| 1208 info.addMember(m_endHorizontalSize, "endHorizontalSize"); | 1208 info.addMember(m_endHorizontalSize, "endHorizontalSize"); |
| 1209 info.addMember(m_endVerticalSize, "endVerticalSize"); | 1209 info.addMember(m_endVerticalSize, "endVerticalSize"); |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 } // namespace WebCore | 1212 } // namespace WebCore |
| OLD | NEW |