OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 19 matching lines...) Expand all Loading... |
30 #include "core/css/CSSValue.h" | 30 #include "core/css/CSSValue.h" |
31 #include "platform/geometry/IntSizeHash.h" | 31 #include "platform/geometry/IntSizeHash.h" |
32 #include "wtf/HashCountedSet.h" | 32 #include "wtf/HashCountedSet.h" |
33 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class Document; | 37 class Document; |
38 class Image; | 38 class Image; |
39 class LayoutObject; | 39 class LayoutObject; |
| 40 class FloatSize; |
40 | 41 |
41 struct SizeAndCount { | 42 struct SizeAndCount { |
42 DISALLOW_NEW(); | 43 DISALLOW_NEW(); |
43 SizeAndCount(IntSize newSize = IntSize(), int newCount = 0) | 44 SizeAndCount(IntSize newSize = IntSize(), int newCount = 0) |
44 : size(newSize) | 45 : size(newSize) |
45 , count(newCount) | 46 , count(newCount) |
46 { | 47 { |
47 } | 48 } |
48 | 49 |
49 IntSize size; | 50 IntSize size; |
50 int count; | 51 int count; |
51 }; | 52 }; |
52 | 53 |
53 using LayoutObjectSizeCountMap = HashMap<const LayoutObject*, SizeAndCount>; | 54 using LayoutObjectSizeCountMap = HashMap<const LayoutObject*, SizeAndCount>; |
54 | 55 |
55 class CORE_EXPORT CSSImageGeneratorValue : public CSSValue { | 56 class CORE_EXPORT CSSImageGeneratorValue : public CSSValue { |
56 public: | 57 public: |
57 ~CSSImageGeneratorValue(); | 58 ~CSSImageGeneratorValue(); |
58 | 59 |
59 void addClient(const LayoutObject*, const IntSize&); | 60 void addClient(const LayoutObject*, const IntSize&); |
60 void removeClient(const LayoutObject*); | 61 void removeClient(const LayoutObject*); |
61 PassRefPtr<Image> image(const LayoutObject*, const IntSize&); | 62 PassRefPtr<Image> image(const LayoutObject*, const IntSize&); |
62 | 63 |
63 bool isFixedSize() const; | 64 bool isFixedSize() const; |
64 IntSize fixedSize(const LayoutObject*); | 65 IntSize fixedSize(const LayoutObject*, const FloatSize& defaultObjectSize); |
65 | 66 |
66 bool isPending() const; | 67 bool isPending() const; |
67 bool knownToBeOpaque(const LayoutObject*) const; | 68 bool knownToBeOpaque(const LayoutObject*) const; |
68 | 69 |
69 void loadSubimages(Document*); | 70 void loadSubimages(Document*); |
70 | 71 |
71 PassRefPtrWillBeRawPtr<CSSImageGeneratorValue> valueWithURLsMadeAbsolute(); | 72 PassRefPtrWillBeRawPtr<CSSImageGeneratorValue> valueWithURLsMadeAbsolute(); |
72 | 73 |
73 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValue::traceAfterDispatch(visitor)
; } | 74 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValue::traceAfterDispatch(visitor)
; } |
74 | 75 |
(...skipping 14 matching lines...) Expand all Loading... |
89 // there are clients in the LayoutObjectSizeCountMap. | 90 // there are clients in the LayoutObjectSizeCountMap. |
90 SelfKeepAlive<CSSImageGeneratorValue> m_keepAlive; | 91 SelfKeepAlive<CSSImageGeneratorValue> m_keepAlive; |
91 #endif | 92 #endif |
92 }; | 93 }; |
93 | 94 |
94 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageGeneratorValue, isImageGeneratorValue()); | 95 DEFINE_CSS_VALUE_TYPE_CASTS(CSSImageGeneratorValue, isImageGeneratorValue()); |
95 | 96 |
96 } // namespace blink | 97 } // namespace blink |
97 | 98 |
98 #endif // CSSImageGeneratorValue_h | 99 #endif // CSSImageGeneratorValue_h |
OLD | NEW |