OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 CSSImageValue* cssImageValue() const { return m_value->isImageValue() ? toCS
SImageValue(m_value.get()) : 0; } | 59 CSSImageValue* cssImageValue() const { return m_value->isImageValue() ? toCS
SImageValue(m_value.get()) : 0; } |
60 CSSImageGeneratorValue* cssImageGeneratorValue() const { return m_value->isI
mageGeneratorValue() ? toCSSImageGeneratorValue(m_value.get()) : 0; } | 60 CSSImageGeneratorValue* cssImageGeneratorValue() const { return m_value->isI
mageGeneratorValue() ? toCSSImageGeneratorValue(m_value.get()) : 0; } |
61 CSSCursorImageValue* cssCursorImageValue() const { return m_value->isCursorI
mageValue() ? toCSSCursorImageValue(m_value.get()) : 0; } | 61 CSSCursorImageValue* cssCursorImageValue() const { return m_value->isCursorI
mageValue() ? toCSSCursorImageValue(m_value.get()) : 0; } |
62 CSSImageSetValue* cssImageSetValue() const { return m_value->isImageSetValue
() ? toCSSImageSetValue(m_value.get()) : 0; } | 62 CSSImageSetValue* cssImageSetValue() const { return m_value->isImageSetValue
() ? toCSSImageSetValue(m_value.get()) : 0; } |
63 | 63 |
64 LayoutSize imageSize(const LayoutObject*, float /*multiplier*/) const overri
de { return LayoutSize(); } | 64 LayoutSize imageSize(const LayoutObject*, float /*multiplier*/) const overri
de { return LayoutSize(); } |
65 bool imageHasRelativeWidth() const override { return false; } | 65 bool imageHasRelativeWidth() const override { return false; } |
66 bool imageHasRelativeHeight() const override { return false; } | 66 bool imageHasRelativeHeight() const override { return false; } |
67 void computeIntrinsicDimensions(const LayoutObject*, Length& /* intrinsicWid
th */ , Length& /* intrinsicHeight */, FloatSize& /* intrinsicRatio */) override
{ } | 67 void computeIntrinsicDimensions(const LayoutObject*, Length& /* intrinsicWid
th */ , Length& /* intrinsicHeight */, FloatSize& /* intrinsicRatio */) override
{ } |
68 bool usesImageContainerSize() const override { return false; } | 68 bool usesImageContainerSize() const override { return false; } |
69 void setContainerSizeForLayoutObject(const LayoutObject*, const IntSize&, fl
oat) override { } | |
70 void addClient(LayoutObject*) override { } | 69 void addClient(LayoutObject*) override { } |
71 void removeClient(LayoutObject*) override { } | 70 void removeClient(LayoutObject*) override { } |
72 PassRefPtr<Image> image(const LayoutObject*, const IntSize&) const override | 71 PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float, const KU
RL& url) const override |
73 { | 72 { |
74 ASSERT_NOT_REACHED(); | 73 ASSERT_NOT_REACHED(); |
75 return nullptr; | 74 return nullptr; |
76 } | 75 } |
77 bool knownToBeOpaque(const LayoutObject*) const override { return false; } | 76 bool knownToBeOpaque(const LayoutObject*) const override { return false; } |
| 77 KURL url() const override { return KURL(); } |
78 | 78 |
79 DEFINE_INLINE_VIRTUAL_TRACE() | 79 DEFINE_INLINE_VIRTUAL_TRACE() |
80 { | 80 { |
81 visitor->trace(m_value); | 81 visitor->trace(m_value); |
82 StyleImage::trace(visitor); | 82 StyleImage::trace(visitor); |
83 } | 83 } |
84 | 84 |
85 private: | 85 private: |
86 explicit StylePendingImage(const CSSValue& value) | 86 explicit StylePendingImage(const CSSValue& value) |
87 : m_value(const_cast<CSSValue*>(&value)) | 87 : m_value(const_cast<CSSValue*>(&value)) |
88 { | 88 { |
89 m_isPendingImage = true; | 89 m_isPendingImage = true; |
90 } | 90 } |
91 | 91 |
92 // TODO(sashab): Replace this with <const CSSValue> once RefPtrWillBeMember<
> | 92 // TODO(sashab): Replace this with <const CSSValue> once RefPtrWillBeMember<
> |
93 // supports const types. | 93 // supports const types. |
94 RefPtrWillBeMember<CSSValue> m_value; | 94 RefPtrWillBeMember<CSSValue> m_value; |
95 }; | 95 }; |
96 | 96 |
97 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, isPendingImage()); | 97 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, isPendingImage()); |
98 | 98 |
99 } | 99 } |
100 #endif | 100 #endif |
OLD | NEW |