Bug 191499 - Allow WebKit clients to specify a minimum effective width for layout.
Summary: Allow WebKit clients to specify a minimum effective width for layout.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yongjun Zhang
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-09 17:03 PST by Yongjun Zhang
Modified: 2018-11-28 10:50 PST (History)
5 users (show)

See Also:


Attachments
Patch. (33.17 KB, patch)
2018-11-10 12:33 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff
Fix mac build and layout tests. (33.06 KB, patch)
2018-11-10 15:57 PST, Yongjun Zhang
ews-watchlist: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.34 MB, application/zip)
2018-11-10 19:45 PST, EWS Watchlist
no flags Details
Address review comments. (33.52 KB, patch)
2018-11-12 17:41 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yongjun Zhang 2018-11-09 17:03:47 PST
If we ignore the meta viewport (_shouldIgnoreMetaViewport is true), the default layout width will be device width in full screen. For clients that wish to lay out the content with a different width value, we would need to add a way to specify the effective width.
Comment 1 Yongjun Zhang 2018-11-09 17:04:46 PST
<rdar://problem/45362678>
Comment 2 Yongjun Zhang 2018-11-10 12:33:24 PST
Created attachment 354471 [details]
Patch.
Comment 3 Yongjun Zhang 2018-11-10 15:57:01 PST
Created attachment 354480 [details]
Fix mac build and layout tests.
Comment 4 Wenson Hsieh 2018-11-10 17:27:21 PST
Comment on attachment 354480 [details]
Fix mac build and layout tests.

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

> Source/WebCore/page/ViewportConfiguration.h:140
>      }

We should probably update forceAlwaysUserScalableMinimumScale() and forceAlwaysUserScalableMaximumScale() to use the effective layout scale factor too.

> Source/WebKit/UIProcess/WebPageProxy.h:592
> +    void setViewportConfigurationViewLayoutSize(const WebCore::FloatSize&, double scaleFactor, double effectiveWidth);

The variable name here (and in other places when plumbing from WKWebView to ViewportConfiguration) should probably be minimumEffectiveDeviceWidth, rather than effectiveWidth.
Comment 5 EWS Watchlist 2018-11-10 19:45:00 PST
Comment on attachment 354480 [details]
Fix mac build and layout tests.

Attachment 354480 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/9944175

New failing tests:
fast/viewport/ios/minimum-scale-after-changing-view-scale.html
Comment 6 EWS Watchlist 2018-11-10 19:45:01 PST
Created attachment 354492 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 7 Yongjun Zhang 2018-11-12 17:41:39 PST
Created attachment 354614 [details]
Address review comments.
Comment 8 Wenson Hsieh 2018-11-28 10:17:03 PST
Comment on attachment 354614 [details]
Address review comments.

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

> LayoutTests/ChangeLog:13
> +

Nit - extra newline here.
Comment 9 WebKit Commit Bot 2018-11-28 10:50:31 PST
Comment on attachment 354614 [details]
Address review comments.

Clearing flags on attachment: 354614

Committed r238623: <https://trac.webkit.org/changeset/238623>
Comment 10 WebKit Commit Bot 2018-11-28 10:50:33 PST
All reviewed patches have been landed.  Closing bug.