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 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 class Document; | 38 class Document; |
39 class FrameView; | 39 class FrameView; |
40 class Page; | 40 class Page; |
41 class LayoutBox; | 41 class LayoutBox; |
42 class SVGImageChromeClient; | 42 class SVGImageChromeClient; |
43 class SVGImageForContainer; | 43 class SVGImageForContainer; |
44 | 44 |
45 class SVGImage final : public Image { | 45 class SVGImage final : public Image, public DisplayItemClient { |
pdr.
2015/12/05 21:39:19
This could be problematic because a single SVGImag
Xianzhu
2015/12/07 17:14:00
If you meant the problem that the invalidation bit
| |
46 public: | 46 public: |
47 static PassRefPtr<SVGImage> create(ImageObserver* observer) | 47 static PassRefPtr<SVGImage> create(ImageObserver* observer) |
48 { | 48 { |
49 return adoptRef(new SVGImage(observer)); | 49 return adoptRef(new SVGImage(observer)); |
50 } | 50 } |
51 | 51 |
52 static bool isInSVGImage(const Node*); | 52 static bool isInSVGImage(const Node*); |
53 | 53 |
54 LayoutBox* embeddedContentBox() const; | 54 LayoutBox* embeddedContentBox() const; |
55 | 55 |
(...skipping 14 matching lines...) Expand all Loading... | |
70 PassRefPtr<SkImage> imageForCurrentFrame() override; | 70 PassRefPtr<SkImage> imageForCurrentFrame() override; |
71 | 71 |
72 // Returns the SVG image document's frame. | 72 // Returns the SVG image document's frame. |
73 FrameView* frameView() const; | 73 FrameView* frameView() const; |
74 | 74 |
75 // Does the SVG image/document contain any animations? | 75 // Does the SVG image/document contain any animations? |
76 bool hasAnimations() const; | 76 bool hasAnimations() const; |
77 | 77 |
78 void updateUseCounters(Document&) const; | 78 void updateUseCounters(Document&) const; |
79 | 79 |
80 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } | 80 String debugName() const final { return "SVGImage"; } |
81 String debugName() const { return "SVGImage"; } | |
82 | 81 |
83 private: | 82 private: |
84 friend class AXLayoutObject; | 83 friend class AXLayoutObject; |
85 friend class SVGImageChromeClient; | 84 friend class SVGImageChromeClient; |
86 friend class SVGImageForContainer; | 85 friend class SVGImageForContainer; |
87 | 86 |
88 ~SVGImage() override; | 87 ~SVGImage() override; |
89 | 88 |
90 String filenameExtension() const override; | 89 String filenameExtension() const override; |
91 | 90 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 m_image->setImageObserver(m_observer); | 133 m_image->setImageObserver(m_observer); |
135 } | 134 } |
136 private: | 135 private: |
137 Image* m_image; | 136 Image* m_image; |
138 ImageObserver* m_observer; | 137 ImageObserver* m_observer; |
139 }; | 138 }; |
140 | 139 |
141 } | 140 } |
142 | 141 |
143 #endif // SVGImage_h | 142 #endif // SVGImage_h |
OLD | NEW |