Diff
Modified: trunk/LayoutTests/ChangeLog (135729 => 135730)
--- trunk/LayoutTests/ChangeLog 2012-11-26 16:32:31 UTC (rev 135729)
+++ trunk/LayoutTests/ChangeLog 2012-11-26 16:37:38 UTC (rev 135730)
@@ -1,5 +1,26 @@
2012-11-26 Thiago Marcos P. Santos <[email protected]>
+ Import more CSS Device Adaptation layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=95967
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ And these are the remaining test from the Opera's CSS
+ Device Adaptation test suite.
+
+ * css3/device-adapt/opera/constrain-021-expected.txt: Added.
+ * css3/device-adapt/opera/constrain-021.xhtml: Added.
+ * css3/device-adapt/opera/constrain-022-expected.txt: Added.
+ * css3/device-adapt/opera/constrain-022.xhtml: Added.
+ * css3/device-adapt/opera/orientation-001-expected.txt: Added.
+ * css3/device-adapt/opera/orientation-001.xhtml: Added.
+ * css3/device-adapt/opera/orientation-002-expected.txt: Added.
+ * css3/device-adapt/opera/orientation-002.xhtml: Added.
+ * platform/efl-wk1/TestExpectations:
+ * platform/efl-wk2/TestExpectations:
+
+2012-11-26 Thiago Marcos P. Santos <[email protected]>
+
Viewport CSS rules should not clamp values like Viewport META
https://bugs.webkit.org/show_bug.cgi?id=103068
Added: trunk/LayoutTests/css3/device-adapt/opera/constrain-021-expected.txt (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/constrain-021-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/constrain-021-expected.txt 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,3 @@
+
+PASS CSS Test: @viewport constrained - width is device-width.
+
Added: trunk/LayoutTests/css3/device-adapt/opera/constrain-021.xhtml (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/constrain-021.xhtml (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/constrain-021.xhtml 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @viewport constrained - width is device-width.</title>
+ <link rel="author" title="Rune Lillesveen" href=""
+ <link rel="help" href=""
+ <meta name="flags" content="visual scroll dom" />
+ <meta name="assert" content="When width is set to device-width, the device-width media feature will match when the actual viewport width is the value."/>
+ <script src="" type="text/_javascript_" />
+ <script src="" type="text/_javascript_" />
+ <style type="text/css"><![CDATA[
+ body { margin: 0; }
+ html, body, #test { width: 100%; height: 100%; }
+ #log { padding: 1em; display: none; }
+ /* Reset viewport values to initial values to ignore UA stylesheet. */
+ @-webkit-viewport {
+ width: auto;
+ height: auto;
+ zoom: auto;
+ min-zoom: auto;
+ max-zoom: auto;
+ user-zoom: zoom;
+ orientation: auto;
+ resolution: auto;
+ }
+ ]]></style>
+ <style type="text/css"><![CDATA[
+ /* CSS for the test below. */
+ @-webkit-viewport { width: device-width }
+ /* Set root element font-size to something different from the initial
+ font-size to make sure 'rem' and 'em' for @viewport is based on the
+ initial font-size, not the root element font-size. */
+ html { font-size: 2rem; }
+ body { font-size: 0.5rem; }
+ ]]></style>
+ <script type="text/_javascript_"><![CDATA[
+ var test = async_test("CSS Test: @viewport constrained - width is device-width.");
+ window._onload_ = function(){
+
+ var testStyleSheet = document.styleSheets.item(1);
+
+ /* Disable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = true;
+
+ /* Initialize an object to store viewport values to be used by the test
+ asserts. */
+ var viewport = new Object();
+
+ /* An element with the same size as the initial containing block. */
+ var testElm = document.getElementById("test");
+
+ /* Retrieve the initial viewport values before applying the @viewport to
+ test. */
+ viewport.initialWidth = testElm.offsetWidth;
+ viewport.initialHeight = testElm.offsetHeight;
+ viewport.fontSize = parseInt(getComputedStyle(testElm, "").fontSize);
+
+ /* Enable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = false;
+
+ /* Retrieve the actual viewport values for the test. */
+ viewport.actualWidth = testElm.offsetWidth;
+ viewport.actualHeight = testElm.offsetHeight;
+ viewport.zoom = viewport.initialWidth / window.innerWidth;
+
+ /* Check viewport values. */
+ test.step(function(){
+ var mq = window.matchMedia("(device-width: "+viewport.actualWidth+")"); assert_true(mq.matches);
+ });
+
+ /* Finished. Show the results. */
+ test.done();
+ testStyleSheet.disabled = true;
+ document.getElementById("log").style.display = "block";
+ }
+ ]]></script>
+ </head>
+ <body>
+ <div id="test">
+ <div id="log"></div>
+ </div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/device-adapt/opera/constrain-022-expected.txt (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/constrain-022-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/constrain-022-expected.txt 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,3 @@
+
+PASS CSS Test: @viewport constrained - height is device-height.
+
Added: trunk/LayoutTests/css3/device-adapt/opera/constrain-022.xhtml (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/constrain-022.xhtml (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/constrain-022.xhtml 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @viewport constrained - height is device-height.</title>
+ <link rel="author" title="Rune Lillesveen" href=""
+ <link rel="help" href=""
+ <meta name="flags" content="visual scroll dom" />
+ <meta name="assert" content="When height is set to device-height, the device-height media feature will match when the actual viewport height is the value."/>
+ <script src="" type="text/_javascript_" />
+ <script src="" type="text/_javascript_" />
+ <style type="text/css"><![CDATA[
+ body { margin: 0; }
+ html, body, #test { width: 100%; height: 100%; }
+ #log { padding: 1em; display: none; }
+ /* Reset viewport values to initial values to ignore UA stylesheet. */
+ @-webkit-viewport {
+ width: auto;
+ height: auto;
+ zoom: auto;
+ min-zoom: auto;
+ max-zoom: auto;
+ user-zoom: zoom;
+ orientation: auto;
+ resolution: auto;
+ }
+ ]]></style>
+ <style type="text/css"><![CDATA[
+ /* CSS for the test below. */
+ @-webkit-viewport { width: device-height }
+ /* Set root element font-size to something different from the initial
+ font-size to make sure 'rem' and 'em' for @viewport is based on the
+ initial font-size, not the root element font-size. */
+ html { font-size: 2rem; }
+ body { font-size: 0.5rem; }
+ ]]></style>
+ <script type="text/_javascript_"><![CDATA[
+ var test = async_test("CSS Test: @viewport constrained - height is device-height.");
+ window._onload_ = function(){
+
+ var testStyleSheet = document.styleSheets.item(1);
+
+ /* Disable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = true;
+
+ /* Initialize an object to store viewport values to be used by the test
+ asserts. */
+ var viewport = new Object();
+
+ /* An element with the same size as the initial containing block. */
+ var testElm = document.getElementById("test");
+
+ /* Retrieve the initial viewport values before applying the @viewport to
+ test. */
+ viewport.initialWidth = testElm.offsetWidth;
+ viewport.initialHeight = testElm.offsetHeight;
+ viewport.fontSize = parseInt(getComputedStyle(testElm, "").fontSize);
+
+ /* Enable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = false;
+
+ /* Retrieve the actual viewport values for the test. */
+ viewport.actualWidth = testElm.offsetWidth;
+ viewport.actualHeight = testElm.offsetHeight;
+ viewport.zoom = viewport.initialWidth / window.innerWidth;
+
+ /* Check viewport values. */
+ test.step(function(){
+ var mq = window.matchMedia("(device-height: "+viewport.actualHeight+")"); assert_true(mq.matches);
+ });
+
+ /* Finished. Show the results. */
+ test.done();
+ testStyleSheet.disabled = true;
+ document.getElementById("log").style.display = "block";
+ }
+ ]]></script>
+ </head>
+ <body>
+ <div id="test">
+ <div id="log"></div>
+ </div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/device-adapt/opera/orientation-001-expected.txt (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/orientation-001-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/orientation-001-expected.txt 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,3 @@
+
+PASS CSS Test: @viewport orientation - portrait
+
Added: trunk/LayoutTests/css3/device-adapt/opera/orientation-001.xhtml (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/orientation-001.xhtml (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/orientation-001.xhtml 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @viewport orientation - portrait</title>
+ <link rel="author" title="Rune Lillesveen" href=""
+ <link rel="help" href=""
+ <meta name="flags" content="visual scroll dom should" />
+ <meta name="assert" content="Forced portrait orientation of the viewport."/>
+ <script src="" type="text/_javascript_" />
+ <script src="" type="text/_javascript_" />
+ <style type="text/css"><![CDATA[
+ body { margin: 0; }
+ html, body, #test { width: 100%; height: 100%; }
+ #log { padding: 1em; display: none; }
+ /* Reset viewport values to initial values to ignore UA stylesheet. */
+ @-webkit-viewport {
+ width: auto;
+ height: auto;
+ zoom: auto;
+ min-zoom: auto;
+ max-zoom: auto;
+ user-zoom: zoom;
+ orientation: auto;
+ resolution: auto;
+ }
+ ]]></style>
+ <style type="text/css"><![CDATA[
+ /* CSS for the test below. */
+ @-webkit-viewport { orientation: portrait }
+ /* Set root element font-size to something different from the initial
+ font-size to make sure 'rem' and 'em' for @viewport is based on the
+ initial font-size, not the root element font-size. */
+ html { font-size: 2rem; }
+ body { font-size: 0.5rem; }
+ ]]></style>
+ <script type="text/_javascript_"><![CDATA[
+ var test = async_test("CSS Test: @viewport orientation - portrait");
+ window._onload_ = function(){
+
+ var testStyleSheet = document.styleSheets.item(1);
+
+ /* Disable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = true;
+
+ /* Initialize an object to store viewport values to be used by the test
+ asserts. */
+ var viewport = new Object();
+
+ /* An element with the same size as the initial containing block. */
+ var testElm = document.getElementById("test");
+
+ /* Retrieve the initial viewport values before applying the @viewport to
+ test. */
+ viewport.initialWidth = testElm.offsetWidth;
+ viewport.initialHeight = testElm.offsetHeight;
+ viewport.fontSize = parseInt(getComputedStyle(testElm, "").fontSize);
+
+ /* Enable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = false;
+
+ /* Retrieve the actual viewport values for the test. */
+ viewport.actualWidth = testElm.offsetWidth;
+ viewport.actualHeight = testElm.offsetHeight;
+ viewport.zoom = viewport.initialWidth / window.innerWidth;
+
+ /* Check viewport values. */
+ test.step(function(){
+ assert_true(viewport.actualWidth <= viewport.actualHeight);
+ });
+
+ /* Finished. Show the results. */
+ test.done();
+ testStyleSheet.disabled = true;
+ document.getElementById("log").style.display = "block";
+ }
+ ]]></script>
+ </head>
+ <body>
+ <div id="test">
+ <div id="log"></div>
+ </div>
+ </body>
+</html>
Added: trunk/LayoutTests/css3/device-adapt/opera/orientation-002-expected.txt (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/orientation-002-expected.txt (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/orientation-002-expected.txt 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,3 @@
+
+PASS CSS Test: @viewport orientation - landscape
+
Added: trunk/LayoutTests/css3/device-adapt/opera/orientation-002.xhtml (0 => 135730)
--- trunk/LayoutTests/css3/device-adapt/opera/orientation-002.xhtml (rev 0)
+++ trunk/LayoutTests/css3/device-adapt/opera/orientation-002.xhtml 2012-11-26 16:37:38 UTC (rev 135730)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>CSS Test: @viewport orientation - landscape</title>
+ <link rel="author" title="Rune Lillesveen" href=""
+ <link rel="help" href=""
+ <meta name="flags" content="visual scroll dom should" />
+ <meta name="assert" content="Forced portrait orientation of the viewport."/>
+ <script src="" type="text/_javascript_" />
+ <script src="" type="text/_javascript_" />
+ <style type="text/css"><![CDATA[
+ body { margin: 0; }
+ html, body, #test { width: 100%; height: 100%; }
+ #log { padding: 1em; display: none; }
+ /* Reset viewport values to initial values to ignore UA stylesheet. */
+ @-webkit-viewport {
+ width: auto;
+ height: auto;
+ zoom: auto;
+ min-zoom: auto;
+ max-zoom: auto;
+ user-zoom: zoom;
+ orientation: auto;
+ resolution: auto;
+ }
+ ]]></style>
+ <style type="text/css"><![CDATA[
+ /* CSS for the test below. */
+ @-webkit-viewport { orientation: portrait }
+ /* Set root element font-size to something different from the initial
+ font-size to make sure 'rem' and 'em' for @viewport is based on the
+ initial font-size, not the root element font-size. */
+ html { font-size: 2rem; }
+ body { font-size: 0.5rem; }
+ ]]></style>
+ <script type="text/_javascript_"><![CDATA[
+ var test = async_test("CSS Test: @viewport orientation - landscape");
+ window._onload_ = function(){
+
+ var testStyleSheet = document.styleSheets.item(1);
+
+ /* Disable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = true;
+
+ /* Initialize an object to store viewport values to be used by the test
+ asserts. */
+ var viewport = new Object();
+
+ /* An element with the same size as the initial containing block. */
+ var testElm = document.getElementById("test");
+
+ /* Retrieve the initial viewport values before applying the @viewport to
+ test. */
+ viewport.initialWidth = testElm.offsetWidth;
+ viewport.initialHeight = testElm.offsetHeight;
+ viewport.fontSize = parseInt(getComputedStyle(testElm, "").fontSize);
+
+ /* Enable the stylesheet that contains the @viewport to test. */
+ testStyleSheet.disabled = false;
+
+ /* Retrieve the actual viewport values for the test. */
+ viewport.actualWidth = testElm.offsetWidth;
+ viewport.actualHeight = testElm.offsetHeight;
+ viewport.zoom = viewport.initialWidth / window.innerWidth;
+
+ /* Check viewport values. */
+ test.step(function(){
+ assert_true(viewport.actualWidth >= viewport.actualHeight);
+ });
+
+ /* Finished. Show the results. */
+ test.done();
+ testStyleSheet.disabled = true;
+ document.getElementById("log").style.display = "block";
+ }
+ ]]></script>
+ </head>
+ <body>
+ <div id="test">
+ <div id="log"></div>
+ </div>
+ </body>
+</html>
Modified: trunk/LayoutTests/platform/efl-wk1/TestExpectations (135729 => 135730)
--- trunk/LayoutTests/platform/efl-wk1/TestExpectations 2012-11-26 16:32:31 UTC (rev 135729)
+++ trunk/LayoutTests/platform/efl-wk1/TestExpectations 2012-11-26 16:37:38 UTC (rev 135730)
@@ -353,6 +353,9 @@
# EFL WK1 does not support the spellchecker feature
webkit.org/b/86633 editing/spelling [ Skip ]
+# DRT needs to support fixed layout.
+webkit.org/b/102517 css3/device-adapt/opera [ Skip ]
+
# Needs custom policy delegate enhancement to log DOM node info - EFL port is missing DOM node abstraction
webkit.org/b/87972 fast/loader/policy-delegate-action-hit-test-zoomed.html [ Failure ]
webkit.org/b/87972 fast/encoding/mailto-always-utf-8.html [ Failure ]
@@ -366,30 +369,6 @@
# DRT needs a setting for setShouldRespectImageOrientation
webkit.org/b/101210 fast/images/exif-orientation.html [ Failure ]
-# DRT needs to support fixed layout.
-webkit.org/b/102517 css3/device-adapt/opera/cascading-001.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/cascading-002.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/cascading-003.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/cascading-004.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-001.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-004.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-005.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-006.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-007.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-008.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-009.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-010.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-011.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-013.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-014.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-015.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-016.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-017.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/constrain-020.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/syntax-001.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/syntax-002.xhtml [ Failure ]
-webkit.org/b/102517 css3/device-adapt/opera/syntax-003.xhtml [ Failure ]
-
# ESC key does not cancel context menu in EFL port
Bug(EFL) editing/selection/5354455-1.html [ Failure ]
Modified: trunk/LayoutTests/platform/efl-wk2/TestExpectations (135729 => 135730)
--- trunk/LayoutTests/platform/efl-wk2/TestExpectations 2012-11-26 16:32:31 UTC (rev 135729)
+++ trunk/LayoutTests/platform/efl-wk2/TestExpectations 2012-11-26 16:37:38 UTC (rev 135730)
@@ -254,6 +254,17 @@
webkit.org/b/99436 editing/selection/doubleclick-whitespace-img-crash.html [ Failure ]
webkit.org/b/99436 editing/selection/doubleclick-whitespace.html [ Failure ]
+# Window size is being reported as screen size.
+webkit.org/b/103127 css3/device-adapt/opera/constrain-021.xhtml [ Failure ]
+webkit.org/b/103127 css3/device-adapt/opera/constrain-022.xhtml [ Failure ]
+
+# Page client doesn't react to orientation changes from CSS Viewport rules.
+webkit.org/b/103130 css3/device-adapt/opera/orientation-001.xhtml [ Failure ]
+
+# Issue with viewport width and relative units.
+webkit.org/b/102922 css3/device-adapt/opera/constrain-006.xhtml [ Failure ]
+webkit.org/b/102922 css3/device-adapt/opera/constrain-007.xhtml [ Failure ]
+
# Text input controller needs selectedRange implementation
webkit.org/b/99438 editing/selection/mixed-editability-10.html [ Failure ]
@@ -301,6 +312,3 @@
webkit.org/b/102216 inspector-protocol/nmi-webaudio.html [ Failure ]
webkit.org/b/102216 inspector-protocol/nmi-webaudio-leak-test.html [ Failure ]
-
-webkit.org/b/102922 css3/device-adapt/opera/constrain-006.xhtml [ Failure ]
-webkit.org/b/102922 css3/device-adapt/opera/constrain-007.xhtml [ Failure ]