Index: webkit/port/bindings/v8/RGBColor.cpp |
=================================================================== |
--- webkit/port/bindings/v8/RGBColor.cpp (revision 19889) |
+++ webkit/port/bindings/v8/RGBColor.cpp (working copy) |
@@ -31,20 +31,28 @@ |
namespace WebCore { |
-PassRefPtr<CSSPrimitiveValue> RGBColor::red() { |
- unsigned int value = (m_rgbcolor >> 16) & 0xFF; |
- return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
+PassRefPtr<RGBColor> RGBColor::create(unsigned rgbcolor) |
+{ |
+ return adoptRef(new RGBColor(rgbcolor)); |
} |
-PassRefPtr<CSSPrimitiveValue> RGBColor::green() { |
- unsigned int value = (m_rgbcolor >> 8) & 0xFF; |
- return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
+PassRefPtr<CSSPrimitiveValue> RGBColor::red() |
+{ |
+ unsigned int value = (m_rgbcolor >> 16) & 0xFF; |
+ return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
} |
-PassRefPtr<CSSPrimitiveValue> RGBColor::blue() { |
- unsigned int value = m_rgbcolor & 0xFF; |
- return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
+PassRefPtr<CSSPrimitiveValue> RGBColor::green() |
+{ |
+ unsigned int value = (m_rgbcolor >> 8) & 0xFF; |
+ return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
} |
+PassRefPtr<CSSPrimitiveValue> RGBColor::blue() |
+{ |
+ unsigned int value = m_rgbcolor & 0xFF; |
+ return CSSPrimitiveValue::create(value, CSSPrimitiveValue::CSS_NUMBER); |
+} |
+ |
} // namespace WebCore |