Bug 170755

Summary: css background repeat-x ignored
Product: [Applications] konqueror Reporter: Andrea Iacovitti <aiacovitti>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: maksim
Priority: NOR Keywords: testcase
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: testcase
testcase2

Description Andrea Iacovitti 2008-09-09 18:04:28 UTC
Version:            (using KDE 4.1.1)
OS:                Linux
Installed from:    SuSE RPMs

As in subject. Does work with FF and IE.
I'm pretty sure this is due to svn revision 851859 because it has worked before appling it (on kde 3.5.9).
Attached the testcase.

thanks,
Andrea.
Comment 1 Andrea Iacovitti 2008-09-09 18:05:38 UTC
Created attachment 27337 [details]
testcase

zipped testcase folder
Comment 2 Maksim Orlovich 2008-09-09 19:04:33 UTC
Thanks for the great report + testcase. The below should fix it... It wasn't accepting some shorthands with only a single background position specified since parseBackgroundPositionXY was setting position kind to non-keyword even when it wasn't a position. Oops.

Index: css/cssparser.cpp
===================================================================
--- css/cssparser.cpp	(revision 854506)
+++ css/cssparser.cpp	(working copy)
@@ -1500,10 +1503,12 @@
         }
         return new CSSPrimitiveValueImpl(percent, CSSPrimitiveValue::CSS_PERCENTAGE);
     }
-    kindOut = BgPos_NonKW;
-    if (validUnit(valueList->current(), FPercent|FLength, strict))
+
+    if (validUnit(valueList->current(), FPercent|FLength, strict)) {
+        kindOut = BgPos_NonKW;
         return new CSSPrimitiveValueImpl(valueList->current()->fValue,
                                          (CSSPrimitiveValue::UnitTypes)valueList->current()->unit);
+    }
 
     return 0;
 }
Comment 3 Maksim Orlovich 2008-09-10 02:02:38 UTC
Fixed by: http://lists.kde.org/?l=kde-commits&m=122100486929474&w=2

Thanks again for the great report.
Comment 4 Maksim Orlovich 2008-09-10 02:10:01 UTC
.. and regression test in:
http://lists.kde.org/?l=kde-commits&m=122100511129736&w=2
Comment 5 Andrea Iacovitti 2008-09-10 10:14:42 UTC
Created attachment 27345 [details]
testcase2

Thank you for the quick fix!
I applied it and works fine (only on kde 3.5.9, i have no way to test on kde 4.1).
I have a second test case that worked before revision 851859 and the last patch doesn't fix; Konqueror show blank page, not the case of IE,FF. 
Sorry not able to test on kde 4.1.1 (...at the moment).

Cheers
Comment 6 Andrea Iacovitti 2008-09-11 09:54:42 UTC
Forget last comment: my mistake.
Sorry for that.