REGRESSION (r167937): Do not use effective zoom factor while resolving media query...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jun 2014 23:13:20 +0000 (23:13 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jun 2014 23:13:20 +0000 (23:13 +0000)
commit6a2c7346c7cddfaed1f5d062378d5ee928cb5c5d
treea91dd2c4167f92ac6313c0a9dadcb4a176a03924
parent1106f1024f915a95ed70cf7e22911ea141f3057a
REGRESSION (r167937): Do not use effective zoom factor while resolving media query's min-, max-(device)width/height values.
https://bugs.webkit.org/show_bug.cgi?id=133681

Reviewed by Simon Fraser.

We lost the default multiplier(zoom) value of 1 with r167937 at template<typename T> T computeLength().
Now MediaQueryEvaluator takes the current page zoom factor into account while resolving min-, max- width values.

This patch explicitly sets the multiplier value to 1 to ensure zoom independent media query value resolving.

Source/WebCore:
Test: fast/media/media-query-with-scaled-content.html

* css/CSSToLengthConversionData.cpp:
(WebCore::CSSToLengthConversionData::viewportWidthFactor):
(WebCore::CSSToLengthConversionData::viewportHeightFactor):
* css/CSSToLengthConversionData.h:
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::eval):
* testing/Internals.cpp:
(WebCore::Internals::setPageZoomFactor):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:
* fast/media/media-query-with-scaled-content-expected.html: Added.
* fast/media/media-query-with-scaled-content.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/media/media-query-with-scaled-content-expected.html [new file with mode: 0644]
LayoutTests/fast/media/media-query-with-scaled-content.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSToLengthConversionData.cpp
Source/WebCore/css/CSSToLengthConversionData.h
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in