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

Side by Side Diff: Source/core/svg/SVGPaint.h

Issue 205863002: Remove SVGPaintType enum hardcoding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmial.com> 4 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmial.com>
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 17 matching lines...) Expand all
28 #include "platform/graphics/Color.h" 28 #include "platform/graphics/Color.h"
29 #include "wtf/text/WTFString.h" 29 #include "wtf/text/WTFString.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 class ExceptionState; 33 class ExceptionState;
34 34
35 class SVGPaint : public CSSValue { 35 class SVGPaint : public CSSValue {
36 public: 36 public:
37 enum SVGPaintType { 37 enum SVGPaintType {
38 SVG_PAINTTYPE_UNKNOWN = 0, 38 SVG_PAINTTYPE_UNKNOWN,
39 SVG_PAINTTYPE_RGBCOLOR = 1, 39 SVG_PAINTTYPE_RGBCOLOR,
40 SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2, 40 SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR,
41 SVG_PAINTTYPE_NONE = 101, 41 SVG_PAINTTYPE_NONE,
42 SVG_PAINTTYPE_CURRENTCOLOR = 102, 42 SVG_PAINTTYPE_CURRENTCOLOR,
43 SVG_PAINTTYPE_URI_NONE = 103, 43 SVG_PAINTTYPE_URI_NONE,
44 SVG_PAINTTYPE_URI_CURRENTCOLOR = 104, 44 SVG_PAINTTYPE_URI_CURRENTCOLOR,
45 SVG_PAINTTYPE_URI_RGBCOLOR = 105, 45 SVG_PAINTTYPE_URI_RGBCOLOR,
46 SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106, 46 SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR,
47 SVG_PAINTTYPE_URI = 107 47 SVG_PAINTTYPE_URI
48 }; 48 };
49 49
50 static PassRefPtrWillBeRawPtr<SVGPaint> createUnknown() 50 static PassRefPtrWillBeRawPtr<SVGPaint> createUnknown()
51 { 51 {
52 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(SVG_PAINTTY PE_UNKNOWN)); 52 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(SVG_PAINTTY PE_UNKNOWN));
53 } 53 }
54 54
55 static PassRefPtrWillBeRawPtr<SVGPaint> createNone() 55 static PassRefPtrWillBeRawPtr<SVGPaint> createNone()
56 { 56 {
57 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(SVG_PAINTTY PE_NONE)); 57 return adoptRefWillBeRefCountedGarbageCollected(new SVGPaint(SVG_PAINTTY PE_NONE));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 SVGPaintType m_paintType; 127 SVGPaintType m_paintType;
128 Color m_color; 128 Color m_color;
129 String m_uri; 129 String m_uri;
130 }; 130 };
131 131
132 DEFINE_CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint()); 132 DEFINE_CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint());
133 133
134 } // namespace WebCore 134 } // namespace WebCore
135 135
136 #endif // SVGPaint_h 136 #endif // SVGPaint_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698