Changeset 246931 in webkit
- Timestamp:
- Jun 28, 2019 1:12:45 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246925 r246931 1 2019-06-28 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Need a way for SPI clients to know when to avoid resizing to accommodate for the input view bounds 4 https://bugs.webkit.org/show_bug.cgi?id=199331 5 <rdar://problem/52116170> 6 7 Reviewed by Tim Horton. 8 9 Add a new quirk to avoid resizing the web view when input view bounds change. 10 11 * page/Quirks.cpp: 12 (WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const): 13 * page/Quirks.h: 14 1 15 2019-06-28 Konstantin Tokarev <annulen@yandex.ru> 2 16 -
trunk/Source/WebCore/page/Quirks.cpp
r246768 r246931 299 299 #endif 300 300 301 bool Quirks::shouldAvoidResizingWhenInputViewBoundsChange() const 302 { 303 if (!needsQuirks()) 304 return false; 305 306 auto host = m_document->topDocument().url().host(); 307 return equalLettersIgnoringASCIICase(host, "live.com") || host.endsWithIgnoringASCIICase(".live.com"); 308 } 309 301 310 bool Quirks::shouldDisablePointerEventsQuirk() const 302 311 { -
trunk/Source/WebCore/page/Quirks.h
r246768 r246931 61 61 WEBCORE_EXPORT bool isTouchBarUpdateSupressedForHiddenContentEditable() const; 62 62 WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; 63 WEBCORE_EXPORT bool shouldAvoidResizingWhenInputViewBoundsChange() const; 63 64 64 65 bool needsGMailOverflowScrollQuirk() const; -
trunk/Source/WebKit/ChangeLog
r246928 r246931 1 2019-06-28 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Need a way for SPI clients to know when to avoid resizing to accommodate for the input view bounds 4 https://bugs.webkit.org/show_bug.cgi?id=199331 5 <rdar://problem/52116170> 6 7 Reviewed by Tim Horton. 8 9 Expose new SPI, such that clients may check whether to avoid resizing the web view when changing input view 10 bounds. In particular, resizing the web view in this case causes toolbar menus in Microsoft Word online to 11 dismiss immediately after opening them, due to resize events fired as a result of the input view dismissing. 12 13 * Shared/FocusedElementInformation.cpp: 14 (WebKit::FocusedElementInformation::encode const): 15 (WebKit::FocusedElementInformation::decode): 16 * Shared/FocusedElementInformation.h: 17 18 Add a new flag to FocusedElementInformation to indicate whether we should avoid resizing the web view when an 19 input view is presented. 20 21 * UIProcess/API/Cocoa/WKWebView.mm: 22 (-[WKWebView _shouldAvoidResizingWhenInputViewBoundsChange]): 23 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 24 * UIProcess/ios/WKContentViewInteraction.h: 25 * UIProcess/ios/WKContentViewInteraction.mm: 26 (-[WKContentView _elementDidBlur]): 27 28 Reset the value of the flag. 29 30 (-[WKContentView _shouldAvoidResizingWhenInputViewBoundsChange]): 31 * WebProcess/WebPage/ios/WebPageIOS.mm: 32 (WebKit::WebPage::getFocusedElementInformation): 33 1 34 2019-06-28 Jer Noble <jer.noble@apple.com> 2 35 -
trunk/Source/WebKit/Shared/FocusedElementInformation.cpp
r246311 r246931 107 107 encoder << shouldSynthesizeKeyEventsForEditing; 108 108 encoder << isSpellCheckingEnabled; 109 encoder << shouldAvoidResizingWhenInputViewBoundsChange; 109 110 } 110 111 … … 231 232 return false; 232 233 234 if (!decoder.decode(result.shouldAvoidResizingWhenInputViewBoundsChange)) 235 return false; 236 233 237 return true; 234 238 } -
trunk/Source/WebKit/Shared/FocusedElementInformation.h
r246311 r246931 139 139 bool shouldSynthesizeKeyEventsForEditing { false }; 140 140 bool isSpellCheckingEnabled { true }; 141 bool shouldAvoidResizingWhenInputViewBoundsChange { false }; 141 142 142 143 FocusedElementIdentifier focusedElementIdentifier { 0 }; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r246928 r246931 1426 1426 } 1427 1427 1428 - (BOOL)_shouldAvoidResizingWhenInputViewBoundsChange 1429 { 1430 return [_contentView _shouldAvoidResizingWhenInputViewBoundsChange]; 1431 } 1432 1428 1433 - (_WKDragInteractionPolicy)_dragInteractionPolicy 1429 1434 { -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h
r246928 r246931 273 273 274 274 @property (nonatomic, setter=_setDragInteractionPolicy:) _WKDragInteractionPolicy _dragInteractionPolicy WK_API_AVAILABLE(ios(11.0)); 275 @property (nonatomic, readonly) BOOL _shouldAvoidResizingWhenInputViewBoundsChange WK_API_AVAILABLE(ios(WK_IOS_TBA)); 275 276 276 277 - (void)_beginInteractiveObscuredInsetsChange; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r246912 r246931 526 526 - (void)_didStartProvisionalLoadForMainFrame; 527 527 528 @property (nonatomic, readonly, getter=_shouldUseContextMenus) BOOL _shouldUseContextMenus; 528 @property (nonatomic, readonly) BOOL _shouldUseContextMenus; 529 @property (nonatomic, readonly) BOOL _shouldAvoidResizingWhenInputViewBoundsChange; 529 530 530 531 @end -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r246924 r246931 5301 5301 _focusedElementInformation.elementType = WebKit::InputType::None; 5302 5302 _focusedElementInformation.shouldSynthesizeKeyEventsForEditing = false; 5303 _focusedElementInformation.shouldAvoidResizingWhenInputViewBoundsChange = false; 5303 5304 _inputPeripheral = nil; 5304 5305 _focusRequiresStrongPasswordAssistance = NO; … … 6220 6221 #endif 6221 6222 return NO; 6223 } 6224 6225 - (BOOL)_shouldAvoidResizingWhenInputViewBoundsChange 6226 { 6227 return _focusedElementInformation.shouldAvoidResizingWhenInputViewBoundsChange; 6222 6228 } 6223 6229 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r246892 r246931 2970 2970 information.isAutocorrect = false; 2971 2971 } 2972 2973 information.shouldAvoidResizingWhenInputViewBoundsChange = m_focusedElement->document().quirks().shouldAvoidResizingWhenInputViewBoundsChange(); 2972 2974 } 2973 2975
Note: See TracChangeset
for help on using the changeset viewer.