Chromium Code Reviews| Index: Source/core/svg/SVGPaint.h |
| diff --git a/Source/core/svg/SVGPaint.h b/Source/core/svg/SVGPaint.h |
| index cf54b43d32ebcc0379eba79cb7e919f73ecb6cb9..dc449abfb6ec8e4d6a71478b46159b07aac4084e 100644 |
| --- a/Source/core/svg/SVGPaint.h |
| +++ b/Source/core/svg/SVGPaint.h |
| @@ -23,14 +23,9 @@ |
| #ifndef SVGPaint_h |
| #define SVGPaint_h |
| -#include "core/css/CSSValue.h" |
| -#include "core/css/StyleColor.h" |
| -#include "platform/graphics/Color.h" |
| -#include "wtf/text/WTFString.h" |
| - |
| namespace WebCore { |
| -class SVGPaint : public CSSValue { |
| +class SVGPaint { |
| public: |
| enum SVGPaintType { |
|
pdr
2014/06/30 22:39:59
I think we need a new home for this. CSSValue.h?
|
| SVG_PAINTTYPE_UNKNOWN, |
| @@ -44,91 +39,8 @@ public: |
| SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR, |
| SVG_PAINTTYPE_URI |
| }; |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createUnknown() |
| - { |
| - return adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_UNKNOWN)); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createNone() |
| - { |
| - return adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_NONE)); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createCurrentColor() |
| - { |
| - return adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_CURRENTCOLOR)); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createColor(const Color& color) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_RGBCOLOR)); |
| - paint->m_color = color; |
| - return paint.release(); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createURI(const String& uri) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_URI, uri)); |
| - return paint.release(); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createURIAndColor(const String& uri, const Color& color) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_URI_RGBCOLOR, uri)); |
| - paint->m_color = color; |
| - return paint.release(); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createURIAndNone(const String& uri) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_URI_NONE, uri)); |
| - return paint.release(); |
| - } |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> createURIAndCurrentColor(const String& uri) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(SVG_PAINTTYPE_URI_CURRENTCOLOR, uri)); |
| - return paint.release(); |
| - } |
| - |
| - const SVGPaintType& paintType() const { return m_paintType; } |
| - String uri() const { return m_uri; } |
| - |
| - String customCSSText() const; |
| - |
| - PassRefPtrWillBeRawPtr<SVGPaint> cloneForCSSOM() const; |
| - |
| - bool equals(const SVGPaint&) const; |
| - |
| - void traceAfterDispatch(Visitor* visitor) { CSSValue::traceAfterDispatch(visitor); } |
| - |
| - Color color() const { return m_color; } |
| - void setColor(const Color& color) { m_color = color; m_paintType = SVG_PAINTTYPE_RGBCOLOR; } |
| - |
| - static StyleColor colorFromRGBColorString(const String&); |
| - |
| -private: |
| - friend class CSSComputedStyleDeclaration; |
| - |
| - static PassRefPtrWillBeRawPtr<SVGPaint> create(const SVGPaintType& type, const String& uri, const Color& color) |
| - { |
| - RefPtrWillBeRawPtr<SVGPaint> paint = adoptRefWillBeNoop(new SVGPaint(type, uri)); |
| - paint->m_color = color; |
| - return paint.release(); |
| - } |
| - |
| -private: |
| - SVGPaint(const SVGPaintType&, const String& uri = String()); |
| - SVGPaint(const SVGPaint& cloneFrom); |
| - |
| - SVGPaintType m_paintType; |
| - Color m_color; |
| - String m_uri; |
| }; |
| -DEFINE_CSS_VALUE_TYPE_CASTS(SVGPaint, isSVGPaint()); |
| - |
| } // namespace WebCore |
| #endif // SVGPaint_h |