From 62794eef88fe4cff866205381765f02cd870825f Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Mon, 7 Sep 2009 12:35:13 +1200 Subject: [PATCH] Bug 510856. Additional scrolling tests. --HG-- extra : rebase_source : 053c6aae0cc3b458647b296ffb6ce885af2ef7a4 --- layout/base/tests/region_lib.js | 5 ++++ layout/base/tests/scrolling_helper.html | 31 ++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/layout/base/tests/region_lib.js b/layout/base/tests/region_lib.js index acbdc67c1aee..2bb92612a57c 100644 --- a/layout/base/tests/region_lib.js +++ b/layout/base/tests/region_lib.js @@ -99,6 +99,11 @@ Region.prototype.containsRegion = function Region_containsRegion(rgn) { return true; }; +// Return a region which is the union of this region and another region +Region.prototype.unionRegion = function Region_unionRegion(rgn) { + return new Region(this._rects.concat(rgn._rects)); +}; + // Returns true if the region covers exactly the same area as region rgn Region.prototype.equalsRegion = function Region_equalsRegion(rgn) { return this.containsRegion(rgn) && rgn.containsRegion(this); diff --git a/layout/base/tests/scrolling_helper.html b/layout/base/tests/scrolling_helper.html index 762d7295886e..6ab4d171fe77 100644 --- a/layout/base/tests/scrolling_helper.html +++ b/layout/base/tests/scrolling_helper.html @@ -62,6 +62,14 @@ body > div {
+
+
+
+ +
+
+
+