From: <rb...@us...> - 2013-07-10 17:51:49
|
Revision: 8386 http://sourceforge.net/p/htmlunit/code/8386 Author: rbri Date: 2013-07-10 17:51:45 +0000 (Wed, 10 Jul 2013) Log Message: ----------- more defaults for the display property fixed Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java 2013-07-10 17:36:47 UTC (rev 8385) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclaration.java 2013-07-10 17:51:45 UTC (rev 8386) @@ -212,6 +212,10 @@ map.put("TR", "table-row"); map.put("TRACK", "inline"); map.put("TT", "inline"); + map.put("U", "inline"); + map.put("VAR", "inline"); + map.put("VIDEO", "inline"); + map.put("WBR", "inline"); DEFAULT_DISPLAYS = Collections.unmodifiableMap(map); map = new HashMap<String, String>(map); Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java 2013-07-10 17:36:47 UTC (rev 8385) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/css/ComputedCSSStyleDeclarationTest.java 2013-07-10 17:51:45 UTC (rev 8386) @@ -909,6 +909,43 @@ * @throws Exception if an error occurs */ @Test + @Alerts(DEFAULT = { "inline", "block", "inline", "inline", "inline" }) + public void defaultDisplayValues_UVW() throws Exception { + final String html = "<!DOCTYPE HTML>\n<html><body>\n" + + " <p>\n" + + " <u id='u'></u>\n" + + " <wbr id='wbr'></wbr>\n" + + " </p> \n" + + + " <ul id='ul'>\n" + + " <li></li>\n" + + " </ul>\n" + + + " <var id='var'></var>\n" + + " <video id='video'></video>\n" + + + " <script id='script'>\n" + + " function x(id) {\n" + + " var e = document.getElementById(id);\n" + + " var disp = e.currentStyle ? e.currentStyle.display : window.getComputedStyle(e, '').display;\n" + + " alert(disp);\n" + + " }\n" + + " </script>\n" + + " <script>\n" + + " x('u');\n" + + " x('ul');\n" + + " x('var');\n" + + " x('video');\n" + + " x('wbr');\n" + + " </script>\n" + + "</body></html>"; + loadPageWithAlerts2(html); + } + + /** + * @throws Exception if an error occurs + */ + @Test @Alerts(IE = { "transparent", "red", "white" }, FF = { "transparent", "rgb(255, 0, 0)", "rgb(255, 255, 255)" }) public void backgroundColor() throws Exception { |