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

Changeset 248281 in webkit


Ignore:
Timestamp:
Aug 5, 2019, 5:31:57 PM (7 years ago)
Author:
Simon Fraser
Message:

iOS 13: Overflow:hidden on body prevents PDF scroll
https://bugs.webkit.org/show_bug.cgi?id=200435
rdar://problem/53942888

Reviewed by Tim Horton.
Source/WebKit:

When we navigate from an overflow:hidden HTML page to a custom view (like PDF), we need
to make sure that the scroll view is scrollable.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):

Tools:

When we navigate from an overflow:hidden HTML page to a custom view (like PDF), we need
to make sure that the scroll view is scrollable.

  • TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm:

(TestWebKitAPI::TEST):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r248273 r248281  
     12019-08-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        iOS 13: Overflow:hidden on body prevents PDF scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=200435
     5        rdar://problem/53942888
     6
     7        Reviewed by Tim Horton.
     8
     9        When we navigate from an overflow:hidden HTML page to a custom view (like PDF), we need
     10        to make sure that the scroll view is scrollable.
     11
     12        * UIProcess/API/Cocoa/WKWebView.mm:
     13        (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
     14
    1152019-08-05  John Wilander  <wilander@apple.com>
    216
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm

    r247837 r248281  
    16311631        _scrollViewBackgroundColor = WebCore::Color();
    16321632        [_scrollView setContentOffset:[self _initialContentOffsetForScrollView]];
     1633        [_scrollView _setScrollEnabledInternal:YES];
    16331634
    16341635        [self _setAvoidsUnsafeArea:NO];
  • trunk/Tools/ChangeLog

    r248272 r248281  
     12019-08-05  Simon Fraser  <simon.fraser@apple.com>
     2
     3        iOS 13: Overflow:hidden on body prevents PDF scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=200435
     5        rdar://problem/53942888
     6
     7        Reviewed by Tim Horton.
     8   
     9        When we navigate from an overflow:hidden HTML page to a custom view (like PDF), we need
     10        to make sure that the scroll view is scrollable.
     11
     12        * TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm:
     13        (TestWebKitAPI::TEST):
     14
    1152019-08-05  Aakash Jain  <aakash_jain@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/ios/ScrollViewScrollabilityTests.mm

    r247344 r248281  
    3030#import "PlatformUtilities.h"
    3131#import "TestInputDelegate.h"
     32#import "TestNavigationDelegate.h"
    3233#import "TestWKWebView.h"
    3334#import <UIKit/UIKit.h>
     
    138139}
    139140
     141TEST(ScrollViewScrollabilityTests, ScrollableAfterNavigateToPDF)
     142{
     143    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, viewHeight, 414)]);
     144
     145    [webView synchronouslyLoadHTMLString:nonScrollableDocumentMarkup];
     146    [webView waitForNextPresentationUpdate];
     147    EXPECT_EQ([[webView scrollView] isScrollEnabled], NO);
     148
     149    NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"test" withExtension:@"pdf" subdirectory:@"TestWebKitAPI.resources"]];
     150    [webView loadRequest:request];
     151
     152    [webView _test_waitForDidFinishNavigation];
     153
     154    EXPECT_EQ([[webView scrollView] isScrollEnabled], YES);
     155}
     156
    140157} // namespace TestWebKitAPI
    141158
Note: See TracChangeset for help on using the changeset viewer.