Summary: | CSS1: Safari ignores "text-transform" attribute in "first-line" CSS rules | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Dave Hyatt <hyatt> | ||||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | NEW --- | ||||||||
Severity: | Normal | CC: | adele, aditya.vm, adunkman, ahmad.saleem792, ap, bnortham, ddkilzer, emacemac7, eric, esprehn, foreverundecided, gwynne, ian, ibrahim.dimeji, Jeongeun.kim, johnmaisey, joone, kaiuhl, karlcow, kyle.rove, lucas, mmaxfield, nhackett1+webkit, nickshanks, oliver, phiw2, pravind.2k4, robert, simon.fraser, tang, tigerhawkvok, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | BrowserCompat, GoodFirstBug, HasReduction, InRadar | ||||||
Version: | 412 | ||||||||
Hardware: | PC | ||||||||
OS: | All | ||||||||
Bug Depends on: | |||||||||
Bug Blocks: | 9610, 34753 | ||||||||
Attachments: |
|
Description
Dave Hyatt
2005-06-10 01:20:16 PDT
Not sure I can attach the test case since it has someone's content, maybe someone should just make a simple new case. Apple Bug: 3574595 Created attachment 2544 [details]
Simple testcase 1
Here's a simple testcase that shows the bug using build 412 with a WebKit built
from CVS on 6/22/05.
*** Bug 9244 has been marked as a duplicate of this bug. *** Is this bug still active? No movement in the last year? It is still apparent in the current build (419.3). It is still active. This bug is really hard to fix the right way, since text-transform would have to be completely re-architected in order to fix it. Right now text-transform is just done on an entire DOM text node. text-transform has to be rewritten in order to transform individual text line boxes instead. Might be possible to come up with a hack that works though. This bug has been inactive for two years—any plans to fix this? Still broken in 40777 This bug is pretty hard to fix. text-transform actually affects metrics, so applying this to first-line creates huge complications in the engine. Effectively the current implementation of text-transform has to just be thrown out and completely rewritten from scratch. calcPrefWidths would need to transform the text character by character as it measured while it was looking at the first line. findNextLineBreak would need to do the same. An effective way of doing this would be to actually pass a transform constant all the way down into the Font code and have it do the transformation when measuring and rendering. This would be somewhat similar to how synthesized small-caps works today. *** Bug 27829 has been marked as a duplicate of this bug. *** Confirmed to exist in Safari 4.0.3, and Google Chrome 4.0.206.1. I realize it's hard to change - but it *is* a 5 year old bug now. Am I correct in assuming that the root cause of this bug also causes :first-line pseudo-elements to be rendered in the browser's default font (it appears) when a text-transform is applied? *** Bug 47451 has been marked as a duplicate of this bug. *** Any plans to fix this bug? it's upsetting to learn that this bug remains unfix after 5 years++ It seems to be same as "[Bug 34753] CSS 2.1: first-line-selector-008.htm test fails". I've uploaded patch on '34753' and I'm waiting for review. Is there any improvement yet? how can I follow up.. I need to do a presentation on Wednesday for this bug report.. I confirm that this is still a bug in Safari 5.0.6 and Chrome 18.0.1, nearly seven years later. Given that Firefox does this correctly and presumably you can look at their backend (Gecko being FOSS), how are they doing it? *** Bug 84993 has been marked as a duplicate of this bug. *** Just another vote for this bug Hi Dave, I had tried to fix this issue in https://bugs.webkit.org/show_bug.cgi?id=34753 (first line decoration and transform) The approach was not correct... Wanted to know if its possible to work on this bug ? Yep, just observed this today in Chrome 28.0.1500.95 (Official Build 213514). Works correctly in Safari 9. Created attachment 267835 [details]
Test case screenshot
Comment on attachment 267835 [details] Test case screenshot First line text-transform:uppercase still doesn't work in Safari 9.0.2 for me (see test 2 in attached screenshot, from the test case uploaded in comment 3), though font-weight:bold does. Having said that I don't think this bug is as important to me personally as it was a year or two ago. You're right, I mis-read the testcase (it could be clearer). 16 years later, this still doesn't appear to work in Safari 14.0.3 (16610.4.3.1.4)... List of https://drafts.csswg.org/css-pseudo/#first-line-styling * all font properties (see [CSS-FONTS-4]) * the color and opacity properties (see [CSS-COLOR-4]) * all background properties (see [CSS-BACKGROUNDS-4]) * any typesetting properties that apply to inline elements (see [CSS-TEXT-3]) * all text decoration properties (see [CSS-TEXT-DECOR-3]) * the ruby-position property (see [CSS-RUBY-1]) * any inline layout properties that apply to inline elements (see [CSS-INLINE-3]) * any other properties defined to apply to ::first-line by their respective specifications User agents may apply other properties as well except for the following excluded properties: * writing-mode * direction * text-orientation And text-transform is part of https://drafts.csswg.org/css-text-3/#text-transform-property > * any typesetting properties that apply to inline elements (see [CSS-TEXT-3]) |