Bug 197455 - [CSS 2.1 Conformance] :first-letter pseudo-element should include punctuation character following first letter
Summary: [CSS 2.1 Conformance] :first-letter pseudo-element should include punctuation...
Status: VERIFIED FIXED
Alias: None
Product: konqueror
Classification: Unclassified
Component: khtml (show other bugs)
Version: 4.2.4
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords: reproducible, testcase
Depends on:
Blocks:
 
Reported: 2009-06-22 03:58 UTC by Gérard Talbot (no longer involved)
Modified: 2011-09-01 23:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.7


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-06-22 03:58:47 UTC
Version:            (using KDE 4.2.4)
OS:                Linux
Installed from:    Ubuntu Packages

Testcase:
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/first-letter-punctuation-char.html

Expected results:
', ", . and , punctuation characters in the test should be green and rather big

Actual results in Konqueror 4.2.4:
', ", . and , punctuation characters in the test are black and normal size

Reference
=========
"
Punctuation (i.e, characters defined in Unicode [UNICODE] in the "open" (Ps), "close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po) punctuation classes), that precedes or follows the first letter should be included
"
coming from CSS 2.1, section 5.12.2 The :first-letter pseudo-element
http://www.w3.org/TR/CSS21/selector.html#first-letter

regards, Gérard
Comment 1 Gérard Talbot (no longer involved) 2011-01-23 21:36:16 UTC
There are right now about 400 testcases in the CSS 2.1 test suite (RC5; built on january 11th 2011) with regards to :first-letter pseudo-element and punctuation characters.

The first one is
http://test.csswg.org/suites/css2.1/20110111/html4/first-letter-punctuation-001.htm (RC5)
and the last one is
http://test.csswg.org/suites/css2.1/20110111/html4/first-letter-punctuation-412.htm (RC5)

For a list of them:
http://test.csswg.org/suites/css2.1/20110111/html4/chapter-5.html#s5.12.2

Latest stable available version of Konqueror (4.5.5) fails all of those testcases.

Gérard
Comment 2 Maksim Orlovich 2011-01-23 23:41:33 UTC
Looks like the test here:
http://lxr.kde.org/source/KDE/kdelibs/khtml/rendering/render_block.cpp#248
needs to be adjusted.. Though seems like isPunct doesn't quite match what CSS wants either. grmble.
Comment 3 Maksim Orlovich 2011-02-21 18:38:14 UTC
Working on a fix..
Comment 4 Maksim Orlovich 2011-03-18 02:33:09 UTC
Git commit 3309a1dcf1667d28e2d532e9017d770978c3b734 by Maks Orlovich.
Committed on 21/02/2011 at 18:39.
Pushed by orlovich into branch 'master'.

Include trailing punctuation in :first-letter

(Also follow CSS's definition of punctuation)

BUG: 197455

M  +13   -3    khtml/rendering/render_block.cpp     

http://commits.kde.org/kdelibs/3309a1dcf1667d28e2d532e9017d770978c3b734
Comment 5 Gérard Talbot (no longer involved) 2011-04-29 02:16:31 UTC
Maksim,

I'm using Konqueror 4.6.2 under KDE 4.6.2
uname -r returns 2.6.38-8-generic-pae
kde4-config -version returns Qt : 4.7.2
with Kubuntu 11.04 Natty Narwhal
and when I try
http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/first-letter-punctuation-char.html
I still get actual results.

So, is this actually fixed?

regards, Gérard
Comment 6 Maksim Orlovich 2011-04-29 13:17:48 UTC
Yes, but I didn't backport it to 4.6.x
Comment 7 Gérard Talbot (no longer involved) 2011-07-29 18:19:42 UTC
Testcases now pass in Konqueror 4.7.0, under KDE 4.7.0 platform, Qt 4.7.2, Linux 2.6.38-11-generic-pae, i686 (32bits).

Marking as VERIFIED

Gérard
Comment 8 Gérard Talbot (no longer involved) 2011-09-01 23:57:08 UTC
This bug report as described and as edited has been fixed. 

Nevertheless, 12 testcases still fail in Konqueror 4.7.0 (with KHTML rendering engine) because, I believe, the 12 characters involved are not listed, defined as "open" (Ps) and "close" (Pe) punctuation:


aegean word separator line punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-334.htm

aegean word separator dot punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-335.htm

ugaritic word divider punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-336.htm

kharoshthi punctuation dot punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-337.htm

kharoshthi punctuation small circle punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-338.htm

kharoshthi punctuation circle punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-339.htm

kharoshthi punctuation crescent bar punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-340.htm

kharoshthi punctuation mangalam punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-341.htm

kharoshthi punctuation lotus punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-342.htm

kharoshthi punctuation danda punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-343.htm

kharoshthi punctuation double danda punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-344.htm

kharoshthi punctuation lines punctuation character :
http://test.csswg.org/suites/css2.1/latest/html4/first-letter-punctuation-345.htm

So, another bug report should be opened, created for such 12 punctuation characters.

I am using
KDE Platform Version: 4.7.0
Konqueror version: 4.7.0 (KHTML rendering engine)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-11-generic-pae i686 (32bits)
Distribution: Kubuntu 11.04
here.

Gérard