Bug 192377

Summary: We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
Product: WebKit Reporter: Yongjun Zhang <yongjun_zhang>
Component: Layout and RenderingAssignee: Yongjun Zhang <yongjun_zhang>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, simon.fraser, thorton, wenson_hsieh, yongjun_zhang, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch.
none
Address review comments.
thorton: review+
Address review comments before landing. none

Yongjun Zhang
Reported 2018-12-04 14:01:48 PST
If the page specifies width=device-width in the viewport meta tag, we should use the native device width and ignore the minimum effective device width.
Attachments
Patch. (19.11 KB, patch)
2018-12-04 15:39 PST, Yongjun Zhang
no flags
Address review comments. (18.99 KB, patch)
2018-12-05 09:59 PST, Yongjun Zhang
thorton: review+
Address review comments before landing. (18.79 KB, patch)
2018-12-06 16:31 PST, Yongjun Zhang
no flags
Yongjun Zhang
Comment 1 2018-12-04 14:11:41 PST
Yongjun Zhang
Comment 2 2018-12-04 15:39:47 PST
Tim Horton
Comment 3 2018-12-04 15:46:23 PST
Comment on attachment 356548 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=356548&action=review > Source/WebCore/page/ViewportConfiguration.cpp:151 > +void ViewportConfiguration::overrideDefaultConfiguration() This is more of an "update" method than an actual "override" method, right? It doesn't always "override", it decides whether it should or not. > Source/WebCore/page/ViewportConfiguration.cpp:161 > + // When ignoring mEDW, we should render the content with native device width and use nativeWebpageParameters. Please don't abbreviate like that :) It makes find-and-replace terrible! Also this is sort of a what and not a why comment. Might just leave it out
Yongjun Zhang
Comment 4 2018-12-04 15:57:36 PST
(In reply to Tim Horton from comment #3) > Comment on attachment 356548 [details] > Patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=356548&action=review > > > Source/WebCore/page/ViewportConfiguration.cpp:151 > > +void ViewportConfiguration::overrideDefaultConfiguration() > > This is more of an "update" method than an actual "override" method, right? Right, it is more like "update". I will change to that. > It doesn't always "override", it decides whether it should or not. > > > Source/WebCore/page/ViewportConfiguration.cpp:161 > > + // When ignoring mEDW, we should render the content with native device width and use nativeWebpageParameters. > > Please don't abbreviate like that :) It makes find-and-replace terrible! > Also this is sort of a what and not a why comment. Might just leave it out Sure, will do!
Yongjun Zhang
Comment 5 2018-12-05 09:59:08 PST
Created attachment 356613 [details] Address review comments.
Tim Horton
Comment 6 2018-12-06 14:19:04 PST
Comment on attachment 356613 [details] Address review comments. View in context: https://bugs.webkit.org/attachment.cgi?id=356613&action=review > Source/WebCore/page/ViewportConfiguration.cpp:351 > +ViewportConfiguration::Parameters ViewportConfiguration::standardWebpageParameters() We talked about the name of this offline. You might also consider sharing some code with the function above.
Yongjun Zhang
Comment 7 2018-12-06 16:31:22 PST
Created attachment 356762 [details] Address review comments before landing.
WebKit Commit Bot
Comment 8 2018-12-06 17:20:27 PST
The commit-queue encountered the following flaky tests while processing attachment 356762 [details]: imported/w3c/web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.https.any.html bug 192050 The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 9 2018-12-06 17:20:40 PST
The commit-queue encountered the following flaky tests while processing attachment 356762 [details]: imported/w3c/web-platform-tests/css/geometry/interfaces.worker.html bug 192484 (author: rego@igalia.com) inspector/dom/customElementState.html bug 192485 (authors: drousso@apple.com and rniwa@webkit.org) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 10 2018-12-06 17:35:34 PST
Comment on attachment 356762 [details] Address review comments before landing. Clearing flags on attachment: 356762 Committed r238946: <https://trac.webkit.org/changeset/238946>
WebKit Commit Bot
Comment 11 2018-12-06 17:35:36 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.