зеркало из https://github.com/mozilla/gecko-dev.git
Bug 888458 - Don't assume there's a focusView during viewWillDraw; always get the dirty region from our own view. r=smichaud
This commit is contained in:
Родитель
468a4a5217
Коммит
c58af587e7
|
@ -2962,7 +2962,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
nsIntRect boundingRect = mGeckoChild->CocoaPointsToDevPixels(aRect);
|
||||
const NSRect *rects;
|
||||
NSInteger count;
|
||||
[[NSView focusView] getRectsBeingDrawn:&rects count:&count];
|
||||
[self getRectsBeingDrawn:&rects count:&count];
|
||||
|
||||
if (count > MAX_RECTS_IN_REGION) {
|
||||
return boundingRect;
|
||||
|
@ -2970,9 +2970,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
|||
|
||||
nsIntRegion region;
|
||||
for (NSInteger i = 0; i < count; ++i) {
|
||||
// Add the rect to the region.
|
||||
NSRect r = [self convertRect:rects[i] fromView:[NSView focusView]];
|
||||
region.Or(region, mGeckoChild->CocoaPointsToDevPixels(r));
|
||||
region.Or(region, mGeckoChild->CocoaPointsToDevPixels(rects[i]));
|
||||
}
|
||||
region.And(region, boundingRect);
|
||||
return region;
|
||||
|
|
Загрузка…
Ссылка в новой задаче