Bug 317514. Add nsRegion::SimpleSubtract, Contains(aRect) and Intersects(aRect). r=dainis_jonitis, sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@185240 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
fa01502373
commit
980a0062fd
@ -1289,11 +1289,13 @@ void nsRegion::SimpleSubtract (const nsRect& aRect)
|
||||
if (aRect.IsEmpty())
|
||||
return;
|
||||
|
||||
// protect against aRect being one of our own rectangles
|
||||
nsRect param = aRect;
|
||||
RgnRect* r = mRectListHead.next;
|
||||
while (r != &mRectListHead)
|
||||
{
|
||||
RgnRect* next = r->next;
|
||||
if (aRect.Contains(*r)) {
|
||||
if (param.Contains(*r)) {
|
||||
delete Remove(r);
|
||||
}
|
||||
r = next;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user