Bug 363378 - css background shorthand parser error
Summary: css background shorthand parser error
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml parsing (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-21 18:45 UTC by Andrea Iacovitti
Modified: 2016-05-22 23:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
testcase (205 bytes, text/html)
2016-05-21 18:57 UTC, Andrea Iacovitti
Details

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