Changeset 151403 in webkit
- Timestamp:
- Jun 10, 2013 2:32:35 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r151402 r151403 1 2013-06-10 Anders Carlsson <andersca@apple.com> 2 3 -[WKView _updateWindowAndViewFrames] should avoid updating the view frame in window coordinates if we don't have plugins 4 https://bugs.webkit.org/show_bug.cgi?id=117420 5 <rdar://problem/14073034> 6 7 Reviewed by Tim Horton. 8 9 If plug-ins are disabled there's no need for the web process to know about the view frame in window coordinates so only 10 send it when plug-ins are enabled. In addition, if accessibility is disabled we don't need to send a message at all. 11 12 * UIProcess/API/mac/PageClientImpl.h: 13 * UIProcess/API/mac/PageClientImpl.mm: 14 (WebKit::PageClientImpl::preferencesDidChange): 15 Call through to -[WKView _preferencesDidChange]. 16 17 * UIProcess/API/mac/WKView.mm: 18 (-[WKView _updateWindowAndViewFrames]): 19 Don't compute viewFrameInWindowCoordinates or accessibilityPosition unless they're required. If neither are required, 20 don't even send a message to the web process. 21 22 (-[WKView _preferencesDidChange]): 23 Update _needsViewFrameInWindowCoordinates and call -[WKView _updateWindowAndViewFrames] if needed. 24 25 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 26 Set _needsViewFrameInWindowCoordinates based on whether plug-ins are enabled or not. 27 28 * UIProcess/WebPageProxy.cpp: 29 (WebKit::WebPageProxy::preferencesDidChange): 30 Call the page client. 31 1 32 2013-06-10 Bear Travis <betravis@adobe.com> 2 33 -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
r150291 r151403 69 69 virtual void pageClosed(); 70 70 virtual void didRelaunchProcess(); 71 virtual void preferencesDidChange() OVERRIDE; 71 72 virtual void toolTipChanged(const String& oldToolTip, const String& newToolTip); 72 73 virtual void setCursor(const WebCore::Cursor&); -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r150291 r151403 259 259 } 260 260 261 void PageClientImpl::preferencesDidChange() 262 { 263 [m_wkView _preferencesDidChange]; 264 } 265 261 266 void PageClientImpl::toolTipChanged(const String& oldToolTip, const String& newToolTip) 262 267 { -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r151344 r151403 63 63 #import "WebFullScreenManagerProxy.h" 64 64 #import "WebPage.h" 65 #import "WebPageGroup.h" 65 66 #import "WebPageProxy.h" 67 #import "WebPreferences.h" 66 68 #import "WebProcessProxy.h" 67 69 #import "WebSystemInterface.h" … … 217 219 BOOL _viewInWindowChangeWasDeferred; 218 220 221 BOOL _needsViewFrameInWindowCoordinates; 219 222 BOOL _didScheduleWindowAndViewFrameUpdate; 220 223 … … 467 470 468 471 dispatch_async(dispatch_get_main_queue(), ^{ 469 NSRect viewFrameInWindowCoordinates = [self convertRect:[self frame] toView:nil]; 470 NSPoint accessibilityPosition = NSMakePoint(0, 0); 472 _data->_didScheduleWindowAndViewFrameUpdate = NO; 473 474 if (!_data->_needsViewFrameInWindowCoordinates && !WebCore::AXObjectCache::accessibilityEnabled()) 475 return; 476 477 NSRect viewFrameInWindowCoordinates = NSZeroRect; 478 NSPoint accessibilityPosition = NSZeroPoint; 479 480 if (_data->_needsViewFrameInWindowCoordinates) 481 viewFrameInWindowCoordinates = [self convertRect:self.frame toView:nil]; 482 471 483 if (WebCore::AXObjectCache::accessibilityEnabled()) 472 484 accessibilityPosition = [[self accessibilityAttributeValue:NSAccessibilityPositionAttribute] pointValue]; 473 485 474 486 _data->_page->windowAndViewFramesChanged(viewFrameInWindowCoordinates, accessibilityPosition); 475 _data->_didScheduleWindowAndViewFrameUpdate = NO;476 487 }); 477 488 } … … 2425 2436 } 2426 2437 2438 - (void)_preferencesDidChange 2439 { 2440 BOOL needsViewFrameInWindowCoordinates = _data->_page->pageGroup()->preferences()->pluginsEnabled(); 2441 2442 if (!!needsViewFrameInWindowCoordinates == !!_data->_needsViewFrameInWindowCoordinates) 2443 return; 2444 2445 _data->_needsViewFrameInWindowCoordinates = needsViewFrameInWindowCoordinates; 2446 if ([self window]) 2447 [self _updateWindowAndViewFrames]; 2448 } 2449 2427 2450 - (void)_setCursor:(NSCursor *)cursor 2428 2451 { … … 3128 3151 #endif 3129 3152 3153 _data->_needsViewFrameInWindowCoordinates = _data->_page->pageGroup()->preferences()->pluginsEnabled(); 3130 3154 _data->_frameOrigin = NSZeroPoint; 3131 3155 _data->_contentAnchor = WKContentAnchorTopLeft; -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r150291 r151403 56 56 - (void)_pageClosed; 57 57 - (void)_didRelaunchProcess; 58 - (void)_preferencesDidChange; 58 59 - (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip; 59 60 - (void)_setCursor:(NSCursor *)cursor; -
trunk/Source/WebKit2/UIProcess/PageClient.h
r150291 r151403 113 113 virtual void pageClosed() = 0; 114 114 115 virtual void preferencesDidChange() = 0; 116 115 117 virtual void toolTipChanged(const String&, const String&) = 0; 116 118 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r151234 r151403 2146 2146 m_process->pagePreferencesChanged(this); 2147 2147 2148 m_pageClient->preferencesDidChange(); 2149 2148 2150 // FIXME: It probably makes more sense to send individual preference changes. 2149 2151 // However, WebKitTestRunner depends on getting a preference change notification
Note: See TracChangeset
for help on using the changeset viewer.