From 99941666553570dc712d7f1435e4b5f7db1829b9 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Sat, 21 May 2016 00:06:51 -0400 Subject: [PATCH] Bug 1274589 - Rename RegionBuilder::Or to RegionBuilder::OrWith for consistency with the region classes. r=jrmuizel MozReview-Commit-ID: CIzTVKXUVSs --- gfx/ipc/GfxMessageUtils.h | 2 +- gfx/src/RegionBuilder.h | 2 +- gfx/tests/gtest/TestRegion.cpp | 4 ++-- layout/base/nsLayoutUtils.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/ipc/GfxMessageUtils.h b/gfx/ipc/GfxMessageUtils.h index 207fc9380b27..6b1955db1002 100644 --- a/gfx/ipc/GfxMessageUtils.h +++ b/gfx/ipc/GfxMessageUtils.h @@ -387,7 +387,7 @@ struct RegionParamTraits *result = builder.ToRegion(); return true; } - builder.Or(rect); + builder.OrWith(rect); } return false; diff --git a/gfx/src/RegionBuilder.h b/gfx/src/RegionBuilder.h index c3d88f9f9a8c..c8bcd21b1ac1 100644 --- a/gfx/src/RegionBuilder.h +++ b/gfx/src/RegionBuilder.h @@ -16,7 +16,7 @@ public: RegionBuilder() {} - void Or(const RectType& aRect) { + void OrWith(const RectType& aRect) { pixman_box32_t box = { aRect.x, aRect.y, aRect.XMost(), aRect.YMost() }; mRects.AppendElement(box); } diff --git a/gfx/tests/gtest/TestRegion.cpp b/gfx/tests/gtest/TestRegion.cpp index 9d39471be750..7bfe99e4d4a0 100644 --- a/gfx/tests/gtest/TestRegion.cpp +++ b/gfx/tests/gtest/TestRegion.cpp @@ -719,13 +719,13 @@ void BenchRegionBuilderOr() { RegionBuilder r; for (int i = 0; i < size; i++) { - r.Or(nsRect(i, i, i + 10, i + 10)); + r.OrWith(nsRect(i, i, i + 10, i + 10)); } r.ToRegion(); RegionBuilder rInt; for (int i = 0; i < size; i++) { - rInt.Or(nsIntRect(i, i, i + 10, i + 10)); + rInt.OrWith(nsIntRect(i, i, i + 10, i + 10)); } rInt.ToRegion(); } diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index e3c8b0e7ed3e..90b8e068a68c 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -9068,7 +9068,7 @@ nsLayoutUtils::TransformToAncestorAndCombineRegions( for (nsRegion::RectIterator it = aRegion.RectIter(); !it.Done(); it.Next()) { nsRect transformed = TransformFrameRectToAncestor( aFrame, it.Get(), aAncestorFrame, &isPrecise, aMatrixCache); - transformedRegion.Or(transformed); + transformedRegion.OrWith(transformed); } nsRegion* dest = isPrecise ? aPreciseTargetDest : aImpreciseTargetDest; dest->OrWith(transformedRegion.ToRegion());