Bug 274534

Summary: [CSS 2.1 Conformance] border shorthand should only accept a maximum of 3 border subproperties
Product: [Applications] konqueror Reporter: Gérard Talbot (no longer involved) <browserbugs2>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: VERIFIED FIXED    
Severity: normal Keywords: testcase
Priority: NOR    
Version: 4.7.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.13.3
Sentry Crash Report:

Description Gérard Talbot (no longer involved) 2011-05-30 18:54:34 UTC
Version:           4.6.3 (using KDE 4.6.3) 
OS:                Linux

border: red solid 16px red;

is invalid, should be parsed as invalid and then rejected, ignored.

CSS validation report (CSS 2.1 profile) of the testcase:
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.gtalbot.org%2FBrowserBugsSection%2FKonqueror4Bugs%2Fshand-border-001.html&profile=css21&usermedium=all&warning=2&vextwarning=&lang=en


Reproducible: Always

Steps to Reproduce:
Testcase
--------

http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/shand-border-001.html

Actual Results:  
There is a wide red rectangle

Expected Results:  
There should be no red

This bug may be related to bug 189774 or is another external sign of bug 189774 or is another variation of bug 189774.

Firefox 4.0.1, Opera 11.11, Chrome 11.0.696.71 and IE9 pass this test.

Konqueror 4.6.3
KDE 4.6.3
Linux (i686) release 2.6.38-9-generic-pae
Qt 4.7.2
here.

regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2011-05-30 19:31:50 UTC
IE8 also passes this test

Gérard
Comment 2 Gérard Talbot (no longer involved) 2011-06-02 23:05:28 UTC
IE9 also passes this test.

Gérard
Comment 3 Gérard Talbot (no longer involved) 2011-09-23 18:20:04 UTC
Submitted to CSS 2.1 test suite:

http://test.csswg.org/suites/css2.1/nightly-unstable/html4/shand-border-001.htm

Gérard
Comment 4 Gérard Talbot (no longer involved) 2012-01-13 06:26:21 UTC
Konqueror 4.7.4 (KHTML rendering engine): CSS parser handling border shorthand

CONFIRMING
Comment 5 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 189774
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 6 Gérard Talbot (no longer involved) 2014-07-30 16:51:26 UTC
I am using now Konqueror 4.13.3 

Marking as VERIFIED and FIXED. Thank you Andrea!!

Gérard