Bug 233561

Summary: [CSS2.1 Conformance] line-height of an empty inline element should influence the height of a line containing it
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-07 02:47:13 UTC
Version:            (using KDE 4.4.2)
OS:                Linux
Installed from:    Ubuntu Packages

Testcase
========

http://www.w3.org/Style/CSS/Test/CSS2.1/20100316/html4/empty-inline-003.htm

Expected results
================
There should be a wide bright green rectangle below with one "X" in it and there should be no red anywhere in the testcase page.

Actual results in Konqueror 4.4.2
=================================
There is a narrow bright green bar (1em [16px] tall) and a red rectangle (4em [64px] tall) visible.

Excerpt from CSS 2.1 spec
=========================
"
Empty inline elements generate empty inline boxes, but these boxes still have margins, padding, borders and a line height, and thus influence these calculations just like elements with content.
"
coming from 
CSS 2.1, section 10.8 Line height calculations: the 'line-height' and 'vertical-align' properties
http://www.w3.org/TR/CSS21/visudet.html#line-height

Test assertion
==============
The line-height of an empty inline element influences the height of a line containing it with some other content

Notes
=====
- Firefox 3.5.8 passes this test.
- Firefox's DOM inspector reports that div#test has a computed height of 80px while Konqueror's DOM Treeview reports that div#test has a computed height of 16px.
- div#test is supposed to mask, to overlap perfectly the red div#reference-overlapped-red
- KDE platform: 4.4.2; Qt: 4.6.2; Linux 2.6.31-19-generic here

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

regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2010-04-07 03:20:36 UTC
Firefox 3.6.3 and Internet Explorer 8 also pass this test.

Gérard
Comment 2 Gérard Talbot (no longer involved) 2012-01-13 06:04:00 UTC
Testcase
========

http://test.csswg.org/suites/css2.1/latest/html4/empty-inline-003.htm
Comment 3 Christoph Cullmann 2024-05-06 18:38:31 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