fix SkRegion::intersects(rect) where the part of the rgn that we intersect is
the last run. The old bug was that we did an early exit from the loop because
we were comparing against the next rgn.bottom, instead of the current one.

inspired and fixed by danakj http://code.google.com/p/skia/issues/detail?id=958
Review URL: https://codereview.appspot.com/6812099

git-svn-id: http://skia.googlecode.com/svn/trunk@6327 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index e629a9e..a8ce0e0 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -67,6 +67,13 @@
     Union(&container, SkIRect::MakeXYWH(30, 20, 10, 20));
     TEST_NO_CONTAINS(container, SkIRect::MakeXYWH(0, 0, 10, 39));
     TEST_NO_CONTAINS(container, SkIRect::MakeXYWH(29, 0, 10, 39));
+
+    {
+        SkRegion rgn;
+        Union(&rgn, SkIRect::MakeXYWH(0, 0, 10, 10));
+        Union(&rgn, SkIRect::MakeLTRB(5, 10, 20, 20));
+        TEST_INTERSECT(rgn, SkIRect::MakeXYWH(15, 0, 5, 11));
+    }
 }
 
 static void test_empties(skiatest::Reporter* reporter) {