Bug 1274589 - Rename RegionBuilder::Or to RegionBuilder::OrWith for consistency with the region classes. r=jrmuizel

MozReview-Commit-ID: CIzTVKXUVSs
This commit is contained in:
Kartikaya Gupta 2016-05-21 00:06:51 -04:00
parent 3255b2aed3
commit 9994166655
4 changed files with 5 additions and 5 deletions

View File

@ -387,7 +387,7 @@ struct RegionParamTraits
*result = builder.ToRegion();
return true;
}
builder.Or(rect);
builder.OrWith(rect);
}
return false;

View File

@ -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);
}

View File

@ -719,13 +719,13 @@ void BenchRegionBuilderOr() {
RegionBuilder<nsRegion> 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<nsIntRegion> 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();
}

View File

@ -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());