| 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 24 matching lines...) Expand all Loading... |
| 35 StyleFetchedImageSet::StyleFetchedImageSet(ImageResourceContent* image, | 35 StyleFetchedImageSet::StyleFetchedImageSet(ImageResourceContent* image, |
| 36 float imageScaleFactor, | 36 float imageScaleFactor, |
| 37 CSSImageSetValue* value, | 37 CSSImageSetValue* value, |
| 38 const KURL& url) | 38 const KURL& url) |
| 39 : m_bestFitImage(image), | 39 : m_bestFitImage(image), |
| 40 m_imageScaleFactor(imageScaleFactor), | 40 m_imageScaleFactor(imageScaleFactor), |
| 41 m_imageSetValue(value), | 41 m_imageSetValue(value), |
| 42 m_url(url) { | 42 m_url(url) { |
| 43 m_isImageResourceSet = true; | 43 m_isImageResourceSet = true; |
| 44 m_bestFitImage->addObserver(this); | 44 m_bestFitImage->addObserver(this); |
| 45 ThreadState::current()->registerPreFinalizer(this); | |
| 46 } | 45 } |
| 47 | 46 |
| 48 StyleFetchedImageSet::~StyleFetchedImageSet() {} | 47 StyleFetchedImageSet::~StyleFetchedImageSet() {} |
| 49 | 48 |
| 50 void StyleFetchedImageSet::dispose() { | 49 void StyleFetchedImageSet::dispose() { |
| 51 m_bestFitImage->removeObserver(this); | 50 m_bestFitImage->removeObserver(this); |
| 52 m_bestFitImage = nullptr; | 51 m_bestFitImage = nullptr; |
| 53 } | 52 } |
| 54 | 53 |
| 55 WrappedImagePtr StyleFetchedImageSet::data() const { | 54 WrappedImagePtr StyleFetchedImageSet::data() const { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 Image::PreCacheMetadata); | 134 Image::PreCacheMetadata); |
| 136 } | 135 } |
| 137 | 136 |
| 138 DEFINE_TRACE(StyleFetchedImageSet) { | 137 DEFINE_TRACE(StyleFetchedImageSet) { |
| 139 visitor->trace(m_bestFitImage); | 138 visitor->trace(m_bestFitImage); |
| 140 visitor->trace(m_imageSetValue); | 139 visitor->trace(m_imageSetValue); |
| 141 StyleImage::trace(visitor); | 140 StyleImage::trace(visitor); |
| 142 } | 141 } |
| 143 | 142 |
| 144 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |