Changeset 115271 in webkit
- Timestamp:
- Apr 25, 2012 6:11:42 PM (12 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r115136 r115271 1 2012-04-25 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=84913 4 WebKit 1: Initialize deviceScaleFactor on creation of the WebView 5 -and corresponding- 6 <rdar://problem/11322716> 7 8 Reviewed by Darin Adler. 9 10 Before this patch, we weren't setting the deviceScaleFactor until 11 viewDidMoveToWindow which is quite late for background tabs. setHostWindow will 12 happen early on though. For applications that don't use host windows, also set it 13 from _initWithFrame. 14 * WebView/WebView.mm: 15 (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]): 16 (-[WebView setHostWindow:]): 17 (-[WebView _deviceScaleFactor]): 18 1 19 2012-04-24 Alexis Menard <alexis.menard@openbossa.org> 2 20 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r115005 r115271 847 847 [self _commonInitializationWithFrameName:frameName groupName:groupName]; 848 848 [self setMaintainsBackForwardList: YES]; 849 _private->page->setDeviceScaleFactor([self _deviceScaleFactor]); 849 850 return self; 850 851 } … … 3965 3966 for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) 3966 3967 [[[kit(frame) frameView] documentView] viewDidMoveToHostWindow]; 3968 _private->page->setDeviceScaleFactor([self _deviceScaleFactor]); 3967 3969 } 3968 3970 … … 5665 5667 5666 5668 NSWindow *window = [self window]; 5669 NSWindow *hostWindow = [self hostWindow]; 5667 5670 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) 5668 5671 if (window) 5669 5672 return [window backingScaleFactor]; 5673 if (hostWindow) 5674 return [hostWindow backingScaleFactor]; 5670 5675 return [[NSScreen mainScreen] backingScaleFactor]; 5671 5676 #else 5672 5677 if (window) 5673 5678 return [window userSpaceScaleFactor]; 5679 if (hostWindow) 5680 return [hostWindow userSpaceScaleFactor]; 5674 5681 return [[NSScreen mainScreen] userSpaceScaleFactor]; 5675 5682 #endif
Note: See TracChangeset
for help on using the changeset viewer.