[Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 21:07:38 +0000 (21:07 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 21:07:38 +0000 (21:07 +0000)
commit9d95cecfa3ef99162a58d56c6dcefb94920906a2
treeca56506691039589c364604fb8b1c0be82f757c1
parenta79ba0383d6ac09c9fab320c31a54d2bd4bf0900
[Mail] Use the Mail Viewer width as the base for resolving horizontal viewport units
https://bugs.webkit.org/show_bug.cgi?id=186585
<rdar://problem/30685325>

Reviewed by Tim Horton.

Source/WebCore:

Use the existing "override viewport size for viewport units" mechanism to compute the preferred
viewport unit values for the Mail Viewer html content.

Test: fast/dynamic/mail-autosize-viewport-unit.html

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::enableAutoSizeMode):
(WebCore::FrameView::clearViewportSizeOverrideForCSSViewportUnits):
(WebCore::FrameView::setViewportSizeForCSSViewportUnits):
(WebCore::FrameView::overrideViewportSizeForCSSViewportUnits):
(WebCore::FrameView::viewportSizeForCSSViewportUnits const):
* page/FrameView.h:

LayoutTests:

* fast/dynamic/mail-autosize-viewport-unit-expected.txt: Added.
* fast/dynamic/mail-autosize-viewport-unit.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dynamic/mail-autosize-viewport-unit-expected.txt [new file with mode: 0644]
LayoutTests/fast/dynamic/mail-autosize-viewport-unit.html [new file with mode: 0644]
LayoutTests/platform/ios/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm