[webkit-reviews] review granted: [Bug 20868] webkit should use AX array centric API for performance : [Attachment 23478] patch to implement AX API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 16 11:59:19 PDT 2008

Eric Seidel <eric at webkit.org> has granted 's request for review:
Bug 20868: webkit should use AX array centric API for performance

Attachment 23478: patch to implement AX API

------- Additional Comments from Eric Seidel <eric at webkit.org>
There are some style violations:

This is Obj-C code, so the * goes on the right:
+	     NSArray* children = [self renderWidgetChildren];
+	 NSArray* widgetChildren = [self renderWidgetChildren];

No { }:
+	     if (childCount > ([children count]-index))
+	     {
+		 childCount = ([children count]-index);
+	     }

I believe it's part of our style guide that each variable gets its own line:
+	 unsigned added = 0, k = index, count = children.size(), available =
MIN(count - index, maxCount);  but I guess I'd have to check.

You don't need to check nil here:
+	 NSArray* widgetChildren = [self renderWidgetChildren];
+	 if (widgetChildren)
+	     return [widgetChildren count];
+	 return 0;

return [widgetChildren count] will do the same.

Otherwise looks fine.  I assume you can fix the style on landing.

More information about the webkit-reviews mailing list