OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/css/cssom/CSSStyleImageValue.h" | 5 #include "core/css/cssom/CSSStyleImageValue.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
| 8 namespace cssom { |
8 | 9 |
9 double CSSStyleImageValue::intrinsicWidth(bool& isNull) | 10 double CSSStyleImageValue::intrinsicWidth(bool& isNull) |
10 { | 11 { |
11 isNull = isCachePending(); | 12 isNull = isCachePending(); |
12 if (isNull) | 13 if (isNull) |
13 return 0; | 14 return 0; |
14 return imageLayoutSize().width().toDouble(); | 15 return imageLayoutSize().width().toDouble(); |
15 } | 16 } |
16 | 17 |
17 double CSSStyleImageValue::intrinsicHeight(bool& isNull) | 18 double CSSStyleImageValue::intrinsicHeight(bool& isNull) |
(...skipping 10 matching lines...) Expand all Loading... |
28 if (isNull) { | 29 if (isNull) { |
29 return 0; | 30 return 0; |
30 } | 31 } |
31 if (intrinsicHeight(isNull) == 0) { | 32 if (intrinsicHeight(isNull) == 0) { |
32 isNull = true; | 33 isNull = true; |
33 return 0; | 34 return 0; |
34 } | 35 } |
35 return intrinsicWidth(isNull) / intrinsicHeight(isNull); | 36 return intrinsicWidth(isNull) / intrinsicHeight(isNull); |
36 } | 37 } |
37 | 38 |
| 39 } // namespace cssom |
38 } // namespace blink | 40 } // namespace blink |
| 41 |
OLD | NEW |