Changeset 245272 in webkit
- Timestamp:
- May 13, 2019 9:14:59 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245268 r245272 1 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Followup to r245267: fix some more deprecated uses of -[UIApplication interfaceOrientation] 4 https://bugs.webkit.org/show_bug.cgi?id=197867 5 <rdar://problem/50743963> 6 7 Reviewed by Simon Fraser. 8 9 Add a helper method on WKContentView that asks the view's window's scene for an interface orientation; then, 10 use this helper from various places in WebKit instead of invoking -[UIApplication interfaceOrientation] 11 directly. No change in behavior. 12 13 * UIProcess/ios/WKContentView.h: 14 * UIProcess/ios/WKContentView.mm: 15 (-[WKContentView interfaceOrientation]): 16 * UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm: 17 (-[WKDataListSuggestionsPicker initWithInformation:inView:]): 18 * UIProcess/ios/forms/WKFormColorPicker.mm: 19 (-[WKColorPicker initWithView:]): 20 * UIProcess/ios/forms/WKFormInputControl.mm: 21 (-[WKDateTimePicker initWithView:datePickerMode:]): 22 * UIProcess/ios/forms/WKFormSelectPicker.mm: 23 (-[WKMultipleSelectPicker initWithView:]): 24 * UIProcess/ios/forms/WKFormSelectPopover.mm: 25 (-[WKSelectPopover initWithView:hasGroups:]): 26 1 27 2019-05-13 Wenson Hsieh <wenson_hsieh@apple.com> 2 28 -
trunk/Source/WebKit/UIProcess/ios/WKContentView.h
r244085 r245272 68 68 @property (nonatomic, readonly, getter=isResigningFirstResponder) BOOL resigningFirstResponder; 69 69 @property (nonatomic) BOOL sizeChangedSinceLastVisibleContentRectUpdate; 70 @property (nonatomic, readonly) UIInterfaceOrientation interfaceOrientation; 70 71 71 72 - (instancetype)initWithFrame:(CGRect)frame processPool:(WebKit::WebProcessPool&)processPool configuration:(Ref<API::PageConfiguration>&&)configuration webView:(WKWebView *)webView; -
trunk/Source/WebKit/UIProcess/ios/WKContentView.mm
r245079 r245272 546 546 } 547 547 548 - (UIInterfaceOrientation)interfaceOrientation 549 { 550 #if HAVE(UISCENE) 551 return self.window.windowScene.interfaceOrientation; 552 #else 553 return UIApp.interfaceOrientation; 554 #endif 555 } 556 548 557 #pragma mark Internal 549 558 -
trunk/Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm
r245267 r245272 212 212 [_pickerView setDelegate:self]; 213 213 [_pickerView setControl:self]; 214 #if HAVE(UISCENE) 215 auto interfaceOrientation = view.window.windowScene.interfaceOrientation; 216 #else 217 auto interfaceOrientation = UIApp.interfaceOrientation; 218 #endif 219 [_pickerView setSize:[UIKeyboard defaultSizeForInterfaceOrientation:interfaceOrientation]]; 214 [_pickerView setSize:[UIKeyboard defaultSizeForInterfaceOrientation:view.interfaceOrientation]]; 220 215 221 216 return self; -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormColorPicker.mm
r244955 r245272 180 180 colorPickerSize = CGSizeMake(pickerWidthForPopover, pickerWidthForPopover); 181 181 else { 182 CGSize keyboardSize = [UIKeyboard defaultSizeForInterfaceOrientation:[UIApp interfaceOrientation]];182 auto keyboardSize = [UIKeyboard defaultSizeForInterfaceOrientation:view.interfaceOrientation]; 183 183 colorPickerSize = CGSizeMake(keyboardSize.width, keyboardSize.height + additionalKeyboardAffordance); 184 184 } -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormInputControl.mm
r244955 r245272 107 107 } 108 108 109 CGSize size = currentUserInterfaceIdiomIsPad() ? [UIPickerView defaultSizeForCurrentOrientation] : [UIKeyboard defaultSizeForInterfaceOrientation:[UIApp interfaceOrientation]];109 auto size = currentUserInterfaceIdiomIsPad() ? [UIPickerView defaultSizeForCurrentOrientation] : [UIKeyboard defaultSizeForInterfaceOrientation:view.interfaceOrientation]; 110 110 111 111 _datePicker = adoptNS([[UIDatePicker alloc] initWithFrame:CGRectMake(0, 0, size.width, size.height)]); -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm
r244955 r245272 162 162 163 163 [self setAllowsMultipleSelection:_allowsMultipleSelection]; 164 [self setSize:[UIKeyboard defaultSizeForInterfaceOrientation: [UIApp interfaceOrientation]]];164 [self setSize:[UIKeyboard defaultSizeForInterfaceOrientation:view.interfaceOrientation]]; 165 165 [self reloadAllComponents]; 166 166 -
trunk/Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm
r244955 r245272 396 396 CGRect frame; 397 397 frame.origin = CGPointZero; 398 frame.size = [UIKeyboard defaultSizeForInterfaceOrientation: [UIApp interfaceOrientation]];398 frame.size = [UIKeyboard defaultSizeForInterfaceOrientation:view.interfaceOrientation]; 399 399 400 400 _tableViewController = adoptNS([[WKSelectTableViewController alloc] initWithView:view hasGroups:hasGroups]);
Note: See TracChangeset
for help on using the changeset viewer.