OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
3 * Copyright (C) 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2009 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 13 matching lines...) Expand all Loading... |
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 */ | 25 */ |
26 | 26 |
27 #ifndef SVGImage_h | 27 #ifndef SVGImage_h |
28 #define SVGImage_h | 28 #define SVGImage_h |
29 | 29 |
30 #include "platform/graphics/Image.h" | 30 #include "platform/graphics/Image.h" |
31 #include "platform/graphics/paint/DisplayItemClient.h" | 31 #include "platform/graphics/paint/DisplayItemClient.h" |
32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
33 #include "platform/weborigin/KURL.h" | 33 #include "platform/weborigin/KURL.h" |
| 34 #include "wtf/Allocator.h" |
34 | 35 |
35 namespace blink { | 36 namespace blink { |
36 | 37 |
37 class Document; | 38 class Document; |
38 class FrameView; | 39 class FrameView; |
39 class Page; | 40 class Page; |
40 class LayoutBox; | 41 class LayoutBox; |
41 class SVGImageChromeClient; | 42 class SVGImageChromeClient; |
42 class SVGImageForContainer; | 43 class SVGImageForContainer; |
43 | 44 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 107 |
107 OwnPtrWillBePersistent<SVGImageChromeClient> m_chromeClient; | 108 OwnPtrWillBePersistent<SVGImageChromeClient> m_chromeClient; |
108 OwnPtrWillBePersistent<Page> m_page; | 109 OwnPtrWillBePersistent<Page> m_page; |
109 IntSize m_intrinsicSize; | 110 IntSize m_intrinsicSize; |
110 KURL m_url; | 111 KURL m_url; |
111 }; | 112 }; |
112 | 113 |
113 DEFINE_IMAGE_TYPE_CASTS(SVGImage); | 114 DEFINE_IMAGE_TYPE_CASTS(SVGImage); |
114 | 115 |
115 class ImageObserverDisabler { | 116 class ImageObserverDisabler { |
| 117 STACK_ALLOCATED(); |
116 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); | 118 WTF_MAKE_NONCOPYABLE(ImageObserverDisabler); |
117 public: | 119 public: |
118 ImageObserverDisabler(Image* image) | 120 ImageObserverDisabler(Image* image) |
119 : m_image(image) | 121 : m_image(image) |
120 { | 122 { |
121 m_observer = m_image->imageObserver(); | 123 m_observer = m_image->imageObserver(); |
122 m_image->setImageObserver(0); | 124 m_image->setImageObserver(0); |
123 } | 125 } |
124 | 126 |
125 ~ImageObserverDisabler() | 127 ~ImageObserverDisabler() |
126 { | 128 { |
127 m_image->setImageObserver(m_observer); | 129 m_image->setImageObserver(m_observer); |
128 } | 130 } |
129 private: | 131 private: |
130 Image* m_image; | 132 Image* m_image; |
131 ImageObserver* m_observer; | 133 ImageObserver* m_observer; |
132 }; | 134 }; |
133 | 135 |
134 } | 136 } |
135 | 137 |
136 #endif // SVGImage_h | 138 #endif // SVGImage_h |
OLD | NEW |