OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return image; | 91 return image; |
92 } | 92 } |
93 return image; | 93 return image; |
94 } | 94 } |
95 | 95 |
96 bool CSSImageSetValue::isCachePending(float deviceScaleFactor) const | 96 bool CSSImageSetValue::isCachePending(float deviceScaleFactor) const |
97 { | 97 { |
98 return m_isCachePending || deviceScaleFactor != m_cachedScaleFactor; | 98 return m_isCachePending || deviceScaleFactor != m_cachedScaleFactor; |
99 } | 99 } |
100 | 100 |
101 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(float deviceScaleFactor) | 101 StyleFetchedImageSet* CSSImageSetValue::cachedImageSet(float deviceScaleFactor)
const |
102 { | 102 { |
103 ASSERT(!isCachePending(deviceScaleFactor)); | 103 ASSERT(!isCachePending(deviceScaleFactor)); |
104 return m_cachedImageSet.get(); | 104 return m_cachedImageSet.get(); |
105 } | 105 } |
106 | 106 |
107 StyleFetchedImageSet* CSSImageSetValue::cacheImageSet(Document* document, float
deviceScaleFactor, const ResourceLoaderOptions& options) | 107 StyleFetchedImageSet* CSSImageSetValue::cacheImageSet(Document* document, float
deviceScaleFactor, const ResourceLoaderOptions& options) |
108 { | 108 { |
109 ASSERT(document); | 109 ASSERT(document); |
110 | 110 |
111 if (!m_imagesInSet.size()) | 111 if (!m_imagesInSet.size()) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::valueWithURLsMadeAbso
lute() | 185 PassRefPtrWillBeRawPtr<CSSImageSetValue> CSSImageSetValue::valueWithURLsMadeAbso
lute() |
186 { | 186 { |
187 RefPtrWillBeRawPtr<CSSImageSetValue> value = CSSImageSetValue::create(); | 187 RefPtrWillBeRawPtr<CSSImageSetValue> value = CSSImageSetValue::create(); |
188 for (auto& item : *this) | 188 for (auto& item : *this) |
189 item->isImageValue() ? value->append(toCSSImageValue(*item).valueWithURL
MadeAbsolute()) : value->append(item); | 189 item->isImageValue() ? value->append(toCSSImageValue(*item).valueWithURL
MadeAbsolute()) : value->append(item); |
190 return value.release(); | 190 return value.release(); |
191 } | 191 } |
192 | 192 |
193 | 193 |
194 } // namespace blink | 194 } // namespace blink |
OLD | NEW |