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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 // Need to look up our size. Create a string of width*height to use as
a hash key. | 62 // Need to look up our size. Create a string of width*height to use as
a hash key. |
63 Image* result = getImage(renderer, size); | 63 Image* result = getImage(renderer, size); |
64 if (result) | 64 if (result) |
65 return result; | 65 return result; |
66 } | 66 } |
67 | 67 |
68 // We need to create an image. | 68 // We need to create an image. |
69 RefPtr<Gradient> gradient; | 69 RefPtr<Gradient> gradient; |
70 | 70 |
71 LayoutStyle* rootStyle = renderer->document().documentElement()->layoutStyle
(); | 71 const LayoutStyle* rootStyle = renderer->document().documentElement()->layou
tStyle(); |
72 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende
rer->view(), renderer->style()->effectiveZoom()); | 72 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende
rer->view(), renderer->style()->effectiveZoom()); |
73 if (isLinearGradientValue()) | 73 if (isLinearGradientValue()) |
74 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData
, size, *renderer); | 74 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData
, size, *renderer); |
75 else | 75 else |
76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData
, size, *renderer); | 76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData
, size, *renderer); |
77 | 77 |
78 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size); | 78 RefPtr<Image> newImage = GradientGeneratedImage::create(gradient, size); |
79 if (cacheable) | 79 if (cacheable) |
80 putImage(size, newImage); | 80 putImage(size, newImage); |
81 | 81 |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1266 visitor->trace(m_firstRadius); | 1266 visitor->trace(m_firstRadius); |
1267 visitor->trace(m_secondRadius); | 1267 visitor->trace(m_secondRadius); |
1268 visitor->trace(m_shape); | 1268 visitor->trace(m_shape); |
1269 visitor->trace(m_sizingBehavior); | 1269 visitor->trace(m_sizingBehavior); |
1270 visitor->trace(m_endHorizontalSize); | 1270 visitor->trace(m_endHorizontalSize); |
1271 visitor->trace(m_endVerticalSize); | 1271 visitor->trace(m_endVerticalSize); |
1272 CSSGradientValue::traceAfterDispatch(visitor); | 1272 CSSGradientValue::traceAfterDispatch(visitor); |
1273 } | 1273 } |
1274 | 1274 |
1275 } // namespace blink | 1275 } // namespace blink |
OLD | NEW |