Fixed: <rdar://problem/3841774> would like to get NSColor from DOM-CSS
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Oct 2004 23:17:56 +0000 (23:17 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Oct 2004 23:17:56 +0000 (23:17 +0000)
        Reviewed by john.

        * kwq/DOM-CSS.mm:
        (-[DOMRGBColor _color]): new, returns getNSColor on KWQColor
        * kwq/DOMPrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7847 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/kwq/DOM-CSS.mm
WebCore/kwq/DOMPrivate.h

index ee369123250de543565dc635ddafd806a442fabd..dec1f9f722f0022696d65863a562339b2dc4ff57 100644 (file)
@@ -1,3 +1,13 @@
+2004-10-15  Chris Blumenberg  <cblu@apple.com>
+
+       Fixed: <rdar://problem/3841774> would like to get NSColor from DOM-CSS
+
+        Reviewed by john.
+
+        * kwq/DOM-CSS.mm:
+        (-[DOMRGBColor _color]): new, returns getNSColor on KWQColor
+        * kwq/DOMPrivate.h:
+
 2004-10-15  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt
index 94c1266ddf826407c9b41437e7ccc2a922527bb4..a0297ed314135559259393ea4ebd2397b18a0500 100644 (file)
@@ -1139,6 +1139,17 @@ void removeWrapperForRGB(QRgb value)
 
 @end
 
+@implementation DOMRGBColor (WebPrivate)
+
+- (NSColor *)_color
+{
+    QRgb rgb = reinterpret_cast<QRgb>(_internal);
+    return QColor(rgb).getNSColor();
+}
+
+@end
+
+
 //------------------------------------------------------------------------------------------
 // DOMRect
 
index 8889fd3ec71d623d324984d8a4ae32aa7182e376..e1ab97dae94c2f9fe1bf54ba6aeffc26d23670bf 100644 (file)
 #import <WebCore/DOMRange.h>
 
 @interface DOMRange (WebPrivate)
-- (NSString *)_text; // uses same algorithm as innerText
+// uses same algorithm as innerText
+- (NSString *)_text;
+@end
+
+@interface DOMRGBColor (WebPrivate)
+// fast and easy way of getting an NSColor for a DOMRGBColor
+- (NSColor *)_color;
 @end