OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2012, 2013 Adobe Systems Incorporated. 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 * | 7 * |
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 18 matching lines...) Expand all Loading... |
29 #define DOMPath_h | 29 #define DOMPath_h |
30 | 30 |
31 #include "bindings/v8/ScriptWrappable.h" | 31 #include "bindings/v8/ScriptWrappable.h" |
32 #include "core/html/canvas/CanvasPathMethods.h" | 32 #include "core/html/canvas/CanvasPathMethods.h" |
33 #include "core/svg/SVGPathUtilities.h" | 33 #include "core/svg/SVGPathUtilities.h" |
34 #include "wtf/PassRefPtr.h" | 34 #include "wtf/PassRefPtr.h" |
35 #include "wtf/RefCounted.h" | 35 #include "wtf/RefCounted.h" |
36 | 36 |
37 namespace WebCore { | 37 namespace WebCore { |
38 | 38 |
39 class DOMPath : public RefCounted<DOMPath>, public CanvasPathMethods, public Scr
iptWrappable { | 39 class DOMPath FINAL : public RefCounted<DOMPath>, public CanvasPathMethods, publ
ic ScriptWrappable { |
40 WTF_MAKE_NONCOPYABLE(DOMPath); WTF_MAKE_FAST_ALLOCATED; | 40 WTF_MAKE_NONCOPYABLE(DOMPath); WTF_MAKE_FAST_ALLOCATED; |
41 public: | 41 public: |
42 static PassRefPtr<DOMPath> create() { return adoptRef(new DOMPath); } | 42 static PassRefPtr<DOMPath> create() { return adoptRef(new DOMPath); } |
43 static PassRefPtr<DOMPath> create(const String& pathData) { return adoptRef(
new DOMPath(pathData)); } | 43 static PassRefPtr<DOMPath> create(const String& pathData) { return adoptRef(
new DOMPath(pathData)); } |
44 static PassRefPtr<DOMPath> create(DOMPath* path) { return adoptRef(new DOMPa
th(path)); } | 44 static PassRefPtr<DOMPath> create(DOMPath* path) { return adoptRef(new DOMPa
th(path)); } |
45 | 45 |
46 static PassRefPtr<DOMPath> create(const Path& path) { return adoptRef(new DO
MPath(path)); } | 46 static PassRefPtr<DOMPath> create(const Path& path) { return adoptRef(new DO
MPath(path)); } |
47 | 47 |
48 const Path& path() const { return m_path; } | 48 const Path& path() const { return m_path; } |
49 | 49 |
(...skipping 21 matching lines...) Expand all Loading... |
71 DOMPath(const String& pathData) | 71 DOMPath(const String& pathData) |
72 : CanvasPathMethods() | 72 : CanvasPathMethods() |
73 { | 73 { |
74 ScriptWrappable::init(this); | 74 ScriptWrappable::init(this); |
75 buildPathFromString(pathData, m_path); | 75 buildPathFromString(pathData, m_path); |
76 } | 76 } |
77 }; | 77 }; |
78 | 78 |
79 } | 79 } |
80 #endif | 80 #endif |
OLD | NEW |