OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012 Adobe Systems Incorporated. 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 break; | 109 break; |
110 } | 110 } |
111 default: | 111 default: |
112 break; | 112 break; |
113 } | 113 } |
114 return pool.createValue(basicShapeValue.release()); | 114 return pool.createValue(basicShapeValue.release()); |
115 } | 115 } |
116 | 116 |
117 static Length convertToLength(const StyleResolverState& state, CSSPrimitiveValue
* value) | 117 static Length convertToLength(const StyleResolverState& state, CSSPrimitiveValue
* value) |
118 { | 118 { |
119 return value->convertToLength<FixedConversion | PercentConversion>(state.sty
le(), state.rootElementStyle(), state.style()->effectiveZoom()); | 119 return value->convertToLength<FixedConversion | PercentConversion>(state.css
ToLengthConversionData()); |
120 } | 120 } |
121 | 121 |
122 PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const
CSSBasicShape* basicShapeValue) | 122 PassRefPtr<BasicShape> basicShapeForValue(const StyleResolverState& state, const
CSSBasicShape* basicShapeValue) |
123 { | 123 { |
124 RefPtr<BasicShape> basicShape; | 124 RefPtr<BasicShape> basicShape; |
125 | 125 |
126 switch (basicShapeValue->type()) { | 126 switch (basicShapeValue->type()) { |
127 case CSSBasicShape::CSSBasicShapeRectangleType: { | 127 case CSSBasicShape::CSSBasicShapeRectangleType: { |
128 const CSSBasicShapeRectangle* rectValue = static_cast<const CSSBasicShap
eRectangle *>(basicShapeValue); | 128 const CSSBasicShapeRectangle* rectValue = static_cast<const CSSBasicShap
eRectangle *>(basicShapeValue); |
129 RefPtr<BasicShapeRectangle> rect = BasicShapeRectangle::create(); | 129 RefPtr<BasicShapeRectangle> rect = BasicShapeRectangle::create(); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 basicShape = rect.release(); | 203 basicShape = rect.release(); |
204 break; | 204 break; |
205 } | 205 } |
206 default: | 206 default: |
207 break; | 207 break; |
208 } | 208 } |
209 return basicShape.release(); | 209 return basicShape.release(); |
210 } | 210 } |
211 } | 211 } |
OLD | NEW |