OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/css/MediaValues.h" | 6 #include "core/css/MediaValues.h" |
7 | 7 |
8 #include "core/css/CSSHelper.h" | 8 #include "core/css/CSSHelper.h" |
9 #include "core/css/MediaValuesCached.h" | 9 #include "core/css/MediaValuesCached.h" |
10 #include "core/css/MediaValuesDynamic.h" | 10 #include "core/css/MediaValuesDynamic.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 case CSSPrimitiveValue::CSS_PT: | 189 case CSSPrimitiveValue::CSS_PT: |
190 factor = cssPixelsPerPoint; | 190 factor = cssPixelsPerPoint; |
191 break; | 191 break; |
192 case CSSPrimitiveValue::CSS_PC: | 192 case CSSPrimitiveValue::CSS_PC: |
193 factor = cssPixelsPerPica; | 193 factor = cssPixelsPerPica; |
194 break; | 194 break; |
195 default: | 195 default: |
196 return false; | 196 return false; |
197 } | 197 } |
198 | 198 |
| 199 ASSERT(factor > 0); |
199 result = value * factor; | 200 result = value * factor; |
200 return true; | 201 return true; |
201 | |
202 ASSERT(factor > 0); | |
203 } | 202 } |
204 | 203 |
205 } // namespace | 204 } // namespace |
OLD | NEW |