Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: third_party/WebKit/Source/core/svg/SVGPath.h

Issue 1416273002: Remove SVGPathElement.pathSegList and related interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGPath.h
diff --git a/third_party/WebKit/Source/core/svg/SVGTransformList.h b/third_party/WebKit/Source/core/svg/SVGPath.h
similarity index 68%
copy from third_party/WebKit/Source/core/svg/SVGTransformList.h
copy to third_party/WebKit/Source/core/svg/SVGPath.h
index 695cc6ef5ea026fbd7d5c923caf1108afe6ef38a..5ca84a9dd2a30795d03cd46e554e11abd02604b7 100644
--- a/third_party/WebKit/Source/core/svg/SVGTransformList.h
+++ b/third_party/WebKit/Source/core/svg/SVGPath.h
@@ -28,54 +28,56 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SVGTransformList_h
-#define SVGTransformList_h
+#ifndef SVGPath_h
+#define SVGPath_h
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "core/svg/SVGTransform.h"
-#include "core/svg/properties/SVGListPropertyHelper.h"
+#include "core/svg/properties/SVGProperty.h"
namespace blink {
-class SVGTransformListTearOff;
+class ExceptionState;
+class SVGPathByteStream;
-class SVGTransformList final : public SVGListPropertyHelper<SVGTransformList, SVGTransform> {
+class SVGPath : public SVGPropertyBase {
public:
- typedef SVGTransformListTearOff TearOffType;
+ typedef void TearOffType;
- static PassRefPtrWillBeRawPtr<SVGTransformList> create()
+ static PassRefPtrWillBeRawPtr<SVGPath> create()
{
- return adoptRefWillBeNoop(new SVGTransformList());
+ return adoptRefWillBeNoop(new SVGPath());
}
- static PassRefPtrWillBeRawPtr<SVGTransformList> create(SVGTransformType, const String&);
+ ~SVGPath() override;
- ~SVGTransformList() override;
-
- PassRefPtrWillBeRawPtr<SVGTransform> consolidate();
-
- bool concatenate(AffineTransform& result) const;
+ const SVGPathByteStream& byteStream() const;
+ SVGPathByteStream& mutableByteStream();
// SVGPropertyBase:
+ PassRefPtrWillBeRawPtr<SVGPath> clone() const;
PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String&) const override;
String valueAsString() const override;
void setValueAsString(const String&, ExceptionState&);
- bool parse(const UChar*& ptr, const UChar* end);
- bool parse(const LChar*& ptr, const LChar* end);
void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override;
void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> fromValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toValue, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDurationValue, SVGElement*) override;
float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGElement*) override;
- static AnimatedPropertyType classType() { return AnimatedTransformList; }
+ static AnimatedPropertyType classType() { return AnimatedPath; }
private:
- SVGTransformList();
+ SVGPath();
+ explicit SVGPath(PassOwnPtr<SVGPathByteStream>);
- template <typename CharType>
- bool parseInternal(const CharType*& ptr, const CharType* end);
+ OwnPtr<SVGPathByteStream> m_byteStream;
};
+inline PassRefPtrWillBeRawPtr<SVGPath> toSVGPath(PassRefPtrWillBeRawPtr<SVGPropertyBase> passBase)
+{
+ RefPtrWillBeRawPtr<SVGPropertyBase> base = passBase;
+ ASSERT(base->type() == SVGPath::classType());
+ return static_pointer_cast<SVGPath>(base.release());
+}
+
} // namespace blink
-#endif // SVGTransformList_h
+#endif
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGAnimatedPath.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698