[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kenneth at webkit.org
kenneth at webkit.org
Wed Dec 22 13:22:26 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8a9df01b86e5c80e07c4a3d331666199e0e755ad
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Sep 13 10:37:28 2010 +0000
WebCore: Update support for the viewport meta tag algorithm, to
match the following draft spec:
Patch by Kenneth Rohde Christiansen <kenneth at webkit.org> on 2010-08-27
Reviewed by Antti Koivisto.
http://people.opera.com/rune/TR/ED-css-viewport-20100806/
Add common handling of viewport meta tag based on new Opera spec
https://bugs.webkit.org/show_bug.cgi?id=44201
Tests: fast/viewport/viewport-1.html
fast/viewport/viewport-10.html
fast/viewport/viewport-100.html
fast/viewport/viewport-101.html
fast/viewport/viewport-102.html
fast/viewport/viewport-103.html
fast/viewport/viewport-104.html
fast/viewport/viewport-105.html
fast/viewport/viewport-106.html
fast/viewport/viewport-107.html
fast/viewport/viewport-108.html
fast/viewport/viewport-109.html
fast/viewport/viewport-11.html
fast/viewport/viewport-110.html
fast/viewport/viewport-111.html
fast/viewport/viewport-112.html
fast/viewport/viewport-113.html
fast/viewport/viewport-114.html
fast/viewport/viewport-115.html
fast/viewport/viewport-116.html
fast/viewport/viewport-117.html
fast/viewport/viewport-118.html
fast/viewport/viewport-119.html
fast/viewport/viewport-12.html
fast/viewport/viewport-120.html
fast/viewport/viewport-121.html
fast/viewport/viewport-122.html
fast/viewport/viewport-123.html
fast/viewport/viewport-124.html
fast/viewport/viewport-125.html
fast/viewport/viewport-126.html
fast/viewport/viewport-127.html
fast/viewport/viewport-13.html
fast/viewport/viewport-14.html
fast/viewport/viewport-15.html
fast/viewport/viewport-16.html
fast/viewport/viewport-17.html
fast/viewport/viewport-18.html
fast/viewport/viewport-19.html
fast/viewport/viewport-2.html
fast/viewport/viewport-20.html
fast/viewport/viewport-21.html
fast/viewport/viewport-22.html
fast/viewport/viewport-23.html
fast/viewport/viewport-24.html
fast/viewport/viewport-25.html
fast/viewport/viewport-26.html
fast/viewport/viewport-27.html
fast/viewport/viewport-28.html
fast/viewport/viewport-29.html
fast/viewport/viewport-3.html
fast/viewport/viewport-30.html
fast/viewport/viewport-31.html
fast/viewport/viewport-32.html
fast/viewport/viewport-33.html
fast/viewport/viewport-34.html
fast/viewport/viewport-35.html
fast/viewport/viewport-36.html
fast/viewport/viewport-37.html
fast/viewport/viewport-38.html
fast/viewport/viewport-39.html
fast/viewport/viewport-4.html
fast/viewport/viewport-40.html
fast/viewport/viewport-41.html
fast/viewport/viewport-42.html
fast/viewport/viewport-43.html
fast/viewport/viewport-44.html
fast/viewport/viewport-45.html
fast/viewport/viewport-46.html
fast/viewport/viewport-47.html
fast/viewport/viewport-48.html
fast/viewport/viewport-49.html
fast/viewport/viewport-5.html
fast/viewport/viewport-50.html
fast/viewport/viewport-51.html
fast/viewport/viewport-52.html
fast/viewport/viewport-53.html
fast/viewport/viewport-54.html
fast/viewport/viewport-55.html
fast/viewport/viewport-56.html
fast/viewport/viewport-57.html
fast/viewport/viewport-58.html
fast/viewport/viewport-59.html
fast/viewport/viewport-6.html
fast/viewport/viewport-60.html
fast/viewport/viewport-61.html
fast/viewport/viewport-62.html
fast/viewport/viewport-63.html
fast/viewport/viewport-64.html
fast/viewport/viewport-65.html
fast/viewport/viewport-66.html
fast/viewport/viewport-67.html
fast/viewport/viewport-68.html
fast/viewport/viewport-69.html
fast/viewport/viewport-7.html
fast/viewport/viewport-70.html
fast/viewport/viewport-71.html
fast/viewport/viewport-72.html
fast/viewport/viewport-73.html
fast/viewport/viewport-74.html
fast/viewport/viewport-75.html
fast/viewport/viewport-76.html
fast/viewport/viewport-77.html
fast/viewport/viewport-78.html
fast/viewport/viewport-79.html
fast/viewport/viewport-8.html
fast/viewport/viewport-80.html
fast/viewport/viewport-81.html
fast/viewport/viewport-82.html
fast/viewport/viewport-83.html
fast/viewport/viewport-84.html
fast/viewport/viewport-85.html
fast/viewport/viewport-86.html
fast/viewport/viewport-87.html
fast/viewport/viewport-88.html
fast/viewport/viewport-9.html
fast/viewport/viewport-90.html
* dom/ViewportArguments.cpp:
(WebCore::findConfigurationForViewportData):
(WebCore::findSizeValue):
(WebCore::findScaleValue):
(WebCore::findUserScalableValue):
(WebCore::findTargetDensityDPIValue):
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::):
(WebCore::ViewportArguments::ViewportArguments):
(WebCore::ViewportArguments::hasCustomArgument):
WebKit/qt: Add a Qt API for the viewport meta tag support based on the
following draft spec:
Reviewed by Antti Koivisto.
http://people.opera.com/rune/TR/ED-css-viewport-20100806/
Add common handling of viewport meta tag based on new Opera spec
https://bugs.webkit.org/show_bug.cgi?id=44201
* Api/qwebframe_p.h:
(QWebFramePrivate::QWebFramePrivate):
* Api/qwebpage.cpp:
(QWebPage::ViewportConfiguration::ViewportConfiguration):
(QWebPage::ViewportConfiguration::~ViewportConfiguration):
(QWebPage::ViewportConfiguration::operator=):
(QWebPage::viewportConfigurationForSize):
(QWebPage::setPreferredContentsSize):
* Api/qwebpage.h:
* Api/qwebpage_p.h:
(QtViewportConfigurationPrivate::QtViewportConfigurationPrivate):
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::didReceiveViewportArguments):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::viewportAsText):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
WebKitTools: Add support for testing the viewport meta tag algorithm,
based on the following draft spec:
Reviewed by Antti Koivisto.
http://people.opera.com/rune/TR/ED-css-viewport-20100806/
Add common handling of viewport meta tag based on new Opera spec
https://bugs.webkit.org/show_bug.cgi?id=44201
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::dumpConfigurationForViewport):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
LayoutTests: Add tests for the viewport meta tag algorithm and parsing,
based on a test suite developed by Opera employees
Rune Lillesveen and Øyvind Stenhaug.
Patch by Kenneth Rohde Christiansen <kenneth at webkit.org> on 2010-08-27
Reviewed by Antti Koivisto.
* fast/viewport/viewport-1-expected.txt: Added.
* fast/viewport/viewport-1.html: Added.
* fast/viewport/viewport-10-expected.txt: Added.
* fast/viewport/viewport-10.html: Added.
* fast/viewport/viewport-100-expected.txt: Added.
* fast/viewport/viewport-100.html: Added.
* fast/viewport/viewport-101-expected.txt: Added.
* fast/viewport/viewport-101.html: Added.
* fast/viewport/viewport-102-expected.txt: Added.
* fast/viewport/viewport-102.html: Added.
* fast/viewport/viewport-103-expected.txt: Added.
* fast/viewport/viewport-103.html: Added.
* fast/viewport/viewport-104-expected.txt: Added.
* fast/viewport/viewport-104.html: Added.
* fast/viewport/viewport-105-expected.txt: Added.
* fast/viewport/viewport-105.html: Added.
* fast/viewport/viewport-106-expected.txt: Added.
* fast/viewport/viewport-106.html: Added.
* fast/viewport/viewport-107-expected.txt: Added.
* fast/viewport/viewport-107.html: Added.
* fast/viewport/viewport-108-expected.txt: Added.
* fast/viewport/viewport-108.html: Added.
* fast/viewport/viewport-109-expected.txt: Added.
* fast/viewport/viewport-109.html: Added.
* fast/viewport/viewport-11-expected.txt: Added.
* fast/viewport/viewport-11.html: Added.
* fast/viewport/viewport-110-expected.txt: Added.
* fast/viewport/viewport-110.html: Added.
* fast/viewport/viewport-111-expected.txt: Added.
* fast/viewport/viewport-111.html: Added.
* fast/viewport/viewport-112-expected.txt: Added.
* fast/viewport/viewport-112.html: Added.
* fast/viewport/viewport-113-expected.txt: Added.
* fast/viewport/viewport-113.html: Added.
* fast/viewport/viewport-114-expected.txt: Added.
* fast/viewport/viewport-114.html: Added.
* fast/viewport/viewport-115-expected.txt: Added.
* fast/viewport/viewport-115.html: Added.
* fast/viewport/viewport-116-expected.txt: Added.
* fast/viewport/viewport-116.html: Added.
* fast/viewport/viewport-117-expected.txt: Added.
* fast/viewport/viewport-117.html: Added.
* fast/viewport/viewport-118-expected.txt: Added.
* fast/viewport/viewport-118.html: Added.
* fast/viewport/viewport-119-expected.txt: Added.
* fast/viewport/viewport-119.html: Added.
* fast/viewport/viewport-12-expected.txt: Added.
* fast/viewport/viewport-12.html: Added.
* fast/viewport/viewport-120-expected.txt: Added.
* fast/viewport/viewport-120.html: Added.
* fast/viewport/viewport-121-expected.txt: Added.
* fast/viewport/viewport-121.html: Added.
* fast/viewport/viewport-122-expected.txt: Added.
* fast/viewport/viewport-122.html: Added.
* fast/viewport/viewport-123-expected.txt: Added.
* fast/viewport/viewport-123.html: Added.
* fast/viewport/viewport-124-expected.txt: Added.
* fast/viewport/viewport-124.html: Added.
* fast/viewport/viewport-125-expected.txt: Added.
* fast/viewport/viewport-125.html: Added.
* fast/viewport/viewport-126.html: Added.
* fast/viewport/viewport-127.html: Added.
* fast/viewport/viewport-13-expected.txt: Added.
* fast/viewport/viewport-13.html: Added.
* fast/viewport/viewport-14-expected.txt: Added.
* fast/viewport/viewport-14.html: Added.
* fast/viewport/viewport-15-expected.txt: Added.
* fast/viewport/viewport-15.html: Added.
* fast/viewport/viewport-16-expected.txt: Added.
* fast/viewport/viewport-16.html: Added.
* fast/viewport/viewport-17-expected.txt: Added.
* fast/viewport/viewport-17.html: Added.
* fast/viewport/viewport-18-expected.txt: Added.
* fast/viewport/viewport-18.html: Added.
* fast/viewport/viewport-19-expected.txt: Added.
* fast/viewport/viewport-19.html: Added.
* fast/viewport/viewport-2-expected.txt: Added.
* fast/viewport/viewport-2.html: Added.
* fast/viewport/viewport-20-expected.txt: Added.
* fast/viewport/viewport-20.html: Added.
* fast/viewport/viewport-21-expected.txt: Added.
* fast/viewport/viewport-21.html: Added.
* fast/viewport/viewport-22-expected.txt: Added.
* fast/viewport/viewport-22.html: Added.
* fast/viewport/viewport-23-expected.txt: Added.
* fast/viewport/viewport-23.html: Added.
* fast/viewport/viewport-24-expected.txt: Added.
* fast/viewport/viewport-24.html: Added.
* fast/viewport/viewport-25-expected.txt: Added.
* fast/viewport/viewport-25.html: Added.
* fast/viewport/viewport-26-expected.txt: Added.
* fast/viewport/viewport-26.html: Added.
* fast/viewport/viewport-27-expected.txt: Added.
* fast/viewport/viewport-27.html: Added.
* fast/viewport/viewport-28-expected.txt: Added.
* fast/viewport/viewport-28.html: Added.
* fast/viewport/viewport-29-expected.txt: Added.
* fast/viewport/viewport-29.html: Added.
* fast/viewport/viewport-3-expected.txt: Added.
* fast/viewport/viewport-3.html: Added.
* fast/viewport/viewport-30-expected.txt: Added.
* fast/viewport/viewport-30.html: Added.
* fast/viewport/viewport-31-expected.txt: Added.
* fast/viewport/viewport-31.html: Added.
* fast/viewport/viewport-32-expected.txt: Added.
* fast/viewport/viewport-32.html: Added.
* fast/viewport/viewport-33-expected.txt: Added.
* fast/viewport/viewport-33.html: Added.
* fast/viewport/viewport-34-expected.txt: Added.
* fast/viewport/viewport-34.html: Added.
* fast/viewport/viewport-35-expected.txt: Added.
* fast/viewport/viewport-35.html: Added.
* fast/viewport/viewport-36-expected.txt: Added.
* fast/viewport/viewport-36.html: Added.
* fast/viewport/viewport-37-expected.txt: Added.
* fast/viewport/viewport-37.html: Added.
* fast/viewport/viewport-38-expected.txt: Added.
* fast/viewport/viewport-38.html: Added.
* fast/viewport/viewport-39-expected.txt: Added.
* fast/viewport/viewport-39.html: Added.
* fast/viewport/viewport-4-expected.txt: Added.
* fast/viewport/viewport-4.html: Added.
* fast/viewport/viewport-40-expected.txt: Added.
* fast/viewport/viewport-40.html: Added.
* fast/viewport/viewport-41-expected.txt: Added.
* fast/viewport/viewport-41.html: Added.
* fast/viewport/viewport-42-expected.txt: Added.
* fast/viewport/viewport-42.html: Added.
* fast/viewport/viewport-43-expected.txt: Added.
* fast/viewport/viewport-43.html: Added.
* fast/viewport/viewport-44-expected.txt: Added.
* fast/viewport/viewport-44.html: Added.
* fast/viewport/viewport-45-expected.txt: Added.
* fast/viewport/viewport-45.html: Added.
* fast/viewport/viewport-46-expected.txt: Added.
* fast/viewport/viewport-46.html: Added.
* fast/viewport/viewport-47-expected.txt: Added.
* fast/viewport/viewport-47.html: Added.
* fast/viewport/viewport-48-expected.txt: Added.
* fast/viewport/viewport-48.html: Added.
* fast/viewport/viewport-49-expected.txt: Added.
* fast/viewport/viewport-49.html: Added.
* fast/viewport/viewport-5-expected.txt: Added.
* fast/viewport/viewport-5.html: Added.
* fast/viewport/viewport-50-expected.txt: Added.
* fast/viewport/viewport-50.html: Added.
* fast/viewport/viewport-51-expected.txt: Added.
* fast/viewport/viewport-51.html: Added.
* fast/viewport/viewport-52-expected.txt: Added.
* fast/viewport/viewport-52.html: Added.
* fast/viewport/viewport-53-expected.txt: Added.
* fast/viewport/viewport-53.html: Added.
* fast/viewport/viewport-54-expected.txt: Added.
* fast/viewport/viewport-54.html: Added.
* fast/viewport/viewport-55-expected.txt: Added.
* fast/viewport/viewport-55.html: Added.
* fast/viewport/viewport-56-expected.txt: Added.
* fast/viewport/viewport-56.html: Added.
* fast/viewport/viewport-57-expected.txt: Added.
* fast/viewport/viewport-57.html: Added.
* fast/viewport/viewport-58-expected.txt: Added.
* fast/viewport/viewport-58.html: Added.
* fast/viewport/viewport-59-expected.txt: Added.
* fast/viewport/viewport-59.html: Added.
* fast/viewport/viewport-6-expected.txt: Added.
* fast/viewport/viewport-6.html: Added.
* fast/viewport/viewport-60-expected.txt: Added.
* fast/viewport/viewport-60.html: Added.
* fast/viewport/viewport-61-expected.txt: Added.
* fast/viewport/viewport-61.html: Added.
* fast/viewport/viewport-62-expected.txt: Added.
* fast/viewport/viewport-62.html: Added.
* fast/viewport/viewport-63-expected.txt: Added.
* fast/viewport/viewport-63.html: Added.
* fast/viewport/viewport-64-expected.txt: Added.
* fast/viewport/viewport-64.html: Added.
* fast/viewport/viewport-65.html: Added.
* fast/viewport/viewport-66-expected.txt: Added.
* fast/viewport/viewport-66.html: Added.
* fast/viewport/viewport-67-expected.txt: Added.
* fast/viewport/viewport-67.html: Added.
* fast/viewport/viewport-68-expected.txt: Added.
* fast/viewport/viewport-68.html: Added.
* fast/viewport/viewport-69-expected.txt: Added.
* fast/viewport/viewport-69.html: Added.
* fast/viewport/viewport-7-expected.txt: Added.
* fast/viewport/viewport-7.html: Added.
* fast/viewport/viewport-70-expected.txt: Added.
* fast/viewport/viewport-70.html: Added.
* fast/viewport/viewport-71-expected.txt: Added.
* fast/viewport/viewport-71.html: Added.
* fast/viewport/viewport-72-expected.txt: Added.
* fast/viewport/viewport-72.html: Added.
* fast/viewport/viewport-73-expected.txt: Added.
* fast/viewport/viewport-73.html: Added.
* fast/viewport/viewport-74-expected.txt: Added.
* fast/viewport/viewport-74.html: Added.
* fast/viewport/viewport-75-expected.txt: Added.
* fast/viewport/viewport-75.html: Added.
* fast/viewport/viewport-76-expected.txt: Added.
* fast/viewport/viewport-76.html: Added.
* fast/viewport/viewport-77-expected.txt: Added.
* fast/viewport/viewport-77.html: Added.
* fast/viewport/viewport-78-expected.txt: Added.
* fast/viewport/viewport-78.html: Added.
* fast/viewport/viewport-79-expected.txt: Added.
* fast/viewport/viewport-79.html: Added.
* fast/viewport/viewport-8-expected.txt: Added.
* fast/viewport/viewport-8.html: Added.
* fast/viewport/viewport-80-expected.txt: Added.
* fast/viewport/viewport-80.html: Added.
* fast/viewport/viewport-81-expected.txt: Added.
* fast/viewport/viewport-81.html: Added.
* fast/viewport/viewport-82.html: Added.
* fast/viewport/viewport-83-expected.txt: Added.
* fast/viewport/viewport-83.html: Added.
* fast/viewport/viewport-84.html: Added.
* fast/viewport/viewport-85-expected.txt: Added.
* fast/viewport/viewport-85.html: Added.
* fast/viewport/viewport-86-expected.txt: Added.
* fast/viewport/viewport-86.html: Added.
* fast/viewport/viewport-87.html: Added.
* fast/viewport/viewport-88-expected.txt: Added.
* fast/viewport/viewport-88.html: Added.
* fast/viewport/viewport-9-expected.txt: Added.
* fast/viewport/viewport-9.html: Added.
* fast/viewport/viewport-90-expected.txt: Added.
* fast/viewport/viewport-90.html: Added.
* platform/gtk/Skipped: Skip tests due to missing DRT support.
* platform/mac/Skipped: Skip tests due to missing DRT support.
* platform/win/Skipped: Skip tests due to missing DRT support.
* platform/qt/Skipped: Skip failing tests.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67376 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 65753a7..a5f22b6 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,244 @@
+2010-08-27 Kenneth Rohde Christiansen <kenneth at webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Add tests for the viewport meta tag algorithm and parsing,
+ based on a test suite developed by Opera employees
+ Rune Lillesveen and Øyvind Stenhaug.
+
+ * fast/viewport/viewport-1-expected.txt: Added.
+ * fast/viewport/viewport-1.html: Added.
+ * fast/viewport/viewport-10-expected.txt: Added.
+ * fast/viewport/viewport-10.html: Added.
+ * fast/viewport/viewport-100-expected.txt: Added.
+ * fast/viewport/viewport-100.html: Added.
+ * fast/viewport/viewport-101-expected.txt: Added.
+ * fast/viewport/viewport-101.html: Added.
+ * fast/viewport/viewport-102-expected.txt: Added.
+ * fast/viewport/viewport-102.html: Added.
+ * fast/viewport/viewport-103-expected.txt: Added.
+ * fast/viewport/viewport-103.html: Added.
+ * fast/viewport/viewport-104-expected.txt: Added.
+ * fast/viewport/viewport-104.html: Added.
+ * fast/viewport/viewport-105-expected.txt: Added.
+ * fast/viewport/viewport-105.html: Added.
+ * fast/viewport/viewport-106-expected.txt: Added.
+ * fast/viewport/viewport-106.html: Added.
+ * fast/viewport/viewport-107-expected.txt: Added.
+ * fast/viewport/viewport-107.html: Added.
+ * fast/viewport/viewport-108-expected.txt: Added.
+ * fast/viewport/viewport-108.html: Added.
+ * fast/viewport/viewport-109-expected.txt: Added.
+ * fast/viewport/viewport-109.html: Added.
+ * fast/viewport/viewport-11-expected.txt: Added.
+ * fast/viewport/viewport-11.html: Added.
+ * fast/viewport/viewport-110-expected.txt: Added.
+ * fast/viewport/viewport-110.html: Added.
+ * fast/viewport/viewport-111-expected.txt: Added.
+ * fast/viewport/viewport-111.html: Added.
+ * fast/viewport/viewport-112-expected.txt: Added.
+ * fast/viewport/viewport-112.html: Added.
+ * fast/viewport/viewport-113-expected.txt: Added.
+ * fast/viewport/viewport-113.html: Added.
+ * fast/viewport/viewport-114-expected.txt: Added.
+ * fast/viewport/viewport-114.html: Added.
+ * fast/viewport/viewport-115-expected.txt: Added.
+ * fast/viewport/viewport-115.html: Added.
+ * fast/viewport/viewport-116-expected.txt: Added.
+ * fast/viewport/viewport-116.html: Added.
+ * fast/viewport/viewport-117-expected.txt: Added.
+ * fast/viewport/viewport-117.html: Added.
+ * fast/viewport/viewport-118-expected.txt: Added.
+ * fast/viewport/viewport-118.html: Added.
+ * fast/viewport/viewport-119-expected.txt: Added.
+ * fast/viewport/viewport-119.html: Added.
+ * fast/viewport/viewport-12-expected.txt: Added.
+ * fast/viewport/viewport-12.html: Added.
+ * fast/viewport/viewport-120-expected.txt: Added.
+ * fast/viewport/viewport-120.html: Added.
+ * fast/viewport/viewport-121-expected.txt: Added.
+ * fast/viewport/viewport-121.html: Added.
+ * fast/viewport/viewport-122-expected.txt: Added.
+ * fast/viewport/viewport-122.html: Added.
+ * fast/viewport/viewport-123-expected.txt: Added.
+ * fast/viewport/viewport-123.html: Added.
+ * fast/viewport/viewport-124-expected.txt: Added.
+ * fast/viewport/viewport-124.html: Added.
+ * fast/viewport/viewport-125-expected.txt: Added.
+ * fast/viewport/viewport-125.html: Added.
+ * fast/viewport/viewport-126.html: Added.
+ * fast/viewport/viewport-127.html: Added.
+ * fast/viewport/viewport-13-expected.txt: Added.
+ * fast/viewport/viewport-13.html: Added.
+ * fast/viewport/viewport-14-expected.txt: Added.
+ * fast/viewport/viewport-14.html: Added.
+ * fast/viewport/viewport-15-expected.txt: Added.
+ * fast/viewport/viewport-15.html: Added.
+ * fast/viewport/viewport-16-expected.txt: Added.
+ * fast/viewport/viewport-16.html: Added.
+ * fast/viewport/viewport-17-expected.txt: Added.
+ * fast/viewport/viewport-17.html: Added.
+ * fast/viewport/viewport-18-expected.txt: Added.
+ * fast/viewport/viewport-18.html: Added.
+ * fast/viewport/viewport-19-expected.txt: Added.
+ * fast/viewport/viewport-19.html: Added.
+ * fast/viewport/viewport-2-expected.txt: Added.
+ * fast/viewport/viewport-2.html: Added.
+ * fast/viewport/viewport-20-expected.txt: Added.
+ * fast/viewport/viewport-20.html: Added.
+ * fast/viewport/viewport-21-expected.txt: Added.
+ * fast/viewport/viewport-21.html: Added.
+ * fast/viewport/viewport-22-expected.txt: Added.
+ * fast/viewport/viewport-22.html: Added.
+ * fast/viewport/viewport-23-expected.txt: Added.
+ * fast/viewport/viewport-23.html: Added.
+ * fast/viewport/viewport-24-expected.txt: Added.
+ * fast/viewport/viewport-24.html: Added.
+ * fast/viewport/viewport-25-expected.txt: Added.
+ * fast/viewport/viewport-25.html: Added.
+ * fast/viewport/viewport-26-expected.txt: Added.
+ * fast/viewport/viewport-26.html: Added.
+ * fast/viewport/viewport-27-expected.txt: Added.
+ * fast/viewport/viewport-27.html: Added.
+ * fast/viewport/viewport-28-expected.txt: Added.
+ * fast/viewport/viewport-28.html: Added.
+ * fast/viewport/viewport-29-expected.txt: Added.
+ * fast/viewport/viewport-29.html: Added.
+ * fast/viewport/viewport-3-expected.txt: Added.
+ * fast/viewport/viewport-3.html: Added.
+ * fast/viewport/viewport-30-expected.txt: Added.
+ * fast/viewport/viewport-30.html: Added.
+ * fast/viewport/viewport-31-expected.txt: Added.
+ * fast/viewport/viewport-31.html: Added.
+ * fast/viewport/viewport-32-expected.txt: Added.
+ * fast/viewport/viewport-32.html: Added.
+ * fast/viewport/viewport-33-expected.txt: Added.
+ * fast/viewport/viewport-33.html: Added.
+ * fast/viewport/viewport-34-expected.txt: Added.
+ * fast/viewport/viewport-34.html: Added.
+ * fast/viewport/viewport-35-expected.txt: Added.
+ * fast/viewport/viewport-35.html: Added.
+ * fast/viewport/viewport-36-expected.txt: Added.
+ * fast/viewport/viewport-36.html: Added.
+ * fast/viewport/viewport-37-expected.txt: Added.
+ * fast/viewport/viewport-37.html: Added.
+ * fast/viewport/viewport-38-expected.txt: Added.
+ * fast/viewport/viewport-38.html: Added.
+ * fast/viewport/viewport-39-expected.txt: Added.
+ * fast/viewport/viewport-39.html: Added.
+ * fast/viewport/viewport-4-expected.txt: Added.
+ * fast/viewport/viewport-4.html: Added.
+ * fast/viewport/viewport-40-expected.txt: Added.
+ * fast/viewport/viewport-40.html: Added.
+ * fast/viewport/viewport-41-expected.txt: Added.
+ * fast/viewport/viewport-41.html: Added.
+ * fast/viewport/viewport-42-expected.txt: Added.
+ * fast/viewport/viewport-42.html: Added.
+ * fast/viewport/viewport-43-expected.txt: Added.
+ * fast/viewport/viewport-43.html: Added.
+ * fast/viewport/viewport-44-expected.txt: Added.
+ * fast/viewport/viewport-44.html: Added.
+ * fast/viewport/viewport-45-expected.txt: Added.
+ * fast/viewport/viewport-45.html: Added.
+ * fast/viewport/viewport-46-expected.txt: Added.
+ * fast/viewport/viewport-46.html: Added.
+ * fast/viewport/viewport-47-expected.txt: Added.
+ * fast/viewport/viewport-47.html: Added.
+ * fast/viewport/viewport-48-expected.txt: Added.
+ * fast/viewport/viewport-48.html: Added.
+ * fast/viewport/viewport-49-expected.txt: Added.
+ * fast/viewport/viewport-49.html: Added.
+ * fast/viewport/viewport-5-expected.txt: Added.
+ * fast/viewport/viewport-5.html: Added.
+ * fast/viewport/viewport-50-expected.txt: Added.
+ * fast/viewport/viewport-50.html: Added.
+ * fast/viewport/viewport-51-expected.txt: Added.
+ * fast/viewport/viewport-51.html: Added.
+ * fast/viewport/viewport-52-expected.txt: Added.
+ * fast/viewport/viewport-52.html: Added.
+ * fast/viewport/viewport-53-expected.txt: Added.
+ * fast/viewport/viewport-53.html: Added.
+ * fast/viewport/viewport-54-expected.txt: Added.
+ * fast/viewport/viewport-54.html: Added.
+ * fast/viewport/viewport-55-expected.txt: Added.
+ * fast/viewport/viewport-55.html: Added.
+ * fast/viewport/viewport-56-expected.txt: Added.
+ * fast/viewport/viewport-56.html: Added.
+ * fast/viewport/viewport-57-expected.txt: Added.
+ * fast/viewport/viewport-57.html: Added.
+ * fast/viewport/viewport-58-expected.txt: Added.
+ * fast/viewport/viewport-58.html: Added.
+ * fast/viewport/viewport-59-expected.txt: Added.
+ * fast/viewport/viewport-59.html: Added.
+ * fast/viewport/viewport-6-expected.txt: Added.
+ * fast/viewport/viewport-6.html: Added.
+ * fast/viewport/viewport-60-expected.txt: Added.
+ * fast/viewport/viewport-60.html: Added.
+ * fast/viewport/viewport-61-expected.txt: Added.
+ * fast/viewport/viewport-61.html: Added.
+ * fast/viewport/viewport-62-expected.txt: Added.
+ * fast/viewport/viewport-62.html: Added.
+ * fast/viewport/viewport-63-expected.txt: Added.
+ * fast/viewport/viewport-63.html: Added.
+ * fast/viewport/viewport-64-expected.txt: Added.
+ * fast/viewport/viewport-64.html: Added.
+ * fast/viewport/viewport-65.html: Added.
+ * fast/viewport/viewport-66-expected.txt: Added.
+ * fast/viewport/viewport-66.html: Added.
+ * fast/viewport/viewport-67-expected.txt: Added.
+ * fast/viewport/viewport-67.html: Added.
+ * fast/viewport/viewport-68-expected.txt: Added.
+ * fast/viewport/viewport-68.html: Added.
+ * fast/viewport/viewport-69-expected.txt: Added.
+ * fast/viewport/viewport-69.html: Added.
+ * fast/viewport/viewport-7-expected.txt: Added.
+ * fast/viewport/viewport-7.html: Added.
+ * fast/viewport/viewport-70-expected.txt: Added.
+ * fast/viewport/viewport-70.html: Added.
+ * fast/viewport/viewport-71-expected.txt: Added.
+ * fast/viewport/viewport-71.html: Added.
+ * fast/viewport/viewport-72-expected.txt: Added.
+ * fast/viewport/viewport-72.html: Added.
+ * fast/viewport/viewport-73-expected.txt: Added.
+ * fast/viewport/viewport-73.html: Added.
+ * fast/viewport/viewport-74-expected.txt: Added.
+ * fast/viewport/viewport-74.html: Added.
+ * fast/viewport/viewport-75-expected.txt: Added.
+ * fast/viewport/viewport-75.html: Added.
+ * fast/viewport/viewport-76-expected.txt: Added.
+ * fast/viewport/viewport-76.html: Added.
+ * fast/viewport/viewport-77-expected.txt: Added.
+ * fast/viewport/viewport-77.html: Added.
+ * fast/viewport/viewport-78-expected.txt: Added.
+ * fast/viewport/viewport-78.html: Added.
+ * fast/viewport/viewport-79-expected.txt: Added.
+ * fast/viewport/viewport-79.html: Added.
+ * fast/viewport/viewport-8-expected.txt: Added.
+ * fast/viewport/viewport-8.html: Added.
+ * fast/viewport/viewport-80-expected.txt: Added.
+ * fast/viewport/viewport-80.html: Added.
+ * fast/viewport/viewport-81-expected.txt: Added.
+ * fast/viewport/viewport-81.html: Added.
+ * fast/viewport/viewport-82.html: Added.
+ * fast/viewport/viewport-83-expected.txt: Added.
+ * fast/viewport/viewport-83.html: Added.
+ * fast/viewport/viewport-84.html: Added.
+ * fast/viewport/viewport-85-expected.txt: Added.
+ * fast/viewport/viewport-85.html: Added.
+ * fast/viewport/viewport-86-expected.txt: Added.
+ * fast/viewport/viewport-86.html: Added.
+ * fast/viewport/viewport-87.html: Added.
+ * fast/viewport/viewport-88-expected.txt: Added.
+ * fast/viewport/viewport-88.html: Added.
+ * fast/viewport/viewport-9-expected.txt: Added.
+ * fast/viewport/viewport-9.html: Added.
+ * fast/viewport/viewport-90-expected.txt: Added.
+ * fast/viewport/viewport-90.html: Added.
+ * platform/gtk/Skipped: Skip tests due to missing DRT support.
+ * platform/mac/Skipped: Skip tests due to missing DRT support.
+ * platform/win/Skipped: Skip tests due to missing DRT support.
+ * platform/qt/Skipped: Skip failing tests.
+
2010-09-12 Maciej Stachowiak <mjs at apple.com>
Reviewed by Dan Bernstein.
diff --git a/LayoutTests/fast/viewport/viewport-1-expected.txt b/LayoutTests/fast/viewport/viewport-1-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-1-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-1.html b/LayoutTests/fast/viewport/viewport-1.html
new file mode 100644
index 0000000..39068ed
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-1.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport Meta with "width=device-width".</title>
+ <meta name="viewport" content="width=device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-10-expected.txt b/LayoutTests/fast/viewport/viewport-10-expected.txt
new file mode 100644
index 0000000..29a2ba8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-10-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 0.250000]
+
diff --git a/LayoutTests/fast/viewport/viewport-10.html b/LayoutTests/fast/viewport/viewport-10.html
new file mode 100644
index 0000000..28eddb1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-10.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0, initial-scale=10".</title>
+ <meta name="viewport" content="maximum-scale=0, initial-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-100-expected.txt b/LayoutTests/fast/viewport/viewport-100-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-100-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-100.html b/LayoutTests/fast/viewport/viewport-100.html
new file mode 100644
index 0000000..5467f12
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-100.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed ("= width=400")</title>
+ <meta name="viewport" content="= width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-101-expected.txt b/LayoutTests/fast/viewport/viewport-101-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-101-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-101.html b/LayoutTests/fast/viewport/viewport-101.html
new file mode 100644
index 0000000..d5e4c5e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-101.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed ("== width=400")</title>
+ <meta name="viewport" content="== width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-102-expected.txt b/LayoutTests/fast/viewport/viewport-102-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-102-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-102.html b/LayoutTests/fast/viewport/viewport-102.html
new file mode 100644
index 0000000..a790222
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-102.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed (" = width=400")</title>
+ <meta name="viewport" content=" = width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-103-expected.txt b/LayoutTests/fast/viewport/viewport-103-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-103-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-103.html b/LayoutTests/fast/viewport/viewport-103.html
new file mode 100644
index 0000000..51dcb5f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-103.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed (" == width=400")</title>
+ <meta name="viewport" content=" == width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-104-expected.txt b/LayoutTests/fast/viewport/viewport-104-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-104-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-104.html b/LayoutTests/fast/viewport/viewport-104.html
new file mode 100644
index 0000000..f03c833
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-104.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width is value in "x= width=400"</title>
+ <meta name="viewport" content="x= width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-105-expected.txt b/LayoutTests/fast/viewport/viewport-105-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-105-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-105.html b/LayoutTests/fast/viewport/viewport-105.html
new file mode 100644
index 0000000..7fb798f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-105.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width is value in "x== width=400"</title>
+ <meta name="viewport" content="x== width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-106-expected.txt b/LayoutTests/fast/viewport/viewport-106-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-106-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-106.html b/LayoutTests/fast/viewport/viewport-106.html
new file mode 100644
index 0000000..334c265
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-106.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width is value in "x = width=400"</title>
+ <meta name="viewport" content="x = width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-107-expected.txt b/LayoutTests/fast/viewport/viewport-107-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-107-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-107.html b/LayoutTests/fast/viewport/viewport-107.html
new file mode 100644
index 0000000..6529997
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-107.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width is value in "x == width=400"</title>
+ <meta name="viewport" content="x == width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-108-expected.txt b/LayoutTests/fast/viewport/viewport-108-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-108-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-108.html b/LayoutTests/fast/viewport/viewport-108.html
new file mode 100644
index 0000000..dded0e6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-108.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed ("=x width=400")</title>
+ <meta name="viewport" content="=x width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-109-expected.txt b/LayoutTests/fast/viewport/viewport-109-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-109-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-109.html b/LayoutTests/fast/viewport/viewport-109.html
new file mode 100644
index 0000000..ce51206
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-109.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed ("==x width=400")</title>
+ <meta name="viewport" content="==x width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-11-expected.txt b/LayoutTests/fast/viewport/viewport-11-expected.txt
new file mode 100644
index 0000000..8fff83a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-11-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 0.500000]
+
diff --git a/LayoutTests/fast/viewport/viewport-11.html b/LayoutTests/fast/viewport/viewport-11.html
new file mode 100644
index 0000000..dc4b5f2
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-11.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0.5".</title>
+ <meta name="viewport" content="maximum-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-110-expected.txt b/LayoutTests/fast/viewport/viewport-110-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-110-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-110.html b/LayoutTests/fast/viewport/viewport-110.html
new file mode 100644
index 0000000..a08f0c2
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-110.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed (" =x width=400")</title>
+ <meta name="viewport" content=" =x width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-111-expected.txt b/LayoutTests/fast/viewport/viewport-111-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-111-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-111.html b/LayoutTests/fast/viewport/viewport-111.html
new file mode 100644
index 0000000..9f4d413
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-111.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property name not allowed (" ==x width=400")</title>
+ <meta name="viewport" content=" ==x width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-112-expected.txt b/LayoutTests/fast/viewport/viewport-112-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-112-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-112.html b/LayoutTests/fast/viewport/viewport-112.html
new file mode 100644
index 0000000..2dd646e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-112.html
@@ -0,0 +1,13 @@
+<head>
+ <title>'.' and ':' are not separators</title>
+ <meta name="viewport" content=".=: width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-113-expected.txt b/LayoutTests/fast/viewport/viewport-113-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-113-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-113.html b/LayoutTests/fast/viewport/viewport-113.html
new file mode 100644
index 0000000..9d7f57a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-113.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width not recognized in "=x hei og hopp width=400"</title>
+ <meta name="viewport" content="=x hei og hopp width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-114-expected.txt b/LayoutTests/fast/viewport/viewport-114-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-114-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-114.html b/LayoutTests/fast/viewport/viewport-114.html
new file mode 100644
index 0000000..9af15cb
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-114.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width not recognized in "x hei og hopp width=400"</title>
+ <meta name="viewport" content="x hei og hopp width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-115-expected.txt b/LayoutTests/fast/viewport/viewport-115-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-115-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-115.html b/LayoutTests/fast/viewport/viewport-115.html
new file mode 100644
index 0000000..7bc7566
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-115.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width recognized in "width width=400"</title>
+ <meta name="viewport" content="width width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-116-expected.txt b/LayoutTests/fast/viewport/viewport-116-expected.txt
new file mode 100644
index 0000000..ef583bc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-116-expected.txt
@@ -0,0 +1,2 @@
+viewport size 400x440 scale 0.800000 with limits [0.800000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-116.html b/LayoutTests/fast/viewport/viewport-116.html
new file mode 100644
index 0000000..c4b64ac
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-116.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width recognized in "width height=400"</title>
+ <meta name="viewport" content="width height=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-117-expected.txt b/LayoutTests/fast/viewport/viewport-117-expected.txt
new file mode 100644
index 0000000..aefe896
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-117-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x400 scale 0.880000 with limits [0.880000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-117.html b/LayoutTests/fast/viewport/viewport-117.html
new file mode 100644
index 0000000..ca3b3ad
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-117.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Height recognized in "height width=400"</title>
+ <meta name="viewport" content="height width=400">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-118-expected.txt b/LayoutTests/fast/viewport/viewport-118-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-118-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-118.html b/LayoutTests/fast/viewport/viewport-118.html
new file mode 100644
index 0000000..52a7ce5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-118.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Width recognized in "width=device-width=" because '=' is a separator</title>
+ <meta name="viewport" content="width=device-width=">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-119-expected.txt b/LayoutTests/fast/viewport/viewport-119-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-119-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-119.html b/LayoutTests/fast/viewport/viewport-119.html
new file mode 100644
index 0000000..715d0cc
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-119.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that horizontal tab is a separator space</title>
+ <meta name="viewport" content="width=	device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-12-expected.txt b/LayoutTests/fast/viewport/viewport-12-expected.txt
new file mode 100644
index 0000000..d18cac5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-12-expected.txt
@@ -0,0 +1,2 @@
+viewport size 640x704 scale 0.500000 with limits [0.500000, 0.500000]
+
diff --git a/LayoutTests/fast/viewport/viewport-12.html b/LayoutTests/fast/viewport/viewport-12.html
new file mode 100644
index 0000000..3288a4e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-12.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0.5, initial-scale=4".</title>
+ <meta name="viewport" content="maximum-scale=0.5, initial-scale=4">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-120-expected.txt b/LayoutTests/fast/viewport/viewport-120-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-120-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-120.html b/LayoutTests/fast/viewport/viewport-120.html
new file mode 100644
index 0000000..6245abf
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-120.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that line feed is a separator space</title>
+ <meta name="viewport" content="width=
device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-121-expected.txt b/LayoutTests/fast/viewport/viewport-121-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-121-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-121.html b/LayoutTests/fast/viewport/viewport-121.html
new file mode 100644
index 0000000..d02b97b
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-121.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that vertical tab is not a separator space</title>
+ <meta name="viewport" content="width=device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-122-expected.txt b/LayoutTests/fast/viewport/viewport-122-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-122-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-122.html b/LayoutTests/fast/viewport/viewport-122.html
new file mode 100644
index 0000000..ec15222
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-122.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that form feed is not a separator space</title>
+ <meta name="viewport" content="width=device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-123-expected.txt b/LayoutTests/fast/viewport/viewport-123-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-123-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-123.html b/LayoutTests/fast/viewport/viewport-123.html
new file mode 100644
index 0000000..d678a30
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-123.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that carriage return is a separator space</title>
+ <meta name="viewport" content="width=
device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-124-expected.txt b/LayoutTests/fast/viewport/viewport-124-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-124-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-124.html b/LayoutTests/fast/viewport/viewport-124.html
new file mode 100644
index 0000000..7258389
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-124.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that the space entity is a separator</title>
+ <meta name="viewport" content="width= device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-125-expected.txt b/LayoutTests/fast/viewport/viewport-125-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-125-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-125.html b/LayoutTests/fast/viewport/viewport-125.html
new file mode 100644
index 0000000..af4e460
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-125.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that EM SPACE is not a separator space</title>
+ <meta name="viewport" content="width= device-width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-126.html b/LayoutTests/fast/viewport/viewport-126.html
new file mode 100644
index 0000000..8649bff
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-126.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Just a property name is dropped</title>
+ <meta name="viewport" content="width">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-127.html b/LayoutTests/fast/viewport/viewport-127.html
new file mode 100644
index 0000000..42f7b82
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-127.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Empty property value is dropped</title>
+ <meta name="viewport" content="width=">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-13-expected.txt b/LayoutTests/fast/viewport/viewport-13-expected.txt
new file mode 100644
index 0000000..be5ed3d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-13-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 0.500000]
+
diff --git a/LayoutTests/fast/viewport/viewport-13.html b/LayoutTests/fast/viewport/viewport-13.html
new file mode 100644
index 0000000..ee14717
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-13.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0.5, initial-scale=0.2".</title>
+ <meta name="viewport" content="maximum-scale=0.5, initial-scale=0.2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-14-expected.txt b/LayoutTests/fast/viewport/viewport-14-expected.txt
new file mode 100644
index 0000000..97a9b9a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-14-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 1.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-14.html b/LayoutTests/fast/viewport/viewport-14.html
new file mode 100644
index 0000000..b6a8608
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-14.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=1, initial-scale=2".</title>
+ <meta name="viewport" content="maximum-scale=1, initial-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-15-expected.txt b/LayoutTests/fast/viewport/viewport-15-expected.txt
new file mode 100644
index 0000000..aed900d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-15-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-15.html b/LayoutTests/fast/viewport/viewport-15.html
new file mode 100644
index 0000000..a27b060
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-15.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=1".</title>
+ <meta name="viewport" content="minimum-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-16-expected.txt b/LayoutTests/fast/viewport/viewport-16-expected.txt
new file mode 100644
index 0000000..bff009a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-16-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-16.html b/LayoutTests/fast/viewport/viewport-16.html
new file mode 100644
index 0000000..c8261b5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-16.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=8".</title>
+ <meta name="viewport" content="minimum-scale=8">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-17-expected.txt b/LayoutTests/fast/viewport/viewport-17-expected.txt
new file mode 100644
index 0000000..bff009a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-17-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-17.html b/LayoutTests/fast/viewport/viewport-17.html
new file mode 100644
index 0000000..c781ca1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-17.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=10".</title>
+ <meta name="viewport" content="minimum-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-18-expected.txt b/LayoutTests/fast/viewport/viewport-18-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-18-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-18.html b/LayoutTests/fast/viewport/viewport-18.html
new file mode 100644
index 0000000..0037c99
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-18.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=8, initial-scale=6".</title>
+ <meta name="viewport" content="minimum-scale=8, initial-scale=6">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-19-expected.txt b/LayoutTests/fast/viewport/viewport-19-expected.txt
new file mode 100644
index 0000000..ef09503
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-19-expected.txt
@@ -0,0 +1,2 @@
+viewport size 160x176 scale 2.000000 with limits [2.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-19.html b/LayoutTests/fast/viewport/viewport-19.html
new file mode 100644
index 0000000..129ffc7
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-19.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "initial-scale=1, minimum-scale=2".</title>
+ <meta name="viewport" content="initial-scale=1, minimum-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-2-expected.txt b/LayoutTests/fast/viewport/viewport-2-expected.txt
new file mode 100644
index 0000000..5800874
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-2-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x480 scale 0.733333 with limits [0.733333, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-2.html b/LayoutTests/fast/viewport/viewport-2.html
new file mode 100644
index 0000000..c591a7f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-2.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport Meta with "height=device-height".</title>
+ <meta name="viewport" content="height=device-height">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-20-expected.txt b/LayoutTests/fast/viewport/viewport-20-expected.txt
new file mode 100644
index 0000000..677ed69
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-20-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-20.html b/LayoutTests/fast/viewport/viewport-20.html
new file mode 100644
index 0000000..68d84bf
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-20.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=10, maximum-scale=0.1".</title>
+ <meta name="viewport" content="minimum-scale=10, maximum-scale=0.1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-21-expected.txt b/LayoutTests/fast/viewport/viewport-21-expected.txt
new file mode 100644
index 0000000..677ed69
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-21-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-21.html b/LayoutTests/fast/viewport/viewport-21.html
new file mode 100644
index 0000000..a5495f6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-21.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0.1, minimum-scale=10".</title>
+ <meta name="viewport" content="maximum-scale=0.1, minimum-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-22-expected.txt b/LayoutTests/fast/viewport/viewport-22-expected.txt
new file mode 100644
index 0000000..677ed69
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-22-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-22.html b/LayoutTests/fast/viewport/viewport-22.html
new file mode 100644
index 0000000..5e11d4e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-22.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=10, maximum-scale=1".</title>
+ <meta name="viewport" content="minimum-scale=10, maximum-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-23-expected.txt b/LayoutTests/fast/viewport/viewport-23-expected.txt
new file mode 100644
index 0000000..74a5284
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-23-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 3.000000 with limits [3.000000, 3.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-23.html b/LayoutTests/fast/viewport/viewport-23.html
new file mode 100644
index 0000000..799b710
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-23.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=3, maximum-scale=2".</title>
+ <meta name="viewport" content="minimum-scale=3, maximum-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-24-expected.txt b/LayoutTests/fast/viewport/viewport-24-expected.txt
new file mode 100644
index 0000000..f28cba1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-24-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 4.000000 with limits [4.000000, 4.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-24.html b/LayoutTests/fast/viewport/viewport-24.html
new file mode 100644
index 0000000..f5cad72
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-24.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=3, minimum-scale=4".</title>
+ <meta name="viewport" content="maximum-scale=3, minimum-scale=4">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-25-expected.txt b/LayoutTests/fast/viewport/viewport-25-expected.txt
new file mode 100644
index 0000000..677ed69
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-25-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-25.html b/LayoutTests/fast/viewport/viewport-25.html
new file mode 100644
index 0000000..500e9e8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-25.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=10, minimum-scale=10".</title>
+ <meta name="viewport" content="maximum-scale=10, minimum-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-26-expected.txt b/LayoutTests/fast/viewport/viewport-26-expected.txt
new file mode 100644
index 0000000..29c0f5a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-26-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 8.000000 with limits [8.000000, 9.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-26.html b/LayoutTests/fast/viewport/viewport-26.html
new file mode 100644
index 0000000..b06be13
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-26.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=8, maximum-scale=9".</title>
+ <meta name="viewport" content="minimum-scale=8, maximum-scale=9">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-27-expected.txt b/LayoutTests/fast/viewport/viewport-27-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-27-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-27.html b/LayoutTests/fast/viewport/viewport-27.html
new file mode 100644
index 0000000..b66a5f1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-27.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with empty content ("").</title>
+ <meta name="viewport" content="">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-28-expected.txt b/LayoutTests/fast/viewport/viewport-28-expected.txt
new file mode 100644
index 0000000..c9c6079
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-28-expected.txt
@@ -0,0 +1,2 @@
+viewport size 480x528 scale 0.666667 with limits [0.666667, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-28.html b/LayoutTests/fast/viewport/viewport-28.html
new file mode 100644
index 0000000..dfe1a1d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-28.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=device-height".</title>
+ <meta name="viewport" content="width=device-height">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-29-expected.txt b/LayoutTests/fast/viewport/viewport-29-expected.txt
new file mode 100644
index 0000000..9ed9e8d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-29-expected.txt
@@ -0,0 +1,2 @@
+viewport size 700x770 scale 0.457143 with limits [0.457143, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-29.html b/LayoutTests/fast/viewport/viewport-29.html
new file mode 100644
index 0000000..77760d8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-29.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=700".</title>
+ <meta name="viewport" content="width=700">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-3-expected.txt b/LayoutTests/fast/viewport/viewport-3-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-3-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-3.html b/LayoutTests/fast/viewport/viewport-3.html
new file mode 100644
index 0000000..4d7b0fa
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-3.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "initial-scale=1.0".</title>
+ <meta name="viewport" content="initial-scale=1.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-30-expected.txt b/LayoutTests/fast/viewport/viewport-30-expected.txt
new file mode 100644
index 0000000..577dd7c
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-30-expected.txt
@@ -0,0 +1,2 @@
+viewport size 200x220 scale 1.600000 with limits [1.600000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-30.html b/LayoutTests/fast/viewport/viewport-30.html
new file mode 100644
index 0000000..5398810
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-30.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=200".</title>
+ <meta name="viewport" content="width=200">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-31-expected.txt b/LayoutTests/fast/viewport/viewport-31-expected.txt
new file mode 100644
index 0000000..055c335
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-31-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x700 scale 0.502857 with limits [0.502857, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-31.html b/LayoutTests/fast/viewport/viewport-31.html
new file mode 100644
index 0000000..4aa3fda
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-31.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "height=700".</title>
+ <meta name="viewport" content="height=700">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-32-expected.txt b/LayoutTests/fast/viewport/viewport-32-expected.txt
new file mode 100644
index 0000000..6afaa00
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-32-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x200 scale 1.760000 with limits [1.760000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-32.html b/LayoutTests/fast/viewport/viewport-32.html
new file mode 100644
index 0000000..8c1cc22
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-32.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "height=200".</title>
+ <meta name="viewport" content="height=200">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-33-expected.txt b/LayoutTests/fast/viewport/viewport-33-expected.txt
new file mode 100644
index 0000000..dbc4620
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-33-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 2.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-33.html b/LayoutTests/fast/viewport/viewport-33.html
new file mode 100644
index 0000000..3a27f1c
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-33.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=device-width, initial-scale=2".</title>
+ <meta name="viewport" content="width=device-width, initial-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-34-expected.txt b/LayoutTests/fast/viewport/viewport-34-expected.txt
new file mode 100644
index 0000000..b04e104
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-34-expected.txt
@@ -0,0 +1,2 @@
+viewport size 640x704 scale 0.500000 with limits [0.500000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-34.html b/LayoutTests/fast/viewport/viewport-34.html
new file mode 100644
index 0000000..7525480
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-34.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=device-width, initial-scale=0.5".</title>
+ <meta name="viewport" content="width=device-width, initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-35-expected.txt b/LayoutTests/fast/viewport/viewport-35-expected.txt
new file mode 100644
index 0000000..c4020c1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-35-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-35.html b/LayoutTests/fast/viewport/viewport-35.html
new file mode 100644
index 0000000..b09b713
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-35.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=480, initial-scale=0.1".</title>
+ <meta name="viewport" content="width=480, initial-scale=0.1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-36-expected.txt b/LayoutTests/fast/viewport/viewport-36-expected.txt
new file mode 100644
index 0000000..4284f99
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-36-expected.txt
@@ -0,0 +1,2 @@
+viewport size 636x700 scale 1.600000 with limits [0.502857, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-36.html b/LayoutTests/fast/viewport/viewport-36.html
new file mode 100644
index 0000000..263d93e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-36.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "height=700, initial-scale=1.6".</title>
+ <meta name="viewport" content="height=700, initial-scale=1.6">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-37-expected.txt b/LayoutTests/fast/viewport/viewport-37-expected.txt
new file mode 100644
index 0000000..ddf3cce
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-37-expected.txt
@@ -0,0 +1,2 @@
+viewport size 436x480 scale 1.000000 with limits [0.733333, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-37.html b/LayoutTests/fast/viewport/viewport-37.html
new file mode 100644
index 0000000..d500821
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-37.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "height=device-height, initial-scale=1".</title>
+ <meta name="viewport" content="height=device-height, initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-38-expected.txt b/LayoutTests/fast/viewport/viewport-38-expected.txt
new file mode 100644
index 0000000..b04e104
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-38-expected.txt
@@ -0,0 +1,2 @@
+viewport size 640x704 scale 0.500000 with limits [0.500000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-38.html b/LayoutTests/fast/viewport/viewport-38.html
new file mode 100644
index 0000000..36ca681
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-38.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "height=200, initial-scale=0.5".</title>
+ <meta name="viewport" content="height=200, initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-39-expected.txt b/LayoutTests/fast/viewport/viewport-39-expected.txt
new file mode 100644
index 0000000..6884733
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-39-expected.txt
@@ -0,0 +1,2 @@
+viewport size 200x700 scale 1.600000 with limits [1.600000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-39.html b/LayoutTests/fast/viewport/viewport-39.html
new file mode 100644
index 0000000..6a9a7ad
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-39.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=200, height=700".</title>
+ <meta name="viewport" content="width=200, height=700">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-4-expected.txt b/LayoutTests/fast/viewport/viewport-4-expected.txt
new file mode 100644
index 0000000..ef09503
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-4-expected.txt
@@ -0,0 +1,2 @@
+viewport size 160x176 scale 2.000000 with limits [2.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-4.html b/LayoutTests/fast/viewport/viewport-4.html
new file mode 100644
index 0000000..6344677
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-4.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "initial-scale=2.0".</title>
+ <meta name="viewport" content="initial-scale=2.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-40-expected.txt b/LayoutTests/fast/viewport/viewport-40-expected.txt
new file mode 100644
index 0000000..fdf5937
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-40-expected.txt
@@ -0,0 +1,2 @@
+viewport size 700x480 scale 0.733333 with limits [0.733333, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-40.html b/LayoutTests/fast/viewport/viewport-40.html
new file mode 100644
index 0000000..0d006e6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-40.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=700, height=device-height".</title>
+ <meta name="viewport" content="width=700, height=device-height">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-41-expected.txt b/LayoutTests/fast/viewport/viewport-41-expected.txt
new file mode 100644
index 0000000..67b377a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-41-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1000x704 scale 0.500000 with limits [0.500000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-41.html b/LayoutTests/fast/viewport/viewport-41.html
new file mode 100644
index 0000000..7f27b7d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-41.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=1000, height=device-height, initial-scale=0.5".</title>
+ <meta name="viewport" content="width=1000, height=device-height, initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-42-expected.txt b/LayoutTests/fast/viewport/viewport-42-expected.txt
new file mode 100644
index 0000000..6f188c6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-42-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x1000 scale 2.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-42.html b/LayoutTests/fast/viewport/viewport-42.html
new file mode 100644
index 0000000..1a4ecad
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-42.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=device-width, height=1000, initial-scale=2".</title>
+ <meta name="viewport" content="width=device-width, height=1000, initial-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-43-expected.txt b/LayoutTests/fast/viewport/viewport-43-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-43-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-43.html b/LayoutTests/fast/viewport/viewport-43.html
new file mode 100644
index 0000000..96ce135
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-43.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=0".</title>
+ <meta name="viewport" content="width=0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-44-expected.txt b/LayoutTests/fast/viewport/viewport-44-expected.txt
new file mode 100644
index 0000000..983bfd5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-44-expected.txt
@@ -0,0 +1,2 @@
+viewport size 10000x10000 scale 0.250000 with limits [0.250000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-44.html b/LayoutTests/fast/viewport/viewport-44.html
new file mode 100644
index 0000000..c93810b
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-44.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "width=15000, height=20000".</title>
+ <meta name="viewport" content="width=15000, height=20000">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-45-expected.txt b/LayoutTests/fast/viewport/viewport-45-expected.txt
new file mode 100644
index 0000000..241cf09
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-45-expected.txt
@@ -0,0 +1,2 @@
+viewport size 3200x3520 scale 0.100000 with limits [0.100000, 0.100000]
+
diff --git a/LayoutTests/fast/viewport/viewport-45.html b/LayoutTests/fast/viewport/viewport-45.html
new file mode 100644
index 0000000..fa80e02
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-45.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=0, maximum-scale=0".</title>
+ <meta name="viewport" content="minimum-scale=0, maximum-scale=0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-46-expected.txt b/LayoutTests/fast/viewport/viewport-46-expected.txt
new file mode 100644
index 0000000..ef2358a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-46-expected.txt
@@ -0,0 +1,2 @@
+viewport size 32x35 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-46.html b/LayoutTests/fast/viewport/viewport-46.html
new file mode 100644
index 0000000..8a0f267
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-46.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "minimum-scale=11, maximum-scale=13, initial-scale=12".</title>
+ <meta name="viewport" content="minimum-scale=11, maximum-scale=13, initial-scale=12">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-47-expected.txt b/LayoutTests/fast/viewport/viewport-47-expected.txt
new file mode 100644
index 0000000..d1bd037
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-47-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x3000 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-47.html b/LayoutTests/fast/viewport/viewport-47.html
new file mode 100644
index 0000000..a0794d8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-47.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that width is increased to fill the visual viewport.</title>
+ <meta name="viewport" content="width=10, height=3000, initial-scale=1.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-48-expected.txt b/LayoutTests/fast/viewport/viewport-48-expected.txt
new file mode 100644
index 0000000..34b0f6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-48-expected.txt
@@ -0,0 +1,2 @@
+viewport size 3000x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-48.html b/LayoutTests/fast/viewport/viewport-48.html
new file mode 100644
index 0000000..b2e5a13
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-48.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that height is increased to fill the visual viewport.</title>
+ <meta name="viewport" content="width=3000, height=10, initial-scale=1.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-49-expected.txt b/LayoutTests/fast/viewport/viewport-49-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-49-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-49.html b/LayoutTests/fast/viewport/viewport-49.html
new file mode 100644
index 0000000..0754f61
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-49.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that both width and height are increased to fill the visual viewport.</title>
+ <meta name="viewport" content="width=10, height=10, initial-scale=1.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-5-expected.txt b/LayoutTests/fast/viewport/viewport-5-expected.txt
new file mode 100644
index 0000000..b04e104
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-5-expected.txt
@@ -0,0 +1,2 @@
+viewport size 640x704 scale 0.500000 with limits [0.500000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-5.html b/LayoutTests/fast/viewport/viewport-5.html
new file mode 100644
index 0000000..c3c808e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-5.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "initial-scale=0.5".</title>
+ <meta name="viewport" content="initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-50-expected.txt b/LayoutTests/fast/viewport/viewport-50-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-50-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-50.html b/LayoutTests/fast/viewport/viewport-50.html
new file mode 100644
index 0000000..66e8c39
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-50.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that negative width is translated to auto.</title>
+ <meta name="viewport" content="width=-100">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-51-expected.txt b/LayoutTests/fast/viewport/viewport-51-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-51-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-51.html b/LayoutTests/fast/viewport/viewport-51.html
new file mode 100644
index 0000000..f05987d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-51.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that negative height is translated to auto.</title>
+ <meta name="viewport" content="height=-1.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-52-expected.txt b/LayoutTests/fast/viewport/viewport-52-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-52-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-52.html b/LayoutTests/fast/viewport/viewport-52.html
new file mode 100644
index 0000000..fb942bb
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-52.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that unrecognized keyword translate to 0 for width.</title>
+ <meta name="viewport" content="width=garbage">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-53-expected.txt b/LayoutTests/fast/viewport/viewport-53-expected.txt
new file mode 100644
index 0000000..99cef45
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-53-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-53.html b/LayoutTests/fast/viewport/viewport-53.html
new file mode 100644
index 0000000..4e83067
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-53.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that unrecognized keyword translate to 0 for height.</title>
+ <meta name="viewport" content="height=y20">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-54-expected.txt b/LayoutTests/fast/viewport/viewport-54-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-54-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-54.html b/LayoutTests/fast/viewport/viewport-54.html
new file mode 100644
index 0000000..24f909a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-54.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that ';' is included in keyword</title>
+ <meta name="viewport" content="width=device-width;">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-55-expected.txt b/LayoutTests/fast/viewport/viewport-55-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-55-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-55.html b/LayoutTests/fast/viewport/viewport-55.html
new file mode 100644
index 0000000..9d46bd8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-55.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that 'yes' and 'no' translate to 0 for width/height.</title>
+ <meta name="viewport" content="width=yes, height=no">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-56-expected.txt b/LayoutTests/fast/viewport/viewport-56-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-56-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-56.html b/LayoutTests/fast/viewport/viewport-56.html
new file mode 100644
index 0000000..019a575
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-56.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that negative initial-scale is auto.</title>
+ <meta name="viewport" content="initial-scale=-1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-57-expected.txt b/LayoutTests/fast/viewport/viewport-57-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-57-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-57.html b/LayoutTests/fast/viewport/viewport-57.html
new file mode 100644
index 0000000..032e832
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-57.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that initial-scale=yes is 1.0.</title>
+ <meta name="viewport" content="initial-scale=yes">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-58-expected.txt b/LayoutTests/fast/viewport/viewport-58-expected.txt
new file mode 100644
index 0000000..27b39b4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-58-expected.txt
@@ -0,0 +1,2 @@
+viewport size 3200x3520 scale 0.100000 with limits [0.100000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-58.html b/LayoutTests/fast/viewport/viewport-58.html
new file mode 100644
index 0000000..e57009a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-58.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that minimum-scale=no is 0.</title>
+ <meta name="viewport" content="minimum-scale=no, initial-scale=0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-59-expected.txt b/LayoutTests/fast/viewport/viewport-59-expected.txt
new file mode 100644
index 0000000..97a9b9a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-59-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 1.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-59.html b/LayoutTests/fast/viewport/viewport-59.html
new file mode 100644
index 0000000..02fce83
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-59.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that maximum-scale=yes is 1.</title>
+ <meta name="viewport" content="maximum-scale=yes, initial-scale=2">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-6-expected.txt b/LayoutTests/fast/viewport/viewport-6-expected.txt
new file mode 100644
index 0000000..577dd7c
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-6-expected.txt
@@ -0,0 +1,2 @@
+viewport size 200x220 scale 1.600000 with limits [1.600000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-6.html b/LayoutTests/fast/viewport/viewport-6.html
new file mode 100644
index 0000000..100fb16
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-6.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "initial-scale=1.6".</title>
+ <meta name="viewport" content="initial-scale=1.6">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-60-expected.txt b/LayoutTests/fast/viewport/viewport-60-expected.txt
new file mode 100644
index 0000000..ef2358a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-60-expected.txt
@@ -0,0 +1,2 @@
+viewport size 32x35 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-60.html b/LayoutTests/fast/viewport/viewport-60.html
new file mode 100644
index 0000000..430a2f8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-60.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that maximum-scale=device-height is 10.</title>
+ <meta name="viewport" content="maximum-scale=device-height, initial-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-61-expected.txt b/LayoutTests/fast/viewport/viewport-61-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-61-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-61.html b/LayoutTests/fast/viewport/viewport-61.html
new file mode 100644
index 0000000..8aae52a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-61.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that space is a valid separator.</title>
+ <meta name="viewport" content="width=100 initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-62-expected.txt b/LayoutTests/fast/viewport/viewport-62-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-62-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-62.html b/LayoutTests/fast/viewport/viewport-62.html
new file mode 100644
index 0000000..baead5a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-62.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that comma is a valid separator.</title>
+ <meta name="viewport" content="width=100,initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-63-expected.txt b/LayoutTests/fast/viewport/viewport-63-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-63-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-63.html b/LayoutTests/fast/viewport/viewport-63.html
new file mode 100644
index 0000000..6e312b1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-63.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that comma is a valid separator (space before).</title>
+ <meta name="viewport" content="width=100 ,initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-64-expected.txt b/LayoutTests/fast/viewport/viewport-64-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-64-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-64.html b/LayoutTests/fast/viewport/viewport-64.html
new file mode 100644
index 0000000..5694713
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-64.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that comma is a valid separator (space after).</title>
+ <meta name="viewport" content="width=100, initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-65.html b/LayoutTests/fast/viewport/viewport-65.html
new file mode 100644
index 0000000..fcd4b42
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-65.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that semi-colon is not a valid separator (no spaces).</title>
+ <meta name="viewport" content="width=100;initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-66-expected.txt b/LayoutTests/fast/viewport/viewport-66-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-66-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-66.html b/LayoutTests/fast/viewport/viewport-66.html
new file mode 100644
index 0000000..ddaa016
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-66.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that semi-colon is not a valid separator (space before).</title>
+ <meta name="viewport" content="width=100 ;initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-67-expected.txt b/LayoutTests/fast/viewport/viewport-67-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-67-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-67.html b/LayoutTests/fast/viewport/viewport-67.html
new file mode 100644
index 0000000..94e33e2
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-67.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that semi-colon after number is ignored and space acts as a valid separator.</title>
+ <meta name="viewport" content="width=100; initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-68-expected.txt b/LayoutTests/fast/viewport/viewport-68-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-68-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-68.html b/LayoutTests/fast/viewport/viewport-68.html
new file mode 100644
index 0000000..6a8ae87
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-68.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that alpha character after number is ignored and space acts as a valid separator.</title>
+ <meta name="viewport" content="width=100x initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-69-expected.txt b/LayoutTests/fast/viewport/viewport-69-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-69-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-69.html b/LayoutTests/fast/viewport/viewport-69.html
new file mode 100644
index 0000000..b500f5a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-69.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that xinitial-scale property is dropped after space.</title>
+ <meta name="viewport" content="width=100 xinitial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-7-expected.txt b/LayoutTests/fast/viewport/viewport-7-expected.txt
new file mode 100644
index 0000000..29a2ba8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-7-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 0.250000]
+
diff --git a/LayoutTests/fast/viewport/viewport-7.html b/LayoutTests/fast/viewport/viewport-7.html
new file mode 100644
index 0000000..7a786b5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-7.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0.0".</title>
+ <meta name="viewport" content="maximum-scale=0.0">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-70-expected.txt b/LayoutTests/fast/viewport/viewport-70-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-70-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-70.html b/LayoutTests/fast/viewport/viewport-70.html
new file mode 100644
index 0000000..3c6f06c
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-70.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that property name without a value does not cause synchronization on following space.</title>
+ <meta name="viewport" content="width=100 x initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-71-expected.txt b/LayoutTests/fast/viewport/viewport-71-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-71-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-71.html b/LayoutTests/fast/viewport/viewport-71.html
new file mode 100644
index 0000000..54b1ef4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-71.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that a comma forces synchronization after property name with no value.</title>
+ <meta name="viewport" content="width=100 x,initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-72-expected.txt b/LayoutTests/fast/viewport/viewport-72-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-72-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-72.html b/LayoutTests/fast/viewport/viewport-72.html
new file mode 100644
index 0000000..d2a1d7e
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-72.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Check that property name without a value does not cause synchronization on following semi-colon.</title>
+ <meta name="viewport" content="width=100 x;initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-73-expected.txt b/LayoutTests/fast/viewport/viewport-73-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-73-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-73.html b/LayoutTests/fast/viewport/viewport-73.html
new file mode 100644
index 0000000..db65f92
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-73.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Semi-colon is part of the property name, space is not enough for synchronization.</title>
+ <meta name="viewport" content="width=100 x; initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-74-expected.txt b/LayoutTests/fast/viewport/viewport-74-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-74-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-74.html b/LayoutTests/fast/viewport/viewport-74.html
new file mode 100644
index 0000000..c042a17
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-74.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Semi-colon is part of the property name, multiple spaces are not enough for synchronization.</title>
+ <meta name="viewport" content="width=100 x; initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-75-expected.txt b/LayoutTests/fast/viewport/viewport-75-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-75-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-75.html b/LayoutTests/fast/viewport/viewport-75.html
new file mode 100644
index 0000000..b9e92e7
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-75.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Equals sign for the property starting with "x;". initial-scale is recognized, maximum-scale is not.</title>
+ <meta name="viewport" content="width=10 x; maximum-scale=10 initial-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-76-expected.txt b/LayoutTests/fast/viewport/viewport-76-expected.txt
new file mode 100644
index 0000000..ef2358a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-76-expected.txt
@@ -0,0 +1,2 @@
+viewport size 32x35 scale 10.000000 with limits [10.000000, 10.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-76.html b/LayoutTests/fast/viewport/viewport-76.html
new file mode 100644
index 0000000..0a245c9
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-76.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Three properties with values separated by spaces.</title>
+ <meta name="viewport" content="width=10 maximum-scale=10 initial-scale=10">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-77-expected.txt b/LayoutTests/fast/viewport/viewport-77-expected.txt
new file mode 100644
index 0000000..c4020c1
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-77-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-77.html b/LayoutTests/fast/viewport/viewport-77.html
new file mode 100644
index 0000000..f6194d5
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-77.html
@@ -0,0 +1,13 @@
+<head>
+ <title>"yes;" means "no".</title>
+ <meta name="viewport" content="width=10 ;,initial-scale=yes;">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-78-expected.txt b/LayoutTests/fast/viewport/viewport-78-expected.txt
new file mode 100644
index 0000000..055f843
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-78-expected.txt
@@ -0,0 +1,2 @@
+viewport size 100x110 scale 3.200000 with limits [3.200000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-78.html b/LayoutTests/fast/viewport/viewport-78.html
new file mode 100644
index 0000000..97e9e1f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-78.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Space is consumed before property value.</title>
+ <meta name="viewport" content="width=100 a= initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-79-expected.txt b/LayoutTests/fast/viewport/viewport-79-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-79-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-79.html b/LayoutTests/fast/viewport/viewport-79.html
new file mode 100644
index 0000000..59a7576
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-79.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Semi-colon is recognized as a property value.</title>
+ <meta name="viewport" content="width=100 a=; initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-8-expected.txt b/LayoutTests/fast/viewport/viewport-8-expected.txt
new file mode 100644
index 0000000..29a2ba8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-8-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 0.250000]
+
diff --git a/LayoutTests/fast/viewport/viewport-8.html b/LayoutTests/fast/viewport/viewport-8.html
new file mode 100644
index 0000000..861f6f0
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-8.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0, initial-scale=0.5".</title>
+ <meta name="viewport" content="maximum-scale=0, initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-80-expected.txt b/LayoutTests/fast/viewport/viewport-80-expected.txt
new file mode 100644
index 0000000..50da948
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-80-expected.txt
@@ -0,0 +1,2 @@
+viewport size 320x352 scale 1.000000 with limits [1.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-80.html b/LayoutTests/fast/viewport/viewport-80.html
new file mode 100644
index 0000000..6098241
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-80.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Multiple commas allowed.</title>
+ <meta name="viewport" content="width=100,,,initial-scale=1">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-81-expected.txt b/LayoutTests/fast/viewport/viewport-81-expected.txt
new file mode 100644
index 0000000..90bb438
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-81-expected.txt
@@ -0,0 +1,2 @@
+viewport size 3000x3300 scale 0.250000 with limits [0.250000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-81.html b/LayoutTests/fast/viewport/viewport-81.html
new file mode 100644
index 0000000..c7743a6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-81.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Multiple equals-signs are accepted.</title>
+ <meta name="viewport" content="width====3000">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-82.html b/LayoutTests/fast/viewport/viewport-82.html
new file mode 100644
index 0000000..1e8256d
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-82.html
@@ -0,0 +1,13 @@
+<head>
+ <title>width=400% gives 400 pixels.</title>
+ <meta name="viewport" content="width=400%">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-83-expected.txt b/LayoutTests/fast/viewport/viewport-83-expected.txt
new file mode 100644
index 0000000..7ced1d4
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-83-expected.txt
@@ -0,0 +1,2 @@
+viewport size 64x70 scale 5.000000 with limits [5.000000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-83.html b/LayoutTests/fast/viewport/viewport-83.html
new file mode 100644
index 0000000..8107d81
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-83.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Value can contain equals sign.</title>
+ <meta name="viewport" content="width=height=830">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-84.html b/LayoutTests/fast/viewport/viewport-84.html
new file mode 100644
index 0000000..cda8c48
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-84.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Comma separator terminates empty value.</title>
+ <meta name="viewport" content="width=,height=480">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-85-expected.txt b/LayoutTests/fast/viewport/viewport-85-expected.txt
new file mode 100644
index 0000000..cdf93bb
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-85-expected.txt
@@ -0,0 +1,2 @@
+viewport size 540x594 scale 0.592593 with limits [0.592593, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-85.html b/LayoutTests/fast/viewport/viewport-85.html
new file mode 100644
index 0000000..04e9a7a
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-85.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Space can occur before and after assignment operator</title>
+ <meta name="viewport" content="width = 540">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-86-expected.txt b/LayoutTests/fast/viewport/viewport-86-expected.txt
new file mode 100644
index 0000000..1f009f6
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-86-expected.txt
@@ -0,0 +1,2 @@
+viewport size 457x502 scale 0.700000 with limits [0.700000, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-86.html b/LayoutTests/fast/viewport/viewport-86.html
new file mode 100644
index 0000000..7842ec0
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-86.html
@@ -0,0 +1,13 @@
+<head>
+ <title>.7 is a valid initial-scale</title>
+ <meta name="viewport" content="initial-scale=.7">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-87.html b/LayoutTests/fast/viewport/viewport-87.html
new file mode 100644
index 0000000..363d102
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-87.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Space is not an assignment operator</title>
+ <meta name="viewport" content="width 500">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-88-expected.txt b/LayoutTests/fast/viewport/viewport-88-expected.txt
new file mode 100644
index 0000000..fc4bb6f
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-88-expected.txt
@@ -0,0 +1,2 @@
+viewport size 980x1078 scale 0.326531 with limits [0.326531, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-88.html b/LayoutTests/fast/viewport/viewport-88.html
new file mode 100644
index 0000000..67419fa
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-88.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Colon is not an assignment operator</title>
+ <meta name="viewport" content="width:680">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-9-expected.txt b/LayoutTests/fast/viewport/viewport-9-expected.txt
new file mode 100644
index 0000000..29a2ba8
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-9-expected.txt
@@ -0,0 +1,2 @@
+viewport size 1280x1408 scale 0.250000 with limits [0.250000, 0.250000]
+
diff --git a/LayoutTests/fast/viewport/viewport-9.html b/LayoutTests/fast/viewport/viewport-9.html
new file mode 100644
index 0000000..905f95b
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-9.html
@@ -0,0 +1,13 @@
+<head>
+ <title>Viewport META with "maximum-scale=0, initial-scale=3".</title>
+ <meta name="viewport" content="maximum-scale=0, initial-scale=3">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
diff --git a/LayoutTests/fast/viewport/viewport-90-expected.txt b/LayoutTests/fast/viewport/viewport-90-expected.txt
new file mode 100644
index 0000000..d6a4519
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-90-expected.txt
@@ -0,0 +1,2 @@
+viewport size 700x770 scale 0.500000 with limits [0.457143, 5.000000]
+
diff --git a/LayoutTests/fast/viewport/viewport-90.html b/LayoutTests/fast/viewport/viewport-90.html
new file mode 100644
index 0000000..5f39572
--- /dev/null
+++ b/LayoutTests/fast/viewport/viewport-90.html
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
+ "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>XHTML Mobile Profile 1.0 document with viewport meta</title>
+ <meta name="viewport" content="width=700, initial-scale=0.5">
+ <script>
+ function test() {
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.dumpConfigurationForViewport(320, 352);
+ }
+ }
+ </script>
+</head>
+<body onload="test();">
+</body>
+</html>
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 98ec4f3..b3ad420 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5957,3 +5957,6 @@ canvas/philip/tests/2d.path.isPointInPath.edge.html
# The version of GLib on the Debug bots appears to be
# broken ATM causing most websocket tests to fail.
websocket/tests
+
+# viewport meta tag support
+fast/viewport
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index ee63083..b8ca528 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -307,3 +307,6 @@ fast/files/apply-blob-url-to-img.html
# Crash due to r66850.
# https://bugs.webkit.org/show_bug.cgi?id=45575
fast/files/workers
+
+# viewport meta tag support
+fast/viewport
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index fe30484..3fc518a 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5439,3 +5439,11 @@ fast/text/decomposed-after-stacked-diacritics.html
# Fixed in Qt 4.7.1 - Unskip when buildbot is upgraded.
fast/canvas/canvas-closePath-single-point.html
+
+# viewport meta tag tests that differ from the Opera results
+fast/viewport/viewport-65.html
+fast/viewport/viewport-82.html
+fast/viewport/viewport-84.html
+fast/viewport/viewport-87.html
+fast/viewport/viewport-126.html
+fast/viewport/viewport-127.html
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index a1c38ee..a461667 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -977,3 +977,6 @@ svg/batik/paints/patternRegions-positioned-objects.svg
# Full Screen support is not yet enabled.
fullscreen/
+
+# viewport meta tag support
+fast/viewport
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 9ded099..64be38e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,145 @@
+2010-08-27 Kenneth Rohde Christiansen <kenneth at webkit.org>
+
+ Reviewed by Antti Koivisto.
+
+ Update support for the viewport meta tag algorithm, to
+ match the following draft spec:
+
+ http://people.opera.com/rune/TR/ED-css-viewport-20100806/
+
+ Add common handling of viewport meta tag based on new Opera spec
+ https://bugs.webkit.org/show_bug.cgi?id=44201
+
+ Tests: fast/viewport/viewport-1.html
+ fast/viewport/viewport-10.html
+ fast/viewport/viewport-100.html
+ fast/viewport/viewport-101.html
+ fast/viewport/viewport-102.html
+ fast/viewport/viewport-103.html
+ fast/viewport/viewport-104.html
+ fast/viewport/viewport-105.html
+ fast/viewport/viewport-106.html
+ fast/viewport/viewport-107.html
+ fast/viewport/viewport-108.html
+ fast/viewport/viewport-109.html
+ fast/viewport/viewport-11.html
+ fast/viewport/viewport-110.html
+ fast/viewport/viewport-111.html
+ fast/viewport/viewport-112.html
+ fast/viewport/viewport-113.html
+ fast/viewport/viewport-114.html
+ fast/viewport/viewport-115.html
+ fast/viewport/viewport-116.html
+ fast/viewport/viewport-117.html
+ fast/viewport/viewport-118.html
+ fast/viewport/viewport-119.html
+ fast/viewport/viewport-12.html
+ fast/viewport/viewport-120.html
+ fast/viewport/viewport-121.html
+ fast/viewport/viewport-122.html
+ fast/viewport/viewport-123.html
+ fast/viewport/viewport-124.html
+ fast/viewport/viewport-125.html
+ fast/viewport/viewport-126.html
+ fast/viewport/viewport-127.html
+ fast/viewport/viewport-13.html
+ fast/viewport/viewport-14.html
+ fast/viewport/viewport-15.html
+ fast/viewport/viewport-16.html
+ fast/viewport/viewport-17.html
+ fast/viewport/viewport-18.html
+ fast/viewport/viewport-19.html
+ fast/viewport/viewport-2.html
+ fast/viewport/viewport-20.html
+ fast/viewport/viewport-21.html
+ fast/viewport/viewport-22.html
+ fast/viewport/viewport-23.html
+ fast/viewport/viewport-24.html
+ fast/viewport/viewport-25.html
+ fast/viewport/viewport-26.html
+ fast/viewport/viewport-27.html
+ fast/viewport/viewport-28.html
+ fast/viewport/viewport-29.html
+ fast/viewport/viewport-3.html
+ fast/viewport/viewport-30.html
+ fast/viewport/viewport-31.html
+ fast/viewport/viewport-32.html
+ fast/viewport/viewport-33.html
+ fast/viewport/viewport-34.html
+ fast/viewport/viewport-35.html
+ fast/viewport/viewport-36.html
+ fast/viewport/viewport-37.html
+ fast/viewport/viewport-38.html
+ fast/viewport/viewport-39.html
+ fast/viewport/viewport-4.html
+ fast/viewport/viewport-40.html
+ fast/viewport/viewport-41.html
+ fast/viewport/viewport-42.html
+ fast/viewport/viewport-43.html
+ fast/viewport/viewport-44.html
+ fast/viewport/viewport-45.html
+ fast/viewport/viewport-46.html
+ fast/viewport/viewport-47.html
+ fast/viewport/viewport-48.html
+ fast/viewport/viewport-49.html
+ fast/viewport/viewport-5.html
+ fast/viewport/viewport-50.html
+ fast/viewport/viewport-51.html
+ fast/viewport/viewport-52.html
+ fast/viewport/viewport-53.html
+ fast/viewport/viewport-54.html
+ fast/viewport/viewport-55.html
+ fast/viewport/viewport-56.html
+ fast/viewport/viewport-57.html
+ fast/viewport/viewport-58.html
+ fast/viewport/viewport-59.html
+ fast/viewport/viewport-6.html
+ fast/viewport/viewport-60.html
+ fast/viewport/viewport-61.html
+ fast/viewport/viewport-62.html
+ fast/viewport/viewport-63.html
+ fast/viewport/viewport-64.html
+ fast/viewport/viewport-65.html
+ fast/viewport/viewport-66.html
+ fast/viewport/viewport-67.html
+ fast/viewport/viewport-68.html
+ fast/viewport/viewport-69.html
+ fast/viewport/viewport-7.html
+ fast/viewport/viewport-70.html
+ fast/viewport/viewport-71.html
+ fast/viewport/viewport-72.html
+ fast/viewport/viewport-73.html
+ fast/viewport/viewport-74.html
+ fast/viewport/viewport-75.html
+ fast/viewport/viewport-76.html
+ fast/viewport/viewport-77.html
+ fast/viewport/viewport-78.html
+ fast/viewport/viewport-79.html
+ fast/viewport/viewport-8.html
+ fast/viewport/viewport-80.html
+ fast/viewport/viewport-81.html
+ fast/viewport/viewport-82.html
+ fast/viewport/viewport-83.html
+ fast/viewport/viewport-84.html
+ fast/viewport/viewport-85.html
+ fast/viewport/viewport-86.html
+ fast/viewport/viewport-87.html
+ fast/viewport/viewport-88.html
+ fast/viewport/viewport-9.html
+ fast/viewport/viewport-90.html
+
+ * dom/ViewportArguments.cpp:
+ (WebCore::findConfigurationForViewportData):
+ (WebCore::findSizeValue):
+ (WebCore::findScaleValue):
+ (WebCore::findUserScalableValue):
+ (WebCore::findTargetDensityDPIValue):
+ (WebCore::setViewportFeature):
+ * dom/ViewportArguments.h:
+ (WebCore::ViewportArguments::):
+ (WebCore::ViewportArguments::ViewportArguments):
+ (WebCore::ViewportArguments::hasCustomArgument):
+
2010-09-13 Andreas Kling <andreas.kling at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/dom/ViewportArguments.cpp b/WebCore/dom/ViewportArguments.cpp
index 9f831dd..415506e 100644
--- a/WebCore/dom/ViewportArguments.cpp
+++ b/WebCore/dom/ViewportArguments.cpp
@@ -5,6 +5,7 @@
* (C) 2006 Alexey Proskuryakov (ap at webkit.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -31,76 +32,275 @@
#include "DOMWindow.h"
#include "Document.h"
#include "Frame.h"
+#include "IntSize.h"
#include "Page.h"
#include "PlatformString.h"
#include "ScriptableDocumentParser.h"
+using namespace std;
+
namespace WebCore {
+ViewportConfiguration findConfigurationForViewportData(ViewportArguments args, int desktopWidth, int deviceWidth, int deviceHeight, int deviceDPI, IntSize visibleViewport)
+{
+ ViewportConfiguration result;
+
+ float availableWidth = visibleViewport.width();
+ float availableHeight = visibleViewport.height();
+
+ ASSERT(availableWidth > 0 && availableHeight > 0);
+
+ switch (int(args.width)) {
+ case ViewportArguments::ValueDesktopWidth:
+ args.width = desktopWidth;
+ break;
+ case ViewportArguments::ValueDeviceWidth:
+ args.width = deviceWidth;
+ break;
+ case ViewportArguments::ValueDeviceHeight:
+ args.width = deviceHeight;
+ break;
+ }
+
+ switch (int(args.height)) {
+ case ViewportArguments::ValueDesktopWidth:
+ args.height = desktopWidth;
+ break;
+ case ViewportArguments::ValueDeviceWidth:
+ args.height = deviceWidth;
+ break;
+ case ViewportArguments::ValueDeviceHeight:
+ args.height = deviceHeight;
+ break;
+ }
+
+ result.devicePixelRatio = float(deviceDPI / 160.0);
+
+ // Resolve non-'auto' width and height to pixel values.
+ if (deviceDPI != 1.0) {
+ deviceWidth /= result.devicePixelRatio;
+ deviceHeight /= result.devicePixelRatio;
+
+ if (args.width != ViewportArguments::ValueAuto)
+ args.width /= result.devicePixelRatio;
+ if (args.height != ViewportArguments::ValueAuto)
+ args.height /= result.devicePixelRatio;
+ }
+
+ // Clamp values to range defined by spec and resolve minimum-scale and maximum-scale values
+ if (args.width != ViewportArguments::ValueAuto)
+ args.width = min(float(10000), max(args.width, float(1)));
+ if (args.height != ViewportArguments::ValueAuto)
+ args.height = min(float(10000), max(args.height, float(1)));
+
+ if (args.initialScale != ViewportArguments::ValueAuto)
+ args.initialScale = min(float(10), max(args.initialScale, float(0.1)));
+ if (args.minimumScale != ViewportArguments::ValueAuto)
+ args.minimumScale = min(float(10), max(args.minimumScale, float(0.1)));
+ if (args.maximumScale != ViewportArguments::ValueAuto)
+ args.maximumScale = min(float(10), max(args.maximumScale, float(0.1)));
+
+ // Resolve minimum-scale and maximum-scale values according to spec.
+ if (args.minimumScale == ViewportArguments::ValueAuto)
+ result.minimumScale = float(0.25);
+ else
+ result.minimumScale = args.minimumScale;
+
+ if (args.maximumScale == ViewportArguments::ValueAuto) {
+ result.maximumScale = float(5.0);
+ result.minimumScale = min(float(5.0), result.minimumScale);
+ } else
+ result.maximumScale = args.maximumScale;
+ result.maximumScale = max(result.minimumScale, result.maximumScale);
+
+ // Resolve initial-scale value.
+ result.initialScale = args.initialScale;
+ if (result.initialScale == ViewportArguments::ValueAuto) {
+ result.initialScale = availableWidth / desktopWidth;
+ if (args.width != ViewportArguments::ValueAuto)
+ result.initialScale = availableWidth / args.width;
+ if (args.height != ViewportArguments::ValueAuto) {
+ // if 'auto', the initial-scale will be negative here and thus ignored.
+ result.initialScale = max(result.initialScale, availableHeight / args.height);
+ }
+ }
+
+ // Constrain initial-scale value to minimum-scale/maximum-scale range.
+ result.initialScale = min(result.maximumScale, max(result.minimumScale, result.initialScale));
+
+ // Resolve width value.
+ float width;
+ if (args.width != ViewportArguments::ValueAuto)
+ width = args.width;
+ else {
+ if (args.initialScale == ViewportArguments::ValueAuto)
+ width = desktopWidth;
+ else if (args.height != ViewportArguments::ValueAuto)
+ width = args.height * (availableWidth / availableHeight);
+ else
+ width = availableWidth / result.initialScale;
+ }
+
+ // Resolve height value.
+ float height;
+ if (args.height != ViewportArguments::ValueAuto)
+ height = args.height;
+ else
+ height = width * availableHeight / availableWidth;
+
+ // Extend width and height to fill the visual viewport for the resolved initial-scale.
+ width = max(width, availableWidth / result.initialScale);
+ height = max(height, availableHeight / result.initialScale);
+ result.layoutViewport.setWidth(width);
+ result.layoutViewport.setHeight(height);
+
+ // Update minimum scale factor, to never allow zooming out more than viewport
+ result.minimumScale = max(result.minimumScale, max(availableWidth / width, availableHeight / height));
+
+ return result;
+}
+
+static float findSizeValue(const String& keyString, const String& valueString, Document* document)
+{
+ // 1) Non-negative number values are translated to px lengths.
+ // 2) Negative number values are translated to auto.
+ // 3) device-width and device-height are used as keywords.
+ // 4) Other keywords and unknown values translate to 0.0.
+
+ if (equalIgnoringCase(valueString, "desktop-width"))
+ return ViewportArguments::ValueDesktopWidth;
+ if (equalIgnoringCase(valueString, "device-width"))
+ return ViewportArguments::ValueDeviceWidth;
+ if (equalIgnoringCase(valueString, "device-height"))
+ return ViewportArguments::ValueDeviceHeight;
+
+ bool ok;
+ float value = valueString.toFloat(&ok);
+ if (!ok) {
+ reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
+ return float(0.0);
+ }
+
+ if (value < 0)
+ return ViewportArguments::ValueAuto;
+
+ if (keyString == "width")
+ reportViewportWarning(document, DeviceWidthShouldBeUsedWarning, keyString);
+ else if (keyString == "height")
+ reportViewportWarning(document, DeviceHeightShouldBeUsedWarning, keyString);
+
+ return value;
+}
+
+static float findScaleValue(const String& keyString, const String& valueString, Document* document)
+{
+ // 1) Non-negative number values are translated to <number> values.
+ // 2) Negative number values are translated to auto.
+ // 3) yes is translated to 1.0.
+ // 4) device-width and device-height are translated to 10.0.
+ // 5) no and unknown values are translated to 0.0
+
+ if (equalIgnoringCase(valueString, "yes"))
+ return float(1.0);
+ if (equalIgnoringCase(valueString, "no"))
+ return float(0.0);
+ if (equalIgnoringCase(valueString, "desktop-width"))
+ return float(10.0);
+ if (equalIgnoringCase(valueString, "device-width"))
+ return float(10.0);
+ if (equalIgnoringCase(valueString, "device-height"))
+ return float(10.0);
+
+ bool ok;
+ float value = valueString.toFloat(&ok);
+ if (!ok) {
+ reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
+ return float(0.0);
+ }
+
+ if (value < 0)
+ return ViewportArguments::ValueAuto;
+
+ if (value > 10.0)
+ reportViewportWarning(document, MaximumScaleTooLargeError, keyString);
+
+ return value;
+}
+
+static bool findUserScalableValue(const String& keyString, const String& valueString, Document* document)
+{
+ // yes and no are used as keywords.
+ // Numbers >= 1, numbers <= -1, device-width and device-height are mapped to yes.
+ // Numbers in the range <-1, 1>, and unknown values, are mapped to no.
+
+ if (equalIgnoringCase(valueString, "yes"))
+ return true;
+ if (equalIgnoringCase(valueString, "no"))
+ return false;
+ if (equalIgnoringCase(valueString, "desktop-width"))
+ return true;
+ if (equalIgnoringCase(valueString, "device-width"))
+ return true;
+ if (equalIgnoringCase(valueString, "device-height"))
+ return true;
+
+ bool ok;
+ float value = valueString.toFloat(&ok);
+ if (!ok) {
+ reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
+ return false;
+ }
+
+ if (abs(value) < 0)
+ return false;
+
+ return true;
+}
+
+static float findTargetDensityDPIValue(const String& keyString, const String& valueString, Document* document)
+{
+ if (equalIgnoringCase(valueString, "device-dpi"))
+ return ViewportArguments::ValueDeviceDPI;
+ if (equalIgnoringCase(valueString, "low-dpi"))
+ return ViewportArguments::ValueLowDPI;
+ if (equalIgnoringCase(valueString, "medium-dpi"))
+ return ViewportArguments::ValueMediumDPI;
+ if (equalIgnoringCase(valueString, "high-dpi"))
+ return ViewportArguments::ValueHighDPI;
+
+ bool ok;
+ float value = valueString.toFloat(&ok);
+ if (!ok) {
+ reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
+ return ViewportArguments::ValueAuto;
+ }
+
+ if (value < 70 || value > 400) {
+ reportViewportWarning(document, TargetDensityDpiTooSmallOrLargeError, keyString);
+ return ViewportArguments::ValueAuto;
+ }
+
+ return value;
+}
+
void setViewportFeature(const String& keyString, const String& valueString, Document* document, void* data)
{
ViewportArguments* arguments = static_cast<ViewportArguments*>(data);
- float value = ViewportArguments::ValueUndefined;
- bool didUseConstants = false;
- if (equalIgnoringCase(valueString, "yes"))
- value = 1;
- else if (equalIgnoringCase(valueString, "device-width")) {
- didUseConstants = true;
- if (document->page())
- value = document->page()->chrome()->windowRect().width();
- } else if (equalIgnoringCase(valueString, "device-height")) {
- didUseConstants = true;
- if (document->page())
- value = document->page()->chrome()->windowRect().height();
- } else if (equalIgnoringCase(valueString, "device-dpi")) {
- didUseConstants = true;
- // Default of today is 160dpi, resulting in a scaleFactor of 1.0.
- if (document->page())
- value = 160 * document->page()->chrome()->scaleFactor();
- } else if (equalIgnoringCase(valueString, "low-dpi")) {
- didUseConstants = true;
- value = 120;
- } else if (equalIgnoringCase(valueString, "medium-dpi")) {
- didUseConstants = true;
- value = 160;
- } else if (equalIgnoringCase(valueString, "high-dpi")) {
- didUseConstants = true;
- value = 240;
- } else if (equalIgnoringCase(valueString, "default")) // This allows us to distinguish the omission of a key from asking for the default value.
- value = -2;
- else if (valueString.length()) // listing a key with no value is shorthand for key=default
- value = valueString.toFloat();
-
- if (keyString == "initial-scale")
- arguments->initialScale = value;
+ if (keyString == "width")
+ arguments->width = findSizeValue(keyString, valueString, document);
+ else if (keyString == "height")
+ arguments->height = findSizeValue(keyString, valueString, document);
+ else if (keyString == "initial-scale")
+ arguments->initialScale = findScaleValue(keyString, valueString, document);
else if (keyString == "minimum-scale")
- arguments->minimumScale = value;
- else if (keyString == "maximum-scale") {
- arguments->maximumScale = value;
- if (value > 10.0)
- reportViewportWarning(document, MaximumScaleTooLargeError, keyString);
- } else if (keyString == "user-scalable")
- arguments->userScalable = value;
- else if (keyString == "width") {
- if (document->page() && value == document->page()->chrome()->windowRect().width() && !didUseConstants)
- reportViewportWarning(document, DeviceWidthShouldBeUsedWarning, keyString);
- else if (document->page() && value == document->page()->chrome()->windowRect().height() && !didUseConstants)
- reportViewportWarning(document, DeviceHeightShouldBeUsedWarning, keyString);
-
- arguments->width = value;
- } else if (keyString == "height") {
- if (document->page() && value == document->page()->chrome()->windowRect().width() && !didUseConstants)
- reportViewportWarning(document, DeviceWidthShouldBeUsedWarning, keyString);
- else if (document->page() && value == document->page()->chrome()->windowRect().height() && !didUseConstants)
- reportViewportWarning(document, DeviceHeightShouldBeUsedWarning, keyString);
- arguments->height = value;
- } else if (keyString == "target-densitydpi" || keyString == "target-densityDpi") {
- if (!didUseConstants && (value < 70 || value > 400))
- reportViewportWarning(document, TargetDensityDpiTooSmallOrLargeError, keyString);
- arguments->targetDensityDpi = value;
- } else
- reportViewportWarning(document, UnrecognizedViewportArgumentError, keyString);
+ arguments->minimumScale = findScaleValue(keyString, valueString, document);
+ else if (keyString == "maximum-scale")
+ arguments->maximumScale = findScaleValue(keyString, valueString, document);
+ else if (keyString == "user-scalable")
+ arguments->userScalable = findUserScalableValue(keyString, valueString, document);
+ else if (keyString == "target-densitydpi")
+ arguments->targetDensityDpi = findTargetDensityDPIValue(keyString, valueString, document);
}
static const char* viewportErrorMessageTemplate(ViewportErrorCode errorCode)
diff --git a/WebCore/dom/ViewportArguments.h b/WebCore/dom/ViewportArguments.h
index 1fac0df..5731842 100644
--- a/WebCore/dom/ViewportArguments.h
+++ b/WebCore/dom/ViewportArguments.h
@@ -5,6 +5,7 @@
* (C) 2006 Alexey Proskuryakov (ap at webkit.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -26,6 +27,7 @@
#ifndef ViewportArguments_h
#define ViewportArguments_h
+#include "IntSize.h"
#include <wtf/Forward.h>
namespace WebCore {
@@ -40,18 +42,37 @@ enum ViewportErrorCode {
TargetDensityDpiTooSmallOrLargeError
};
+struct ViewportConfiguration {
+ IntSize layoutViewport;
+
+ float devicePixelRatio;
+
+ float initialScale;
+ float minimumScale;
+ float maximumScale;
+};
+
struct ViewportArguments {
- enum { ValueUndefined = -1 };
+ enum {
+ ValueAuto = -1,
+ ValueDesktopWidth = -2,
+ ValueDeviceWidth = -3,
+ ValueDeviceHeight = -4,
+ ValueDeviceDPI = -5,
+ ValueLowDPI = -6,
+ ValueMediumDPI = -7,
+ ValueHighDPI = -8
+ };
ViewportArguments()
- : initialScale(ValueUndefined)
- , minimumScale(ValueUndefined)
- , maximumScale(ValueUndefined)
- , width(ValueUndefined)
- , height(ValueUndefined)
- , targetDensityDpi(ValueUndefined)
- , userScalable(ValueUndefined)
+ : initialScale(ValueAuto)
+ , minimumScale(ValueAuto)
+ , maximumScale(ValueAuto)
+ , width(ValueAuto)
+ , height(ValueAuto)
+ , targetDensityDpi(ValueAuto)
+ , userScalable(ValueAuto)
{
}
@@ -66,10 +87,12 @@ struct ViewportArguments {
bool hasCustomArgument() const
{
- return initialScale != ValueUndefined || minimumScale != ValueUndefined || maximumScale != ValueUndefined || width != ValueUndefined || height != ValueUndefined || userScalable != ValueUndefined || targetDensityDpi != ValueUndefined;
+ return initialScale != ValueAuto || minimumScale != ValueAuto || maximumScale != ValueAuto || width != ValueAuto || height != ValueAuto || userScalable != ValueAuto || targetDensityDpi != ValueAuto;
}
};
+ViewportConfiguration findConfigurationForViewportData(ViewportArguments args, int desktopWidth, int deviceWidth, int deviceHeight, int deviceDPI, IntSize visibleViewport);
+
void setViewportFeature(const String& keyString, const String& valueString, Document*, void* data);
void reportViewportWarning(Document*, ViewportErrorCode, const String& replacement);
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index dbc4044..6d6eca1 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -31,6 +31,7 @@
#include "qwebelement.h"
#include "wtf/RefPtr.h"
#include "Frame.h"
+#include "ViewportArguments.h"
namespace WebCore {
class FrameLoaderClientQt;
@@ -71,7 +72,6 @@ public:
, allowsScrolling(true)
, marginWidth(-1)
, marginHeight(-1)
- , initialLayoutComplete(false)
, zoomTextOnly(false)
{}
void init(QWebFrame* qframe, QWebFrameData* frameData);
@@ -100,8 +100,8 @@ public:
bool allowsScrolling;
int marginWidth;
int marginHeight;
- bool initialLayoutComplete;
bool zoomTextOnly;
+ WebCore::ViewportArguments viewportArguments;
};
class QWebHitTestResultPrivate {
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 75850fa..4f5e711 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -1698,15 +1698,15 @@ InspectorController* QWebPagePrivate::inspectorController()
/*!
- \class QWebPage::ViewportHints
+ \class QWebPage::ViewportConfiguration
\since 4.7
- \brief The QWebPage::ViewportHints class describes hints that can be applied to a viewport.
+ \brief The QWebPage::ViewportConfiguration class describes hints that can be applied to a viewport.
- QWebPage::ViewportHints provides a description of a viewport, such as viewport geometry,
+ QWebPage::ViewportConfiguration provides a description of a viewport, such as viewport geometry,
initial scale factor with limits, plus information about whether a user should be able
to scale the contents in the viewport or not, ie. by zooming.
- ViewportHints can be set by a web author using the viewport meta tag extension, documented
+ ViewportConfiguration can be set by a web author using the viewport meta tag extension, documented
at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}.
All values might not be set, as such when dealing with the hints, the developer needs to
@@ -1716,13 +1716,14 @@ InspectorController* QWebPagePrivate::inspectorController()
*/
/*!
- Constructs an empty QWebPage::ViewportHints.
+ Constructs an empty QWebPage::ViewportConfiguration.
*/
-QWebPage::ViewportHints::ViewportHints()
+QWebPage::ViewportConfiguration::ViewportConfiguration()
: d(0)
, m_initialScaleFactor(-1.0)
, m_minimumScaleFactor(-1.0)
, m_maximumScaleFactor(-1.0)
+ , m_devicePixelRatio(-1.0)
, m_isUserScalable(true)
, m_isValid(false)
{
@@ -1730,13 +1731,14 @@ QWebPage::ViewportHints::ViewportHints()
}
/*!
- Constructs a QWebPage::ViewportHints which is a copy from \a other .
+ Constructs a QWebPage::ViewportConfiguration which is a copy from \a other .
*/
-QWebPage::ViewportHints::ViewportHints(const QWebPage::ViewportHints& other)
+QWebPage::ViewportConfiguration::ViewportConfiguration(const QWebPage::ViewportConfiguration& other)
: d(other.d)
, m_initialScaleFactor(other.m_initialScaleFactor)
, m_minimumScaleFactor(other.m_minimumScaleFactor)
, m_maximumScaleFactor(other.m_maximumScaleFactor)
+ , m_devicePixelRatio(other.m_devicePixelRatio)
, m_isUserScalable(other.m_isUserScalable)
, m_isValid(other.m_isValid)
, m_size(other.m_size)
@@ -1745,18 +1747,18 @@ QWebPage::ViewportHints::ViewportHints(const QWebPage::ViewportHints& other)
}
/*!
- Destroys the QWebPage::ViewportHints.
+ Destroys the QWebPage::ViewportConfiguration.
*/
-QWebPage::ViewportHints::~ViewportHints()
+QWebPage::ViewportConfiguration::~ViewportConfiguration()
{
}
/*!
- Assigns the given QWebPage::ViewportHints to this viewport hints and returns a
+ Assigns the given QWebPage::ViewportConfiguration to this viewport hints and returns a
reference to this.
*/
-QWebPage::ViewportHints& QWebPage::ViewportHints::operator=(const QWebPage::ViewportHints& other)
+QWebPage::ViewportConfiguration& QWebPage::ViewportConfiguration::operator=(const QWebPage::ViewportConfiguration& other)
{
if (this != &other) {
d = other.d;
@@ -1771,30 +1773,30 @@ QWebPage::ViewportHints& QWebPage::ViewportHints::operator=(const QWebPage::View
return *this;
}
-/*! \fn inline bool QWebPage::ViewportHints::isValid() const
- Returns whether this is a valid ViewportHints or not.
+/*! \fn inline bool QWebPage::ViewportConfiguration::isValid() const
+ Returns whether this is a valid ViewportConfiguration or not.
- An invalid ViewportHints will have an empty QSize, negative values for scale factors and
+ An invalid ViewportConfiguration will have an empty QSize, negative values for scale factors and
true for the boolean isUserScalable.
*/
-/*! \fn inline QSize QWebPage::ViewportHints::size() const
+/*! \fn inline QSize QWebPage::ViewportConfiguration::size() const
Returns the size of the viewport.
*/
-/*! \fn inline qreal QWebPage::ViewportHints::initialScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportConfiguration::initialScaleFactor() const
Returns the initial scale of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportHints::minimumScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportConfiguration::minimumScaleFactor() const
Returns the minimum scale value of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportHints::maximumScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportConfiguration::maximumScaleFactor() const
Returns the maximum scale value of the viewport as a multiplier.
*/
-/*! \fn inline bool QWebPage::ViewportHints::isUserScalable() const
+/*! \fn inline bool QWebPage::ViewportConfiguration::isUserScalable() const
Determines whether or not the scale can be modified by the user.
*/
@@ -2318,6 +2320,30 @@ void QWebPage::setViewportSize(const QSize &size) const
}
}
+QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(QSize availableSize) const
+{
+ static int desktopWidth = 980;
+ static int deviceDPI = 160;
+
+ FloatRect rect = d->page->chrome()->windowRect();
+
+ int deviceWidth = rect.width();
+ int deviceHeight = rect.height();
+
+ WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments, desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
+
+ ViewportConfiguration result;
+
+ result.m_isValid = true;
+ result.m_size = conf.layoutViewport;
+ result.m_initialScaleFactor = conf.initialScale;
+ result.m_minimumScaleFactor = conf.minimumScale;
+ result.m_maximumScaleFactor = conf.maximumScale;
+ result.m_devicePixelRatio = conf.devicePixelRatio;
+
+ return result;
+}
+
QSize QWebPage::preferredContentsSize() const
{
QWebFrame* frame = d->mainFrame;
@@ -2367,8 +2393,7 @@ void QWebPage::setPreferredContentsSize(const QSize& size) const
} else if (view->useFixedLayout())
view->setUseFixedLayout(false);
- if (frame->d->initialLayoutComplete)
- view->layout();
+ view->layout();
}
/*!
@@ -3700,25 +3725,12 @@ quint64 QWebPage::bytesReceived() const
/*!
\since 4.7
- \fn void QWebPage::viewportChangeRequested(const QWebPage::ViewportHints& hints)
-
- This signal is emitted before any layout of the contents, giving you the viewport \a arguments
- the web page would like you to use when laying out its contents, including elements fixed to the
- viewport. This viewport might be larger that your actual viewport, meaning that a initialScaleFactor
- should be applied. When no scale is given, it is assumed that the contents should be scaled
- such that the width of the scaled contents fits within the actual viewport.
-
- The minimum and maximum allowed scale represents the min and max values that the page
- allows for scaling, and thus, affects the ability to zoom in on the page.
-
- Invalid values are supplied for the values not explicitly set by the web author; thus an
- invalid viewport size, and negative values for scale factor and limits. The boolean
- ViewportHints::isUserScalable is set to true.
+ \fn void QWebPage::viewportChangeRequested()
Page authors can provide the supplied values by using the viewport meta tag. More information
about this can be found at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}.
- \sa QWebPage::ViewportHints, setPreferredContentsSize(), QGraphicsWebView::setScale()
+ \sa QWebPage::ViewportConfiguration, setPreferredContentsSize(), QGraphicsWebView::setScale()
*/
/*!
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index dda4a6a..b1441ff 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -48,7 +48,7 @@ class QWebHitTestResult;
class QWebNetworkInterface;
class QWebPagePrivate;
class QWebPluginFactory;
-class QtViewportHintsPrivate;
+class QtViewportConfigurationPrivate;
namespace WebCore {
class ChromeClientQt;
@@ -207,34 +207,35 @@ public:
GeolocationPermissionDomain
};
- class ViewportHints {
+ class ViewportConfiguration {
public:
- ViewportHints();
- ViewportHints(const QWebPage::ViewportHints& other);
+ ViewportConfiguration();
+ ViewportConfiguration(const QWebPage::ViewportConfiguration& other);
- ~ViewportHints();
+ ~ViewportConfiguration();
- QWebPage::ViewportHints& operator=(const QWebPage::ViewportHints& other);
+ QWebPage::ViewportConfiguration& operator=(const QWebPage::ViewportConfiguration& other);
inline qreal initialScaleFactor() const { return m_initialScaleFactor; };
inline qreal minimumScaleFactor() const { return m_minimumScaleFactor; };
inline qreal maximumScaleFactor() const { return m_maximumScaleFactor; };
- inline int targetDensityDpi() const { return m_targetDensityDpi; };
+ inline qreal devicePixelRatio() const { return m_devicePixelRatio; };
inline bool isUserScalable() const { return m_isUserScalable; };
inline bool isValid() const { return m_isValid; };
inline QSize size() const { return m_size; };
private:
- QSharedDataPointer<QtViewportHintsPrivate> d;
+ QSharedDataPointer<QtViewportConfigurationPrivate> d;
qreal m_initialScaleFactor;
qreal m_minimumScaleFactor;
qreal m_maximumScaleFactor;
- int m_targetDensityDpi;
+ qreal m_devicePixelRatio;
bool m_isUserScalable;
bool m_isValid;
QSize m_size;
friend class WebCore::ChromeClientQt;
+ friend class QWebPage;
};
@@ -274,6 +275,7 @@ public:
QSize viewportSize() const;
void setViewportSize(const QSize &size) const;
+ ViewportConfiguration viewportConfigurationForSize(QSize availableSize) const;
QSize preferredContentsSize() const;
void setPreferredContentsSize(const QSize &size) const;
@@ -384,7 +386,7 @@ Q_SIGNALS:
void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item);
void restoreFrameStateRequested(QWebFrame* frame);
- void viewportChangeRequested(const QWebPage::ViewportHints& hints);
+ void viewportChangeRequested();
void requestPermissionFromUser(QWebFrame* frame, QWebPage::PermissionDomain domain);
void checkPermissionFromUser(QWebFrame* frame, QWebPage::PermissionDomain domain, QWebPage::PermissionPolicy& policy);
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 6310eaf..82f5365 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -58,13 +58,13 @@ QT_END_NAMESPACE
class QWebInspector;
class QWebPageClient;
-class QtViewportHintsPrivate : public QSharedData {
+class QtViewportConfigurationPrivate : public QSharedData {
public:
- QtViewportHintsPrivate(QWebPage::ViewportHints* qq)
+ QtViewportConfigurationPrivate(QWebPage::ViewportConfiguration* qq)
: q(qq)
{ }
- QWebPage::ViewportHints* q;
+ QWebPage::ViewportConfiguration* q;
};
class QWebPagePrivate {
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 1564753..bdb8145 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,35 @@
+2010-08-27 Kenneth Rohde Christiansen <kenneth.christiansen at openbossa.org>
+
+ Reviewed by Antti Koivisto.
+
+ Add a Qt API for the viewport meta tag support based on the
+ following draft spec:
+
+ http://people.opera.com/rune/TR/ED-css-viewport-20100806/
+
+ Add common handling of viewport meta tag based on new Opera spec
+ https://bugs.webkit.org/show_bug.cgi?id=44201
+
+ * Api/qwebframe_p.h:
+ (QWebFramePrivate::QWebFramePrivate):
+ * Api/qwebpage.cpp:
+ (QWebPage::ViewportConfiguration::ViewportConfiguration):
+ (QWebPage::ViewportConfiguration::~ViewportConfiguration):
+ (QWebPage::ViewportConfiguration::operator=):
+ (QWebPage::viewportConfigurationForSize):
+ (QWebPage::setPreferredContentsSize):
+ * Api/qwebpage.h:
+ * Api/qwebpage_p.h:
+ (QtViewportConfigurationPrivate::QtViewportConfigurationPrivate):
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::didReceiveViewportArguments):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientQt::dispatchDidFirstLayout):
+
2010-09-12 Martin Smith <martin.smith at nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 8b01d4d..7406550 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -640,22 +640,9 @@ QWebSelectMethod* ChromeClientQt::createSelectPopup() const
void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const
{
- if (m_webPage->mainFrame()->d->initialLayoutComplete)
- return;
-
- QSize viewportSize(arguments.width, arguments.height);
- bool isUserScalable = arguments.userScalable == 1;
-
- QWebPage::ViewportHints hints;
- hints.m_isValid = true;
- hints.m_size = viewportSize;
- hints.m_initialScaleFactor = arguments.initialScale;
- hints.m_minimumScaleFactor = arguments.minimumScale;
- hints.m_maximumScaleFactor = arguments.maximumScale;
- hints.m_targetDensityDpi = arguments.targetDensityDpi;
- hints.m_isUserScalable = isUserScalable;
+ m_webPage->mainFrame()->d->viewportArguments = arguments;
- emit m_webPage->viewportChangeRequested(hints);
+ emit m_webPage->viewportChangeRequested();
}
bool ChromeClientQt::selectItemWritingDirectionIsNatural()
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 6591c2a..126a0da 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -618,6 +618,27 @@ void DumpRenderTreeSupportQt::dumpNotification(bool b)
#endif
}
+QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& availableSize)
+{
+ WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments;
+ WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(args,
+ /* desktop-width */ 980,
+ /* device-width */ 320,
+ /* device-height */ 480,
+ /* device-dpi */ 160,
+ availableSize);
+
+ QString res;
+ res = res.sprintf("viewport size %dx%d scale %f with limits [%f, %f]\n",
+ conf.layoutViewport.width(),
+ conf.layoutViewport.height(),
+ conf.initialScale,
+ conf.minimumScale,
+ conf.maximumScale);
+
+ return res;
+}
+
void DumpRenderTreeSupportQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
{
#if ENABLE(GEOLOCATION)
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 5c4dd65..c4efc56 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -128,6 +128,7 @@ public:
static QString pageProperty(QWebFrame* frame, const QString& propertyName, int pageNumber);
static void addUserStyleSheet(QWebPage* page, const QString& sourceCode);
static void simulateDesktopNotificationClick(const QString& title);
+ static QString viewportAsText(QWebPage*, const QSize&);
};
#endif
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 549889a..5980c27 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -67,6 +67,7 @@
#include "ScriptString.h"
#include "Settings.h"
#include "QWebPageClient.h"
+#include "ViewportArguments.h"
#include "qwebpage.h"
#include "qwebpage_p.h"
@@ -445,7 +446,8 @@ void FrameLoaderClientQt::dispatchDidCommitLoad()
if (m_frame->tree()->parent() || !m_webFrame)
return;
- m_webFrame->d->initialLayoutComplete = false;
+ // Clear the viewport arguments.
+ m_webFrame->d->viewportArguments = WebCore::ViewportArguments();
emit m_webFrame->urlChanged(m_webFrame->url());
m_webFrame->page()->d->updateNavigationActions();
@@ -459,7 +461,7 @@ void FrameLoaderClientQt::dispatchDidCommitLoad()
if (!isMainFrame)
return;
- emit m_webFrame->page()->viewportChangeRequested(QWebPage::ViewportHints());
+ emit m_webFrame->page()->viewportChangeRequested();
}
@@ -497,7 +499,6 @@ void FrameLoaderClientQt::dispatchDidFinishLoad()
void FrameLoaderClientQt::dispatchDidFirstLayout()
{
- m_webFrame->d->initialLayoutComplete = true;
}
void FrameLoaderClientQt::dispatchDidFirstVisuallyNonEmptyLayout()
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6a56669..9eb2140 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-08-27 Kenneth Rohde Christiansen <kenneth.christiansen at openbossa.org>
+
+ Reviewed by Antti Koivisto.
+
+ Add support for testing the viewport meta tag algorithm,
+ based on the following draft spec:
+
+ http://people.opera.com/rune/TR/ED-css-viewport-20100806/
+
+ Add common handling of viewport meta tag based on new Opera spec
+ https://bugs.webkit.org/show_bug.cgi?id=44201
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::dumpConfigurationForViewport):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
2010-09-12 Kent Tamura <tkent at chromium.org>
Reviewed by Tony Chang.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 7d06340..7d697bc 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -227,6 +227,12 @@ QString LayoutTestController::pathToLocalResource(const QString& url)
return QDir::toNativeSeparators(url);
}
+void LayoutTestController::dumpConfigurationForViewport(int availableWidth, int availableHeight)
+{
+ QString res = DumpRenderTreeSupportQt::viewportAsText(m_drt->webPage(), QSize(availableWidth, availableHeight));
+ fputs(qPrintable(res), stdout);
+}
+
void LayoutTestController::dumpEditingCallbacks()
{
qDebug() << ">>>dumpEditingCallbacks";
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index d14e0e4..ba31f1f 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -108,6 +108,7 @@ public slots:
void dumpFrameLoadCallbacks();
void dumpResourceLoadCallbacks();
void dumpResourceResponseMIMETypes();
+ void dumpConfigurationForViewport(int availableWidth, int availableHeight);
void setWillSendRequestReturnsNullOnRedirect(bool enabled);
void setWillSendRequestReturnsNull(bool enabled);
void setWillSendRequestClearHeader(const QStringList& headers);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list