Bug 363378

Summary: css background shorthand parser error
Product: [Applications] konqueror Reporter: Andrea Iacovitti <aiacovitti>
Component: khtml parsingAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mpyne
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: testcase

Description Andrea Iacovitti 2016-05-21 18:45:25 UTC
Example:    {background: none left left red no-repeat;}
The declaration is invalid because it specifies two horizontal value for background-position (left left) then should be discarded. 

Reproducible: Always
Comment 1 Andrea Iacovitti 2016-05-21 18:57:21 UTC
Created attachment 99122 [details]
testcase
Comment 2 Andrea Iacovitti 2016-05-21 19:22:45 UTC
Git commit 96bb3aca276144cf1eb9bae74ac9c47973b8d69b by Andrea Iacovitti.
Committed on 21/05/2016 at 19:09.
Pushed by aiacovitti into branch 'KDE/4.14'.

Fix parsing background-position in shorthand declaration.
If two values are specified advance the value list pointer only if the entire property is valid.

M  +10   -8    khtml/css/cssparser.cpp

http://commits.kde.org/kdelibs/96bb3aca276144cf1eb9bae74ac9c47973b8d69b
Comment 3 Michael Pyne 2016-05-22 23:41:04 UTC
Can you double-check that this change it doesn't break other valid CSS? For instance the test case given in Mozilla's developer notes for background-position breaks even after I revert my proposed changes to the CSS parser. See https://developer.mozilla.org/en-US/docs/Web/CSS/background-position, the output was working in previous KHTML commits.
Comment 4 Michael Pyne 2016-05-22 23:45:27 UTC
Actually never mind. I'm not sure what seemed to break this but it's happening before your changes were merged in so I don't think it's that.