OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 10 matching lines...) Expand all Loading... |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef GraphicsLayerDebugInfo_h | 31 #ifndef SVGLengthListTearOff_h |
32 #define GraphicsLayerDebugInfo_h | 32 #define SVGLengthListTearOff_h |
33 | 33 |
34 #include "platform/JSONValues.h" | 34 #include "core/svg/SVGLengthList.h" |
35 #include "platform/geometry/LayoutRect.h" | 35 #include "core/svg/properties/NewSVGListPropertyTearOffHelper.h" |
36 #include "platform/graphics/CompositingReasons.h" | |
37 #include "public/platform/WebGraphicsLayerDebugInfo.h" | |
38 | |
39 #include "wtf/Vector.h" | |
40 | 36 |
41 namespace WebCore { | 37 namespace WebCore { |
42 | 38 |
43 class GraphicsLayerDebugInfo FINAL : public blink::WebGraphicsLayerDebugInfo { | 39 class SVGLengthListTearOff : |
| 40 public NewSVGListPropertyTearOffHelper<SVGLengthListTearOff, SVGLengthList>, |
| 41 public ScriptWrappable { |
44 public: | 42 public: |
45 GraphicsLayerDebugInfo(); | 43 static PassRefPtr<SVGLengthListTearOff> create(PassRefPtr<SVGLengthList> tar
get, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const
QualifiedName& attributeName = nullQName()) |
46 virtual ~GraphicsLayerDebugInfo(); | 44 { |
47 | 45 return adoptRef(new SVGLengthListTearOff(target, contextElement, propert
yIsAnimVal, attributeName)); |
48 virtual void appendAsTraceFormat(blink::WebString* out) const OVERRIDE; | 46 } |
49 | |
50 GraphicsLayerDebugInfo* clone() const; | |
51 | |
52 Vector<LayoutRect>& currentLayoutRects() { return m_currentLayoutRects; } | |
53 CompositingReasons compositingReasons() const { return m_compositingReasons;
} | |
54 void setCompositingReasons(CompositingReasons reasons) { m_compositingReason
s = reasons; } | |
55 | 47 |
56 private: | 48 private: |
57 void appendLayoutRects(JSONObject*) const; | 49 SVGLengthListTearOff(PassRefPtr<SVGLengthList> target, SVGElement* contextEl
ement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeNa
me = nullQName()) |
58 void appendCompositingReasons(JSONObject*) const; | 50 : NewSVGListPropertyTearOffHelper<SVGLengthListTearOff, SVGLengthList>(t
arget, contextElement, propertyIsAnimVal, attributeName) |
59 | 51 { |
60 CompositingReasons m_compositingReasons; | 52 ScriptWrappable::init(this); |
61 Vector<LayoutRect> m_currentLayoutRects; | 53 } |
62 }; | 54 }; |
63 | 55 |
64 } // namespace WebCore | 56 } // namespace WebCore |
65 | 57 |
66 #endif | 58 #endif // SVGLengthListTearOff_h_ |
OLD | NEW |