Bug 98542

Summary: Mis-rendering of :first-line property - links lose properties
Product: [Applications] konqueror Reporter: Brian S. Stephan <bssteph>
Component: khtml rendererAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kdebugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: test case

Description Brian S. Stephan 2005-02-04 05:01:54 UTC
Version:            (using KDE KDE 3.3.91)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.4.3 20050110 (Gentoo Linux 3.4.3.20050110, ssp-3.4.3.20050110-0, pie-8.7.7) 
OS:                Linux

When doing text renders in CSS via CSS3's :first-line selector, KHTML trips up on a link. For me, it only renders the first word in a link with the given text modification (in my case, font-variant: small-caps).

I have two screenshots as an example:

Bad behavior in Konq:
http://bssteph.irtonline.org/images/first-line-konqueror-201.png
Good behavior in Firefox (Win):
http://bssteph.irtonline.org/images/ss-200.jpg
Another example in Konq:
http://bssteph.irtonline.org/images/first-line-konqueror-2-202.png

As you can see, the majority of the link (the red part) isn't small-caps'ed in Konq. Actually in the first test, not even the whole first word is -- punctuation seems to end the rendering too. The second Konq image shows the first word working right.

IMO the link text should be rendered as Firefox does it.

Here is the CSS for the effect you see:

.entry p:first-child:first-line {
   font-size: 140%;
   font-variant: small-caps;
   line-height: 135%;
}
Comment 1 Brian S. Stephan 2005-02-04 05:06:58 UTC
Oh, I should point out that normally links with >1 word can handle small-caps fine, I just tested to make sure.
Comment 2 Brian S. Stephan 2005-02-04 05:35:57 UTC
Actually, damn, I'm dumb. Konq doesn't get it right no matter what:
http://bssteph.irtonline.org/images/first-line-konqueror-3-204.png
Comment 3 Allan Sandfeld 2005-04-02 20:45:17 UTC
Created attachment 10484 [details]
test case
Comment 4 FiNeX 2008-04-20 12:58:31 UTC
Tested on konqueror 4 trunk (r797319. It render the testcase like konqueror (and like expected).

The bug could be closed.
Comment 5 Linus Östberg 2008-05-14 17:21:29 UTC
Works fine in trunk for me too (r607699).