Bug 233899

Summary: [CSS 2.1 Conformance] width, min-width and max-width do not apply to table-row elements and to row groups elements (tbody, thead, tfoot)
Product: [Applications] konqueror Reporter: Gérard Talbot (no longer involved) <browserbugs2>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal Keywords: testcase
Priority: NOR    
Version: 4.7.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Gérard Talbot (no longer involved) 2010-04-10 00:16:47 UTC
Version:            (using KDE 4.4.2)
OS:                Linux
Installed from:    Ubuntu Packages

8 reduced self-explanatory testcases
====================================

Content width does not apply to tbody
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/tbody-width.html

Content width does not apply to thead
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/thead-width.html

Content width does not apply to tfoot
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/tfoot-width.html

Content width does not apply to tr
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/tr-width.html

The 'width' property does not apply to elements with 'display' set to 'table-row-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/width-applies-to-001.htm

The 'width' property does not apply to elements with 'display' set to 'table-header-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/width-applies-to-002.htm

The 'width' property does not apply to elements with 'display' set to 'table-footer-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/width-applies-to-003.htm

The 'width' property does not apply to elements with 'display' set to 'table-row'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/width-applies-to-004.htm

Expected results
================
There should be no red in the 8 pages' testcases, not even a thin red line in each and all of the 8 testcases.

Actual results in Konqueror 4.4.2
=================================
There is a thin red line in each and all of the 8 testcases.

Description
===========
Width, min-width, max-width should not apply to tbody, thead, tfoot and tr elements.

Bug entry
=========
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/#bug28

Relevant quotes from CSS 2.1
============================

Section 10.2 Content width: the 'width' property
"
Applies to:  	all elements but non-replaced inline elements, table rows, and row groups 
"
http://www.w3.org/TR/CSS21/visudet.html#the-width-property

Section 10.4 Minimum and maximum widths: 'min-width' and 'max-width'
"
Initial:  	0  (min-width)
Initial:  	none (max-width)
Applies to:  	all elements but non-replaced inline elements, table rows, and row groups 
"
http://www.w3.org/TR/CSS21/visudet.html#min-max-widths

Notes
=====
- Internet Explorer 8, Firefox 3.5.8, Firefox 3.6.3, Opera 10.10, Opera 10.51, Safari 4.0.5 all pass each and all of these 8 testcases.
- When examining computed values for width and min-width for  with Konqueror's DOM TreeView tool, we can see that several table have min-width == 1px or min-width == 5px when CSS 2.1 states that initial value for min-width is 0px.
- I have no idea from where such thin red line comes from actually. I tried setting border-spacing to 0 to no avail.
- Konqueror 4.4.2, Qt 4.6.2, Linux 2.6.31-19-generic here.

regards, Gérard Talbot
Comment 1 Gérard Talbot (no longer involved) 2010-04-10 01:07:08 UTC
All testcases related to min-width and max-width and <tbody>, <thead>, <tfoot>, <tr> also demonstrate Konqueror 4.4.2 failures:

min-width testcases
===================

The 'min-width' property does not apply to elements with 'display' set to 'table-row-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/min-width-applies-to-001.htm

The 'min-width' property does not apply to elements with 'display' set to 'table-header-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/min-width-applies-to-002.htm

The 'min-width' property does not apply to elements with 'display' set to 'table-footer-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/min-width-applies-to-003.htm

The 'min-width' property does not apply to elements with 'display' set to 'table-row'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/min-width-applies-to-004.htm

max-width testcases
===================

The 'max-width' property does not apply to elements with 'display' set to 'table-row-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/max-width-applies-to-001.htm

The 'max-width' property does not apply to elements with 'display' set to 'table-header-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/max-width-applies-to-002.htm

The 'max-width' property does not apply to elements with 'display' set to 'table-footer-group'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/max-width-applies-to-003.htm

The 'max-width' property does not apply to elements with 'display' set to 'table-row'.
http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/max-width-applies-to-004.htm

regards, Gérard
Comment 2 Gérard Talbot (no longer involved) 2012-01-13 06:14:15 UTC
The latest version of the width testcases
=========================================

The 'width' property does not apply to elements with 'display' set to
'table-row-group'.
http://test.csswg.org/suites/css2.1/latest/html4/width-applies-to-001.htm

The 'width' property does not apply to elements with 'display' set to
'table-header-group'.
http://test.csswg.org/suites/css2.1/latest/html4/width-applies-to-002.htm

The 'width' property does not apply to elements with 'display' set to
'table-footer-group'.
http://test.csswg.org/suites/css2.1/latest/html4/width-applies-to-003.htm

The 'width' property does not apply to elements with 'display' set to
'table-row'.
http://test.csswg.org/suites/css2.1/latest/html4/width-applies-to-004.htm


The latest version of the min-width testcases
=============================================

The 'min-width' property does not apply to elements with 'display' set to
'table-row-group'.
http://test.csswg.org/suites/css2.1/latest/html4/min-width-applies-to-001.htm

The 'min-width' property does not apply to elements with 'display' set to
'table-header-group'.
http://test.csswg.org/suites/css2.1/latest/html4/min-width-applies-to-002.htm

The 'min-width' property does not apply to elements with 'display' set to
'table-footer-group'.
http://test.csswg.org/suites/css2.1/latest/html4/min-width-applies-to-003.htm

The 'min-width' property does not apply to elements with 'display' set to
'table-row'.
http://test.csswg.org/suites/css2.1/latest/html4/min-width-applies-to-004.htm

The latest version of the max-width testcases
=============================================

The 'max-width' property does not apply to elements with 'display' set to
'table-row-group'.
http://test.csswg.org/suites/css2.1/latest/html4/max-width-applies-to-001.htm

The 'max-width' property does not apply to elements with 'display' set to
'table-header-group'.
http://test.csswg.org/suites/css2.1/latest/html4/max-width-applies-to-002.htm

The 'max-width' property does not apply to elements with 'display' set to
'table-footer-group'.
http://test.csswg.org/suites/css2.1/latest/html4/max-width-applies-to-003.htm

The 'max-width' property does not apply to elements with 'display' set to
'table-row'.
http://test.csswg.org/suites/css2.1/latest/html4/max-width-applies-to-004.htm

CONFIRMING
Comment 3 Christoph Cullmann 2024-05-06 18:38:45 UTC
Dear user,

KHTML (and KJS) was a long time more or less unmaintained and got removed in KF6.

Please migrate to use a QWebEngine based HTML component.

We will do no further fixes or improvements to the KF5 branches of these components beside important security fixes.

For security issues, please see:

https://kde.org/info/security/

Sorry that we did not fix this issue during the life-time of KHTML.

Greetings
Christoph Cullmann