Bug 133779 - [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
Summary: [iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks: 133785
  Show dependency treegraph
 
Reported: 2014-06-11 17:41 PDT by Simon Fraser (smfr)
Modified: 2014-06-11 22:24 PDT (History)
5 users (show)

See Also:


Attachments
Patch (13.22 KB, patch)
2014-06-11 17:45 PDT, Simon Fraser (smfr)
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2014-06-11 17:41:24 PDT
[iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
Comment 1 Simon Fraser (smfr) 2014-06-11 17:45:28 PDT
Created attachment 232925 [details]
Patch
Comment 2 Benjamin Poulain 2014-06-11 17:49:56 PDT
Comment on attachment 232925 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232925&action=review

> Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm:247
> +    WebPageProxy *webPageProxy = [_contentView page];

* on the wrong side.

> Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm:248
> +    webPageProxy->setViewportConfigurationMinimumLayoutSize(WebCore::FloatSize(bounds.size));

You should also send setMaximumUnobscuredSize() so that we can use viewport units.
You could set setViewportConfigurationMinimumLayoutSizeForMinimalUI() but there is no test for it.

They should all take the same size in this case.

> Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:2200
> +    if (m_useTestingViewportConfiguration) {
> +        m_viewportConfiguration.setDefaultConfiguration(ViewportConfiguration::testingParameters());
> +        return;
> +    }

Shouldn't this be above the case with !frame?
Comment 3 Simon Fraser (smfr) 2014-06-11 19:04:36 PDT
https://trac.webkit.org/r169869