Changeset 151344 in webkit
- Timestamp:
- Jun 7, 2013 5:11:34 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r151332 r151344 1 2013-06-07 Anders Carlsson <andersca@apple.com> 2 3 Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged 4 https://bugs.webkit.org/show_bug.cgi?id=117364 5 <rdar://problem/14042099> 6 7 Reviewed by Geoffrey Garen. 8 9 -[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls 10 to WebPageProxy::windowAndViewFrames using dispatch_async. 11 12 * UIProcess/API/mac/WKView.mm: 13 (-[WKView _updateWindowAndViewFrames]): 14 1 15 2013-06-07 Thomas Deniau <deniau@apple.com> 2 16 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r151181 r151344 217 217 BOOL _viewInWindowChangeWasDeferred; 218 218 219 BOOL _didScheduleWindowAndViewFrameUpdate; 220 219 221 // Whether the containing window of the WKView has a valid backing store. 220 222 // The window server invalidates the backing store whenever the window is resized or minimized. … … 456 458 - (void)_updateWindowAndViewFrames 457 459 { 458 NSRect viewFrameInWindowCoordinates = [self convertRect:[self frame] toView:nil];459 NSPoint accessibilityPosition = NSMakePoint(0, 0);460 if (WebCore::AXObjectCache::accessibilityEnabled())461 accessibilityPosition = [[self accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue];462 463 _data->_page->windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition);464 460 if (_data->_clipsToVisibleRect) 465 461 [self _updateViewExposedRect]; 462 463 if (_data->_didScheduleWindowAndViewFrameUpdate) 464 return; 465 466 _data->_didScheduleWindowAndViewFrameUpdate = YES; 467 468 dispatch_async(dispatch_get_main_queue(), ^{ 469 NSRect viewFrameInWindowCoordinates = [self convertRect:[self frame] toView:nil]; 470 NSPoint accessibilityPosition = NSMakePoint(0, 0); 471 if (WebCore::AXObjectCache::accessibilityEnabled()) 472 accessibilityPosition = [[self accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue]; 473 474 _data->_page->windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition); 475 _data->_didScheduleWindowAndViewFrameUpdate = NO; 476 }); 466 477 } 467 478
Note: See TracChangeset
for help on using the changeset viewer.