WebCore: Update support for the viewport meta tag algorithm, to
match the following draft spec:

Patch by Kenneth Rohde Christiansen <kenneth@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@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
248 files changed