Bug 192377 - We should ignore minimumEffectiveDeviceWidth if the page specifies device-width in viewport meta-tag.
Summary: We should ignore minimumEffectiveDeviceWidth if the page specifies device-wid...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yongjun Zhang
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-04 14:01 PST by Yongjun Zhang
Modified: 2018-12-06 17:35 PST (History)
7 users (show)

See Also:


Attachments
Patch. (19.11 KB, patch)
2018-12-04 15:39 PST, Yongjun Zhang
no flags Details | Formatted Diff | Diff
Address review comments. (18.99 KB, patch)
2018-12-05 09:59 PST, Yongjun Zhang
thorton: review+
Details | Formatted Diff | Diff
Address review comments before landing. (18.79 KB, patch)
2018-12-06 16:31 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-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.
Comment 1 Yongjun Zhang 2018-12-04 14:11:41 PST
rdar://problem/46364206
Comment 2 Yongjun Zhang 2018-12-04 15:39:47 PST
Created attachment 356548 [details]
Patch.
Comment 3 Tim Horton 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
Comment 4 Yongjun Zhang 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!
Comment 5 Yongjun Zhang 2018-12-05 09:59:08 PST
Created attachment 356613 [details]
Address review comments.
Comment 6 Tim Horton 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.
Comment 7 Yongjun Zhang 2018-12-06 16:31:22 PST
Created attachment 356762 [details]
Address review comments before landing.
Comment 8 WebKit Commit Bot 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.
Comment 9 WebKit Commit Bot 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.
Comment 10 WebKit Commit Bot 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>
Comment 11 WebKit Commit Bot 2018-12-06 17:35:36 PST
All reviewed patches have been landed.  Closing bug.