<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20277</bug_id>
          
          <creation_ts>2012-12-06 17:19:59 +0000</creation_ts>
          <short_desc>Incorrect implementation of CssBackgroundPositionValue.toString()</short_desc>
          <delta_ts>2012-12-13 08:53:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSSValidator</product>
          <component>Parser</component>
          <version>CSS Validator</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hannes Erven">hannes+w3cbugs</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79567</commentid>
    <comment_count>0</comment_count>
    <who name="Hannes Erven">hannes+w3cbugs</who>
    <bug_when>2012-12-06 17:19:59 +0000</bug_when>
    <thetext>The current code swaps the horizonal and vertical offsets in its toString() output.


Here&apos;s a patch for the file org/w3c/css/properties/css3/CssBackgroundPosition.java :

Index: CssBackgroundPosition.java
===================================================================
--- CssBackgroundPosition.java	(revision 8290)
+++ CssBackgroundPosition.java	(working copy)
@@ -439,21 +439,22 @@
 
         public String toString() {
             StringBuilder sb = new StringBuilder();
+            if (horizontal != null) {
+                sb.append(horizontal);
+                if (horizontal_offset != null) {
+                    sb.append(&apos; &apos;).append(horizontal_offset);
+                }
+                if (vertical != null) {
+                    sb.append(&apos; &apos;);
+                }
+            }
+
             if (vertical != null) {
                 sb.append(vertical);
                 if (vertical_offset != null) {
                     sb.append(&apos; &apos;).append(vertical_offset);
                 }
-                if (horizontal != null) {
-                    sb.append(&apos; &apos;);
-                }
             }
-            if (horizontal != null) {
-                sb.append(horizontal);
-                if (horizontal_offset != null) {
-                    sb.append(&apos; &apos;).append(horizontal_offset);
-                }
-            }
             return sb.toString();
         }
     }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80069</commentid>
    <comment_count>1</comment_count>
    <who name="Yves Lafon">ylafon</who>
    <bug_when>2012-12-13 08:53:47 +0000</bug_when>
    <thetext>Fixed by removing the inner class definition (it was not necessary, and even worse buggy as you pointed out).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>