-
ddkilzer authored
WebKit confuses width/height for Media Queries device-aspect-ratio evaluation <http://bugs.webkit.org/show_bug.cgi?id=14893> <rdar://problem/5380295> Reviewed by Darin. Tests: fast/css/device-aspect-ratio.html fast/css/max-device-aspect-ratio.html fast/css/min-device-aspect-ratio.html * css/MediaQueryEvaluator.cpp: (WebCore::parseAspectRatio): Renamed method parameters from a/b to h/v. (WebCore::device_aspect_ratioMediaFeatureEval): Renamed local variables from a/b to h/v. Switched first two arguments of the call to cmpvalue() to fix the bug. LayoutTests: WebKit confuses width/height for Media Queries device-aspect-ratio evaluation <http://bugs.webkit.org/show_bug.cgi?id=14893> <rdar://problem/5380295> Reviewed by Darin. Each of the following tests creates a <link> element and dynamically sets its media query based on the aspect ratio (width/height) of the current screen. When the <link> element is attached to the <head> node, the test expects the stylesheet to be loaded for the test to pass. * fast/css/device-aspect-ratio-expected.txt: Added. * fast/css/device-aspect-ratio.html: Added. This test sets the device-aspect-ratio to the current size of the screen. NOTE: This test passed before the fix. * fast/css/max-device-aspect-ratio-expected.txt: Added. * fast/css/max-device-aspect-ratio.html: Added. This test sets the max-device-aspect ratio to 100/1 for landscape monitors or 1/1 for portrait (or square) monitors. NOTE: This test failed before the fix. * fast/css/min-device-aspect-ratio-expected.txt: Added. * fast/css/min-device-aspect-ratio.html: Added. This test sets the min-device-aspect ratio to 1/1 for landscape monitors or 1/100 for portrait (or square) monitors. NOTE: This test failed before the fix. * fast/css/resources/device-aspect-ratio.css: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8b549c4c