⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245989 in webkit


Ignore:
Timestamp:
May 31, 2019, 3:12:19 PM (7 years ago)
Author:
rniwa@webkit.org
Message:

iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=198244

Reviewed by Simon Fraser.

Source/WebKit:

This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
we still need to make it scrollable when the page is pinch zoomed or there is a content inset
e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
outside the visual viewport when pinch zoomed or the parts of the page that is not outside
the visual viewport due to the scrolling caused by the software keyboard being brought up.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):

LayoutTests:

Added regression tests.

  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
  • fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.
Location:
trunk
Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r245984 r245989  
     12019-05-31  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
     4        https://bugs.webkit.org/show_bug.cgi?id=198244
     5
     6        Reviewed by Simon Fraser.
     7
     8        Added regression tests.
     9
     10        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard-expected.txt: Added.
     11        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-keyboard.html: Added.
     12        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1-expected.txt: Added.
     13        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-1.html: Added.
     14        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2-expected.txt: Added.
     15        * fast/scrolling/ios/body-overflow-hidden-height-100-percent-zoomed-2.html: Added.
     16
    1172019-05-31  Commit Queue  <commit-queue@webkit.org>
    218
  • trunk/Source/WebKit/ChangeLog

    r245987 r245989  
     12019-05-31  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        iOS: Main frame should be scrollable when pinch zoomed or software keyboard is up
     4        https://bugs.webkit.org/show_bug.cgi?id=198244
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is a follow up to r245006. Even when overflow: hidden is specified on the document body,
     9        we still need to make it scrollable when the page is pinch zoomed or there is a content inset
     10        e.g. for software keyboard. Otherwise, the user won't be able to get to the content that is
     11        outside the visual viewport when pinch zoomed or the parts of the page that is not outside
     12        the visual viewport due to the scrolling caused by the software keyboard being brought up.
     13
     14        * UIProcess/API/Cocoa/WKWebView.mm:
     15        (-[WKWebView _didCommitLayerTree:]):
     16
    1172019-05-31  Geoffrey Garen  <ggaren@apple.com>
    218
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r245984 r245989  
    19891989    [_scrollView setZoomEnabled:layerTreeTransaction.allowsUserScaling()];
    19901990#if ENABLE(ASYNC_SCROLLING)
    1991     [_scrollView setScrollEnabled:_page->scrollingCoordinatorProxy()->hasScrollableMainFrame()];
     1991    bool hasDockedInputView = !CGRectIsEmpty(_inputViewBounds);
     1992    bool isZoomed = layerTreeTransaction.pageScaleFactor() > layerTreeTransaction.initialScaleFactor();
     1993    [_scrollView setScrollEnabled:_page->scrollingCoordinatorProxy()->hasScrollableMainFrame() || hasDockedInputView || isZoomed];
    19921994#endif
    19931995    if (!layerTreeTransaction.scaleWasSetByUIProcess() && ![_scrollView isZooming] && ![_scrollView isZoomBouncing] && ![_scrollView _isAnimatingZoom] && [_scrollView zoomScale] != layerTreeTransaction.pageScaleFactor()) {
Note: See TracChangeset for help on using the changeset viewer.