<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -70,6 +70,8 @@ _function(CGInsetMakeZero())
 _function(CGInsetMakeCopy(anInset))
 _function(CGInsetIsEmpty(anInset))
 
+CGRectNull = _CGRectMake(Infinity, Infinity, 0.0, 0.0);
+
 /*!
     @addtogroup appkit
     @{
@@ -174,6 +176,15 @@ function CGRectStandardize(aRect)
 
 function CGRectUnion(lhsRect, rhsRect)
 {
+    var lhsRectIsNull = !lhsRect || lhsRect === CGRectNull,
+        rhsRectIsNull = !rhsRect || rhsRect === CGRectNull;
+
+    if (lhsRectIsNull)
+        return rhsRectIsNull ? CGRectNull : rhsRect;
+
+    if (rhsRectIsNull)
+        return lhsRectIsNull ? CGRectNull : lhsRect;
+
     var minX = MIN(_CGRectGetMinX(lhsRect), _CGRectGetMinX(rhsRect)),
         minY = MIN(_CGRectGetMinY(lhsRect), _CGRectGetMinY(rhsRect)),
         maxX = MAX(_CGRectGetMaxX(lhsRect), _CGRectGetMaxX(rhsRect)),</diff>
      <filename>AppKit/CoreGraphics/CGGeometry.j</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>66b447de7be639c8ca82188d3592a41d373d18e7</id>
    </parent>
  </parents>
  <author>
    <name>Francisco Ryan Tolmasky I</name>
    <email>francisco@280north.com</email>
  </author>
  <url>http://github.com/cacaodev/cappuccino/commit/7b14f41cd8ab3be93efceacfe9014b646c7b8484</url>
  <id>7b14f41cd8ab3be93efceacfe9014b646c7b8484</id>
  <committed-date>2009-10-26T22:43:51-07:00</committed-date>
  <authored-date>2009-10-26T22:43:51-07:00</authored-date>
  <message>Added CGRectNull support to CGRectUnion.

Reviewed by me.</message>
  <tree>15442b164fee673686a17f01b3c67f2e3ab12021</tree>
  <committer>
    <name>Francisco Ryan Tolmasky I</name>
    <email>francisco@280north.com</email>
  </committer>
</commit>
