Changeset 202878 in webkit
- Timestamp:
- Jul 6, 2016 2:23:13 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r202877 r202878 1 2016-07-06 Myles C. Maxfield <mmaxfield@apple.com> 2 3 [RTL Scrollbars] RTL Scrollbars broken with clients creating Web Views via [WKView initWithFrame:contextRef:pageGroupRef:] 4 https://bugs.webkit.org/show_bug.cgi?id=159383 5 <rdar://problem/26921117> 6 7 Reviewed by Anders Carlsson. 8 9 The code which consults with the userInterfaceLayoutDirection of the view is 10 inside [WKWebView _initializeWithConfiguration:]. However, some clients create 11 Web Views via [WKView initWithFrame:contextRef:pageGroupRef:] which doesn't 12 call this code. Therefore, this codepath should do the same kind of direction 13 consulting. 14 15 * UIProcess/API/mac/WKView.mm: 16 (toUserInterfaceLayoutDirection): 17 (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): 18 1 19 2016-07-06 Commit Queue <commit-queue@webkit.org> 2 20 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r202129 r202878 36 36 #import "WebKit2Initialize.h" 37 37 #import "WebPageGroup.h" 38 #import "WebPreferencesKeys.h" 38 39 #import "WebProcessPool.h" 39 40 #import "WebViewImpl.h" … … 988 989 } 989 990 991 #if PLATFORM(MAC) 992 static WebCore::UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(NSUserInterfaceLayoutDirection direction) 993 { 994 switch (direction) { 995 case NSUserInterfaceLayoutDirectionLeftToRight: 996 return WebCore::UserInterfaceLayoutDirection::LTR; 997 case NSUserInterfaceLayoutDirectionRightToLeft: 998 return WebCore::UserInterfaceLayoutDirection::RTL; 999 } 1000 return WebCore::UserInterfaceLayoutDirection::LTR; 1001 } 1002 #endif 1003 990 1004 - (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage 991 1005 { … … 994 1008 configuration->setPageGroup(toImpl(pageGroupRef)); 995 1009 configuration->setRelatedPage(toImpl(relatedPage)); 1010 #if PLATFORM(MAC) 1011 configuration->preferenceValues().set(WebKit::WebPreferencesKey::systemLayoutDirectionKey(), WebKit::WebPreferencesStore::Value(static_cast<uint32_t>(toUserInterfaceLayoutDirection(self.userInterfaceLayoutDirection)))); 1012 #endif 996 1013 997 1014 return [self initWithFrame:frame processPool:*toImpl(contextRef) configuration:WTFMove(configuration) webView:nil];
Note: See TracChangeset
for help on using the changeset viewer.