Changeset 247746 in webkit
- Timestamp:
- Jul 23, 2019 2:49:00 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247735 r247746 1 2019-07-23 Zalan Bujtas <zalan@apple.com> 2 3 [iOS] Tapping the search field on a search results page on zillow.com shows and immediately dismisses the keyboard 4 https://bugs.webkit.org/show_bug.cgi?id=200044 5 <rdar://problem/53103732> 6 7 Reviewed by Wenson Hsieh. 8 9 1. The keyboard gets dismissed as the result of scroll event. 10 2. The (horizontal)scroll event is initiated by WebKit as we try to re-center the content. 11 3. The content gets off-centered as the result of the newly constructed drop-down menu which slightly sticks out of the document to the right (layout overflows). 12 13 It works with shipping version of iOS because _zoomToFocusRect operates on stale viewport information (see r244494 for the progression). 14 This patch applies a site specific quirk to restore shipping behavior. 15 16 * page/Quirks.cpp: 17 (WebCore::Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible const): 18 * page/Quirks.h: 19 1 20 2019-07-23 Said Abou-Hallawa <sabouhallawa@apple.com> 2 21 -
trunk/Source/WebCore/page/Quirks.cpp
r247627 r247746 438 438 } 439 439 440 } 440 bool Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible() const 441 { 442 if (!needsQuirks()) 443 return false; 444 445 return equalLettersIgnoringASCIICase(m_document->url().host(), "www.zillow.com"); 446 } 447 448 } -
trunk/Source/WebCore/page/Quirks.h
r247621 r247746 63 63 WEBCORE_EXPORT bool isNeverRichlyEditableForTouchBar() const; 64 64 WEBCORE_EXPORT bool shouldAvoidResizingWhenInputViewBoundsChange() const; 65 WEBCORE_EXPORT bool shouldAvoidScrollingWhenFocusedContentIsVisible() const; 65 66 66 67 WEBCORE_EXPORT bool needsYouTubeMouseOutQuirk() const; -
trunk/Source/WebKit/ChangeLog
r247745 r247746 1 2019-07-23 Zalan Bujtas <zalan@apple.com> 2 3 [iOS] Tapping the search field on a search results page on zillow.com shows and immediately dismisses the keyboard 4 https://bugs.webkit.org/show_bug.cgi?id=200044 5 <rdar://problem/53103732> 6 7 Reviewed by Wenson Hsieh. 8 9 * Shared/FocusedElementInformation.cpp: 10 (WebKit::FocusedElementInformation::encode const): 11 (WebKit::FocusedElementInformation::decode): 12 * Shared/FocusedElementInformation.h: 13 * UIProcess/API/Cocoa/WKWebView.mm: 14 (-[WKWebView _zoomToFocusRect:selectionRect:insideFixed:fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]): 15 * UIProcess/ios/WKContentViewInteraction.h: 16 * UIProcess/ios/WKContentViewInteraction.mm: 17 (-[WKContentView _elementDidBlur]): 18 (-[WKContentView _shouldAvoidScrollingWhenFocusedContentIsVisible]): 19 * WebProcess/WebPage/ios/WebPageIOS.mm: 20 (WebKit::WebPage::getFocusedElementInformation): 21 1 22 2019-07-23 Alex Christensen <achristensen@webkit.org> 2 23 -
trunk/Source/WebKit/Shared/FocusedElementInformation.cpp
r246931 r247746 108 108 encoder << isSpellCheckingEnabled; 109 109 encoder << shouldAvoidResizingWhenInputViewBoundsChange; 110 encoder << shouldAvoidScrollingWhenFocusedContentIsVisible; 110 111 } 111 112 … … 235 236 return false; 236 237 238 if (!decoder.decode(result.shouldAvoidScrollingWhenFocusedContentIsVisible)) 239 return false; 240 237 241 return true; 238 242 } -
trunk/Source/WebKit/Shared/FocusedElementInformation.h
r246931 r247746 140 140 bool isSpellCheckingEnabled { true }; 141 141 bool shouldAvoidResizingWhenInputViewBoundsChange { false }; 142 bool shouldAvoidScrollingWhenFocusedContentIsVisible { false }; 142 143 143 144 FocusedElementIdentifier focusedElementIdentifier { 0 }; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
r247658 r247746 2423 2423 2424 2424 BOOL selectionRectIsNotNull = !selectionRectInDocumentCoordinates.isZero(); 2425 if (!forceScroll) { 2425 BOOL doNotScrollWhenContentIsAlreadyVisible = !forceScroll || [_contentView _shouldAvoidScrollingWhenFocusedContentIsVisible]; 2426 if (doNotScrollWhenContentIsAlreadyVisible) { 2426 2427 CGRect currentlyVisibleRegionInWebViewCoordinates; 2427 2428 currentlyVisibleRegionInWebViewCoordinates.origin = unobscuredScrollViewRectInWebViewCoordinates.origin; -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
r247687 r247746 539 539 @property (nonatomic, readonly) BOOL _shouldUseContextMenus; 540 540 @property (nonatomic, readonly) BOOL _shouldAvoidResizingWhenInputViewBoundsChange; 541 @property (nonatomic, readonly) BOOL _shouldAvoidScrollingWhenFocusedContentIsVisible; 541 542 542 543 @end -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r247704 r247746 5401 5401 _focusedElementInformation.shouldSynthesizeKeyEventsForEditing = false; 5402 5402 _focusedElementInformation.shouldAvoidResizingWhenInputViewBoundsChange = false; 5403 _focusedElementInformation.shouldAvoidScrollingWhenFocusedContentIsVisible = false; 5403 5404 _inputPeripheral = nil; 5404 5405 _focusRequiresStrongPasswordAssistance = NO; … … 6350 6351 { 6351 6352 return _focusedElementInformation.shouldAvoidResizingWhenInputViewBoundsChange; 6353 } 6354 6355 - (BOOL)_shouldAvoidScrollingWhenFocusedContentIsVisible 6356 { 6357 return _focusedElementInformation.shouldAvoidScrollingWhenFocusedContentIsVisible; 6352 6358 } 6353 6359 -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r247679 r247746 3054 3054 } 3055 3055 3056 information.shouldAvoidResizingWhenInputViewBoundsChange = m_focusedElement->document().quirks().shouldAvoidResizingWhenInputViewBoundsChange(); 3056 auto& quirks = m_focusedElement->document().quirks(); 3057 information.shouldAvoidResizingWhenInputViewBoundsChange = quirks.shouldAvoidResizingWhenInputViewBoundsChange(); 3058 information.shouldAvoidScrollingWhenFocusedContentIsVisible = quirks.shouldAvoidScrollingWhenFocusedContentIsVisible(); 3057 3059 } 3058 3060
Note: See TracChangeset
for help on using the changeset viewer.