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

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

Issue 182063004: Rename adoptRefCountedWillBeRefCountedGarbageCollected to adoptRefWillBeRefCountedGarbageCollected (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/svg/SVGColor.cpp » ('j') | 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) Research In Motion Limited 2011. All rights reserved. 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 25 matching lines...) Expand all
36 public: 36 public:
37 enum SVGColorType { 37 enum SVGColorType {
38 SVG_COLORTYPE_UNKNOWN = 0, 38 SVG_COLORTYPE_UNKNOWN = 0,
39 SVG_COLORTYPE_RGBCOLOR = 1, 39 SVG_COLORTYPE_RGBCOLOR = 1,
40 SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2, 40 SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
41 SVG_COLORTYPE_CURRENTCOLOR = 3 41 SVG_COLORTYPE_CURRENTCOLOR = 3
42 }; 42 };
43 43
44 static PassRefPtrWillBeRawPtr<SVGColor> createFromString(const String& rgbCo lor) 44 static PassRefPtrWillBeRawPtr<SVGColor> createFromString(const String& rgbCo lor)
45 { 45 {
46 RefPtrWillBeRawPtr<SVGColor> color = adoptRefCountedWillBeRefCountedGarb ageCollected(new SVGColor(SVG_COLORTYPE_RGBCOLOR)); 46 RefPtrWillBeRawPtr<SVGColor> color = adoptRefWillBeRefCountedGarbageColl ected(new SVGColor(SVG_COLORTYPE_RGBCOLOR));
47 StyleColor styleColor = colorFromRGBColorString(rgbColor); 47 StyleColor styleColor = colorFromRGBColorString(rgbColor);
48 ASSERT(!styleColor.isCurrentColor()); 48 ASSERT(!styleColor.isCurrentColor());
49 color->setColor(styleColor.color()); 49 color->setColor(styleColor.color());
50 return color.release(); 50 return color.release();
51 } 51 }
52 52
53 static PassRefPtrWillBeRawPtr<SVGColor> createFromColor(const Color& rgbColo r) 53 static PassRefPtrWillBeRawPtr<SVGColor> createFromColor(const Color& rgbColo r)
54 { 54 {
55 RefPtrWillBeRawPtr<SVGColor> color = adoptRefCountedWillBeRefCountedGarb ageCollected(new SVGColor(SVG_COLORTYPE_RGBCOLOR)); 55 RefPtrWillBeRawPtr<SVGColor> color = adoptRefWillBeRefCountedGarbageColl ected(new SVGColor(SVG_COLORTYPE_RGBCOLOR));
56 color->setColor(rgbColor); 56 color->setColor(rgbColor);
57 return color.release(); 57 return color.release();
58 } 58 }
59 59
60 static PassRefPtrWillBeRawPtr<SVGColor> createCurrentColor() 60 static PassRefPtrWillBeRawPtr<SVGColor> createCurrentColor()
61 { 61 {
62 return adoptRefCountedWillBeRefCountedGarbageCollected(new SVGColor(SVG_ COLORTYPE_CURRENTCOLOR)); 62 return adoptRefWillBeRefCountedGarbageCollected(new SVGColor(SVG_COLORTY PE_CURRENTCOLOR));
63 } 63 }
64 64
65 const Color& color() const { return m_color; } 65 const Color& color() const { return m_color; }
66 const SVGColorType& colorType() const { return m_colorType; } 66 const SVGColorType& colorType() const { return m_colorType; }
67 PassRefPtrWillBeRawPtr<RGBColor> rgbColor() const; 67 PassRefPtrWillBeRawPtr<RGBColor> rgbColor() const;
68 68
69 static StyleColor colorFromRGBColorString(const String&); 69 static StyleColor colorFromRGBColorString(const String&);
70 70
71 void setRGBColor(const String& rgbColor, ExceptionState&); 71 void setRGBColor(const String& rgbColor, ExceptionState&);
72 void setRGBColorICCColor(const String& rgbColor, const String& iccColor, Exc eptionState&); 72 void setRGBColorICCColor(const String& rgbColor, const String& iccColor, Exc eptionState&);
(...skipping 27 matching lines...) Expand all
100 100
101 Color m_color; 101 Color m_color;
102 SVGColorType m_colorType; 102 SVGColorType m_colorType;
103 }; 103 };
104 104
105 DEFINE_CSS_VALUE_TYPE_CASTS(SVGColor, isSVGColor()); 105 DEFINE_CSS_VALUE_TYPE_CASTS(SVGColor, isSVGColor());
106 106
107 } // namespace WebCore 107 } // namespace WebCore
108 108
109 #endif // SVGColor_h 109 #endif // SVGColor_h
OLDNEW
« no previous file with comments | « Source/core/page/EventSource.cpp ('k') | Source/core/svg/SVGColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698