mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239864 (part 3) - Use the new rect iterators in docshell/ and dom/. r=baku.
This commit is contained in:
parent
930b809f01
commit
4cf55819dc
@ -23,13 +23,13 @@ public:
|
||||
|
||||
void AddLayerRectangles(dom::Sequence<dom::ProfileTimelineLayerRect>& aRectangles)
|
||||
{
|
||||
nsIntRegionRectIterator it(mRegion);
|
||||
while (const nsIntRect* iterRect = it.Next()) {
|
||||
for (auto iter = mRegion.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const nsIntRect& iterRect = iter.Get();
|
||||
dom::ProfileTimelineLayerRect rect;
|
||||
rect.mX = iterRect->X();
|
||||
rect.mY = iterRect->Y();
|
||||
rect.mWidth = iterRect->Width();
|
||||
rect.mHeight = iterRect->Height();
|
||||
rect.mX = iterRect.X();
|
||||
rect.mY = iterRect.Y();
|
||||
rect.mWidth = iterRect.Width();
|
||||
rect.mHeight = iterRect.Height();
|
||||
aRectangles.AppendElement(rect, fallible);
|
||||
}
|
||||
}
|
||||
|
@ -84,11 +84,9 @@ NotifyPaintEvent::ClientRects()
|
||||
RefPtr<DOMRectList> rectList = new DOMRectList(parent);
|
||||
|
||||
nsRegion r = GetRegion();
|
||||
nsRegionRectIterator iter(r);
|
||||
for (const nsRect* rgnRect = iter.Next(); rgnRect; rgnRect = iter.Next()) {
|
||||
for (auto iter = r.RectIter(); !iter.Done(); iter.Next()) {
|
||||
RefPtr<DOMRect> rect = new DOMRect(parent);
|
||||
|
||||
rect->SetLayoutRect(*rgnRect);
|
||||
rect->SetLayoutRect(iter.Get());
|
||||
rectList->Append(rect);
|
||||
}
|
||||
|
||||
|
@ -3871,10 +3871,9 @@ PluginInstanceChild::ReadbackDifferenceRect(const nsIntRect& rect)
|
||||
// Subtract from mSurfaceDifferenceRect area which is overlapping with rect
|
||||
nsIntRegion result;
|
||||
result.Sub(mSurfaceDifferenceRect, nsIntRegion(rect));
|
||||
nsIntRegionRectIterator iter(result);
|
||||
const nsIntRect* r;
|
||||
while ((r = iter.Next()) != nullptr) {
|
||||
dt->CopySurface(source, *r, r->TopLeft());
|
||||
for (auto iter = result.RectIter(); !iter.Done(); iter.Next()) {
|
||||
const nsIntRect& r = iter.Get();
|
||||
dt->CopySurface(source, r, r.TopLeft());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user