Bug 189774 - [CSS 2.1 Conformance] Malformed border shorthand declarations
Summary: [CSS 2.1 Conformance] Malformed border shorthand declarations
Status: VERIFIED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.13.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL: http://www.gtalbot.org/BrowserBugsSec...
Keywords: reproducible, testcase
Depends on:
Blocks:
 
Reported: 2009-04-16 04:13 UTC by Gérard Talbot (no longer involved)
Modified: 2014-07-30 16:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.13.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gérard Talbot (no longer involved) 2009-04-16 04:13:58 UTC
border shorthand syntax:
Value: [ <border-width> || <border-style> || <'border-top-color'> ] | inherit
http://www.w3.org/TR/CSS21/box.html#propdef-border

 A bar (|) separates two or more alternatives: exactly one of them must occur.
 A double bar (||) separates two or more options: one or more of them must occur, in any order. 
http://www.w3.org/TR/CSS21/about.html#value-defs

The problem occurs when the border shorthand has 2 or 3 border-style values; then, Konqueror should reject the rule.

Self-explanatory testcase which fail in Konqueror 4.2.0:

http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/MalformedBorderShorthandDeclarations.html

Notes:
- Firefox 3.0.8 build 2009032609, Opera 9.64 build 10487, Safari 4.0 beta build 528.16 and Internet Explorer 8 final release build 18702 all pass both tests
- I have not checked the testcase with a more recent Konqueror version.

Regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2009-05-21 06:11:01 UTC
Konqueror 4.2.3 in Kubuntu 9.04 (Linux 2.6.28-11-generic) still fails the provided testcase.

regards, Gérard
Comment 2 Matthew Dawson 2009-06-21 00:48:43 UTC
Still Reproducible with SVN snapshot r984032.
Comment 3 Andrea Iacovitti 2014-06-10 16:30:10 UTC
Git commit ca11720e0179897fe1bec6af7a5e2e4305aba4ad by Andrea Iacovitti.
Committed on 10/06/2014 at 16:06.
Pushed by aiacovitti into branch 'KDE/4.13'.

Rework parseShortHand() to be able to reject shorthand in case:
- number of values is greater than the maximum expected
- there is more than one value that apply to the same subproperty

When rejected clean up from valid subproperties added while parsing.
Related: bug 301588, bug 274534
FIXED-IN: 4.13.3

M  +41   -13   khtml/css/cssparser.cpp
M  +1    -1    khtml/css/cssparser.h

http://commits.kde.org/kdelibs/ca11720e0179897fe1bec6af7a5e2e4305aba4ad
Comment 4 Gérard Talbot (no longer involved) 2014-07-30 16:50:03 UTC
I am using now Konqueror 4.13.3 

Marking as VERIFIED and FIXED. Thank you Andrea!!

Gérard