2009-01-25 Darin Adler <darin@apple.com>
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jan 2009 07:14:59 +0000 (07:14 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Jan 2009 07:14:59 +0000 (07:14 +0000)
        Try to fix Tiger buildbot.

        * WebCore.xcodeproj/project.pbxproj: Turn off cast-qual for WebDashboardRegion.m.
        * page/mac/WebDashboardRegion.m:
        (typeName): Added.
        (-[WebDashboardRegion description]): Use typeName.
        (-[WebDashboardRegion isEqual:]): Added comment.

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

WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/page/mac/WebDashboardRegion.m

index 1888eb0..cfdea84 100644 (file)
@@ -1,3 +1,13 @@
+2009-01-25  Darin Adler  <darin@apple.com>
+
+        Try to fix Tiger buildbot.
+
+        * WebCore.xcodeproj/project.pbxproj: Turn off cast-qual for WebDashboardRegion.m.
+        * page/mac/WebDashboardRegion.m:
+        (typeName): Added.
+        (-[WebDashboardRegion description]): Use typeName.
+        (-[WebDashboardRegion isEqual:]): Added comment.
+
 2009-01-25  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin Adler.
index 8b22d78..a057218 100644 (file)
                93F19B0308245E59001E9ABC /* XSLStyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24906D18A7E004A6FA3 /* XSLStyleSheet.cpp */; };
                93F19B0408245E59001E9ABC /* XSLTProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC06F24B06D18A7E004A6FA3 /* XSLTProcessor.cpp */; };
                93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */ = {isa = PBXBuildFile; fileRef = BE8560510701F91100239769 /* WebCoreView.m */; };
-               93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5150C2A50702629800AF642C /* WebDashboardRegion.m */; };
+               93F19B0808245E59001E9ABC /* WebDashboardRegion.m in Sources */ = {isa = PBXBuildFile; fileRef = 5150C2A50702629800AF642C /* WebDashboardRegion.m */; settings = {COMPILER_FLAGS = "-Wno-cast-qual"; }; };
                93F19B1308245E59001E9ABC /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869302846DCD018635CA /* ApplicationServices.framework */; };
                93F19B1408245E59001E9ABC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869402846DCD018635CA /* Carbon.framework */; };
                93F19B1508245E59001E9ABC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5C2869502846DCD018635CA /* Cocoa.framework */; };
index bf781c4..a6b9872 100644 (file)
     return type;
 }
 
+static const char* typeName(WebDashboardRegionType type)
+{
+    switch (type) {
+        case WebDashboardRegionTypeNone:
+            return "None";
+        case WebDashboardRegionTypeCircle:
+            return "Circle";
+        case WebDashboardRegionTypeRectangle:
+            return "Rectangle";
+        case WebDashboardRegionTypeScrollerRectangle:
+            return "ScrollerRectangle";
+    }
+    return "Unknown";
+}
+
 - (NSString *)description
 {
-    return [NSString stringWithFormat:@"rect:%@ clip:%@ type:%s",
-        NSStringFromRect(rect),
-        NSStringFromRect(clip),
-        type == WebDashboardRegionTypeNone ? "None" :
-            (type == WebDashboardRegionTypeCircle ? "Circle" :
-                (type == WebDashboardRegionTypeRectangle ? "Rectangle" :
-                    (type == WebDashboardRegionTypeScrollerRectangle ? "ScrollerRectangle" :
-                        "Unknown")))];
+    return [NSString stringWithFormat:@"rect:%@ clip:%@ type:%s", NSStringFromRect(rect), NSStringFromRect(clip), typeName(type)];
 }
 
+// FIXME: Overriding isEqual: without overriding hash will cause trouble if this ever goes into a NSSet or is the key in an NSDictionary.
 - (BOOL)isEqual:(id)other
 {
-    return NSEqualRects (rect, [other dashboardRegionRect]) && NSEqualRects (clip, [other dashboardRegionClip]) && type == [other dashboardRegionType];
+    return NSEqualRects(rect, [other dashboardRegionRect]) && NSEqualRects(clip, [other dashboardRegionClip]) && type == [other dashboardRegionType];
 }
 
 @end