- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 04 Feb 2009 15:04:22 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/properties/css1 In directory hutz:/tmp/cvs-serv21833/org/w3c/css/properties/css1 Modified Files: Css1Style.java Log Message: do not send warning about floated elements with no width when detecting a selector for an element with intrinsic width - see http://www.w3.org/Bugs/Public/show_bug.cgi?id=154 Index: Css1Style.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/css1/Css1Style.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Css1Style.java 3 Feb 2009 19:50:47 -0000 1.11 +++ Css1Style.java 4 Feb 2009 15:04:20 -0000 1.12 @@ -2565,9 +2565,14 @@ if (cssFloat != null) { if(cssWidth == null ) { - // TODO do NOT send warning if element in context - // is html, img, input, textarea, select, or object - warnings.addWarning(new Warning(cssFloat, "float-no-width", 2, ac)); + String selectorElement = selector.getElement(); + if ((selectorElement.equals("html")) || (selectorElement.equals("img")) || (selectorElement.equals("input")) + || (selectorElement.equals("object")) || (selectorElement.equals("textarea")) || (selectorElement.equals("select"))) { + } + else { + // for elements without intrinsic width, float needs a declared width + warnings.addWarning(new Warning(cssFloat, "float-no-width", 2, ac)); + } } }
Received on Wednesday, 4 February 2009 15:04:32 UTC