New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Viewport layout size is sometimes incorrect when a site specifies an initial scale #14566
Conversation
EWS run on previous version of this PR (hash 79f4f9c) |
Can we make a layout test or API test for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me but I agree with Simon that there should be a test.
Yup, working on an API test rn |
EWS run on previous version of this PR (hash a91945d) |
EWS run on previous version of this PR (hash b7590ad) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-reviewer r+
EWS run on current version of this PR (hash 52695d3) |
β¦initial scale https://bugs.webkit.org/show_bug.cgi?id=257583 rdar://109483331 Reviewed by Dean Jackson. On iOS, if a page specifies a viewport meta tag including an initial scale value that is < 1, and if the `minimumEffectiveDeviceWidth` is non-zero, the resulting layout width will have an undesirable value. Instead, the initial scale should be ignored when the `minimumEffectiveDeviceWidth` is specified when computing the layout width. This PR fixes this by ignoring the initial scale only when the `minimumEffectiveDeviceWidth` actually has an effect on the viewport layout width. Also refactors the `applyViewportArgument` to be simpler. * Source/WebCore/page/ViewportConfiguration.cpp: (WebCore::applyViewportArgument): (WebCore::ViewportConfiguration::updateConfiguration): (WebCore::ViewportConfiguration::layoutWidth const): * Source/WebCore/page/ViewportConfiguration.h: (WebCore::ViewportConfiguration::Parameters::operator== const): * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/ios/Viewport.mm: Added. (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/264842@main
52695d3
to
3cfe137
Compare
Committed 264842@main (3cfe137): https://commits.webkit.org/264842@main Reviewed commits have been landed. Closing PR #14566 and removing active labels. |
3cfe137
52695d3
π§ͺ api-mac