[webkit-changes] [WebKit/WebKit] 3cfe13: Viewport layout size is sometimes incorrect when a...
Richard Robinson
noreply at github.com
Fri Jun 2 17:11:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3cfe137626e4ea11429127409326b27a3726fc58
https://github.com/WebKit/WebKit/commit/3cfe137626e4ea11429127409326b27a3726fc58
Author: Richard Robinson <richard_robinson2 at apple.com>
Date: 2023-06-02 (Fri, 02 Jun 2023)
Changed paths:
M Source/WebCore/page/ViewportConfiguration.cpp
M Source/WebCore/page/ViewportConfiguration.h
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/ios/Viewport.mm
Log Message:
-----------
Viewport layout size is sometimes incorrect when a site specifies an 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
More information about the webkit-changes
mailing list