| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 #if !ENABLE(OILPAN) | 58 #if !ENABLE(OILPAN) |
| 59 void clearImageSetValue() { m_imageSetValue = nullptr; } | 59 void clearImageSetValue() { m_imageSetValue = nullptr; } |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 bool canRender() const override; | 62 bool canRender() const override; |
| 63 bool isLoaded() const override; | 63 bool isLoaded() const override; |
| 64 bool errorOccurred() const override; | 64 bool errorOccurred() const override; |
| 65 LayoutSize imageSize(const LayoutObject*, float multiplier, const LayoutSize
& defaultObjectSize) const override; | 65 LayoutSize imageSize(const LayoutObject*, float multiplier, const LayoutSize
& defaultObjectSize) const override; |
| 66 bool imageHasRelativeSize() const override; | 66 bool imageHasRelativeSize() const override; |
| 67 void computeIntrinsicDimensions(const LayoutObject*, FloatSize& intrinsicSiz
e, FloatSize& intrinsicRatio) override; | |
| 68 bool usesImageContainerSize() const override; | 67 bool usesImageContainerSize() const override; |
| 69 void addClient(LayoutObject*) override; | 68 void addClient(LayoutObject*) override; |
| 70 void removeClient(LayoutObject*) override; | 69 void removeClient(LayoutObject*) override; |
| 71 PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float) const ov
erride; | 70 PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float) const ov
erride; |
| 72 float imageScaleFactor() const override { return m_imageScaleFactor; } | 71 float imageScaleFactor() const override { return m_imageScaleFactor; } |
| 73 bool knownToBeOpaque(const LayoutObject*) const override; | 72 bool knownToBeOpaque(const LayoutObject*) const override; |
| 74 ImageResource* cachedImage() const override; | 73 ImageResource* cachedImage() const override; |
| 75 | 74 |
| 76 DECLARE_VIRTUAL_TRACE(); | 75 DECLARE_VIRTUAL_TRACE(); |
| 77 | 76 |
| 78 private: | 77 private: |
| 79 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu
e*, const KURL&); | 78 StyleFetchedImageSet(ImageResource*, float imageScaleFactor, CSSImageSetValu
e*, const KURL&); |
| 80 | 79 |
| 81 void dispose(); | 80 void dispose(); |
| 82 | 81 |
| 83 String debugName() const override { return "StyleFetchedImageSet"; } | 82 String debugName() const override { return "StyleFetchedImageSet"; } |
| 84 | 83 |
| 85 RefPtrWillBeMember<ImageResource> m_bestFitImage; | 84 RefPtrWillBeMember<ImageResource> m_bestFitImage; |
| 86 float m_imageScaleFactor; | 85 float m_imageScaleFactor; |
| 87 | 86 |
| 88 RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it ow
ns us. | 87 RawPtrWillBeMember<CSSImageSetValue> m_imageSetValue; // Not retained; it ow
ns us. |
| 89 const KURL m_url; | 88 const KURL m_url; |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); | 91 DEFINE_STYLE_IMAGE_TYPE_CASTS(StyleFetchedImageSet, isImageResourceSet()); |
| 93 | 92 |
| 94 } // namespace blink | 93 } // namespace blink |
| 95 | 94 |
| 96 #endif // StyleFetchedImageSet_h | 95 #endif // StyleFetchedImageSet_h |
| OLD | NEW |