Bug 170755 - css background repeat-x ignored
Summary: css background repeat-x ignored
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
Keywords: testcase
Depends on:
Reported: 2008-09-09 18:04 UTC by Andrea Iacovitti
Modified: 2008-09-11 09:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

testcase (947 bytes, application/x-zip)
2008-09-09 18:05 UTC, Andrea Iacovitti
testcase2 (5.51 KB, application/x-zip)
2008-09-10 10:14 UTC, Andrea Iacovitti

Note You need to log in before you can comment on or make changes to this bug.
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.

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

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,
+    }
     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:
Comment 5 Andrea Iacovitti 2008-09-10 10:14:42 UTC
Created attachment 27345 [details]

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).

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