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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 RenderStyle* rootStyle = renderer->document().documentElement()->renderStyle
(); | 71 RenderStyle* rootStyle = renderer->document().documentElement()->renderStyle
(); |
72 CSSToLengthConversionData conversionData(renderer->style(), rootStyle, rende
rer->view()); | 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); | 74 gradient = toCSSLinearGradientValue(this)->createGradient(conversionData
, size); |
75 else | 75 else |
76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData
, size); | 76 gradient = toCSSRadialGradientValue(this)->createGradient(conversionData
, size); |
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 |
82 return newImage.release(); | 82 return newImage.release(); |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 visitor->trace(m_firstRadius); | 1305 visitor->trace(m_firstRadius); |
1306 visitor->trace(m_secondRadius); | 1306 visitor->trace(m_secondRadius); |
1307 visitor->trace(m_shape); | 1307 visitor->trace(m_shape); |
1308 visitor->trace(m_sizingBehavior); | 1308 visitor->trace(m_sizingBehavior); |
1309 visitor->trace(m_endHorizontalSize); | 1309 visitor->trace(m_endHorizontalSize); |
1310 visitor->trace(m_endVerticalSize); | 1310 visitor->trace(m_endVerticalSize); |
1311 CSSGradientValue::traceAfterDispatch(visitor); | 1311 CSSGradientValue::traceAfterDispatch(visitor); |
1312 } | 1312 } |
1313 | 1313 |
1314 } // namespace blink | 1314 } // namespace blink |
OLD | NEW |