| 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 #ifndef CSSStyleImageValue_h | 5 #ifndef CSSStyleImageValue_h |
| 6 #define CSSStyleImageValue_h | 6 #define CSSStyleImageValue_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/css/CSSImageValue.h" | 9 #include "core/css/CSSImageValue.h" |
| 10 #include "core/css/CSSImageValue.h" | 10 #include "core/css/CSSImageValue.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 : m_imageValue(imageValue) {} | 55 : m_imageValue(imageValue) {} |
| 56 | 56 |
| 57 virtual LayoutSize imageLayoutSize() const { | 57 virtual LayoutSize imageLayoutSize() const { |
| 58 DCHECK(!isCachePending()); | 58 DCHECK(!isCachePending()); |
| 59 return m_imageValue->cachedImage()->cachedImage()->imageSize( | 59 return m_imageValue->cachedImage()->cachedImage()->imageSize( |
| 60 DoNotRespectImageOrientation, 1, ImageResourceContent::IntrinsicSize); | 60 DoNotRespectImageOrientation, 1, ImageResourceContent::IntrinsicSize); |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual bool isCachePending() const { return m_imageValue->isCachePending(); } | 63 virtual bool isCachePending() const { return m_imageValue->isCachePending(); } |
| 64 | 64 |
| 65 Resource::Status status() const override { | 65 ResourceStatus status() const override { |
| 66 if (isCachePending()) | 66 if (isCachePending()) |
| 67 return Resource::Status::NotStarted; | 67 return ResourceStatus::NotStarted; |
| 68 return m_imageValue->cachedImage()->cachedImage()->getStatus(); | 68 return m_imageValue->cachedImage()->cachedImage()->getStatus(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 const CSSImageValue* cssImageValue() const { return m_imageValue.get(); }; | 71 const CSSImageValue* cssImageValue() const { return m_imageValue.get(); }; |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 PassRefPtr<Image> image() const; | 74 PassRefPtr<Image> image() const; |
| 75 | 75 |
| 76 Member<const CSSImageValue> m_imageValue; | 76 Member<const CSSImageValue> m_imageValue; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace blink | 79 } // namespace blink |
| 80 | 80 |
| 81 #endif // CSSResourceValue_h | 81 #endif // CSSResourceValue_h |
| OLD | NEW |