Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 129669 CSS text-transform is ignored on first-line pseudo-element
Starred by 28 users Reported by cedric.z...@gmail.com, May 24 2012 Back to list
Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment
Chrome Version       : 21.0.1145.0
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 4.x:
IE 7/8/9:

What steps will reproduce the problem?
1.Style a :first-line pseudo-element with text-transform: uppercase
2. View it
3.

What is the expected result?
The first-line element should be uppercase

What happens instead?
it is mixed case

Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1145.0 Safari/537.1



 
Comment 1 by tkent@chromium.org, May 25 2012
Labels: -Area-Undefined Area-WebKit WebKit-CSS
Project Member Comment 2 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-WebKit -WebKit-CSS Cr-Content Cr-Content-CSS
Project Member Comment 3 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 4 by bugdroid1@chromium.org, Apr 6 2013
Labels: -Cr-Content-CSS Cr-Blink-CSS
Comment 5 by Deleted ...@, Apr 19 2013
Bug still exists.
Still no fix for this? It's a pretty old bug, would be nice to see a fix soon. I don't see this corrected in the latest Canary.
Comment 7 by wi...@a8c.com, Jan 11 2014
Bug on the WebKit tracker since 2005: https://bugs.webkit.org/show_bug.cgi?id=3409

Here is a page with various test cases for showing how unbelievably broken :first-line handling is in WebKit and Blink: http://somadesign.ca/demos/typography-tests/

This level of brokenness means that Blink is not CSS 3 selectors compliant. The spec even uses text-transform: uppercase as its prime example: http://www.w3.org/TR/css3-selectors/#first-line

Please, it's awful that something this basic to typgography is still broken in 2014.
As I was just notified because of a new comment here, I packed a simple CodePen together, which does just the same, as in the W3C spec referenced by #7:

http://codepen.io/anon/pen/sIval

This is still broken.
Labels: -OS-Windows OS-All
Status: Untriaged
Switched but to "untriaged". Here's a reduction:

<!DOCTYPE html>
should be uppercase
<br>should be lowercase
<style>body::first-line { text-transform: uppercase; }</style>
Would love a fix for this one of these days...
Comment 11 by Deleted ...@, Sep 23 2014
A fix would be much appreciated.
Comment 12 by r...@igalia.com, Jan 16 2015
Issue 142827 has been merged into this issue.
Comment 13 by r...@igalia.com, Jan 16 2015
Issue 392467 has been merged into this issue.
Comment 14 by r...@igalia.com, Jan 16 2015
Labels: Cr-Blink-Layout
Why is this untriaged? It is a blatant spec violation, and has been in WebKit since 2005 (10 freaking YEARS!!!).
Cc: dsinclair@chromium.org
Status: Available
I can mark it available but I don't know if anyone will look at it any time soon. If you'd like to help out I'd be happy to review any patches or provide direction.

If memory serves you'd probably need to look into the LayoutText class. That has logic to deal with transforms on text. It's possible it's missing a check for first-line pseudo styles. Or, it maybe something else.

Either way, if you'd like to look into it please contact me and I'll see if I can point you in the right direction.
Comment 17 by Deleted ...@, Mar 5 2015
Kinda stunned this still isn't fixed...
Comment 18 by Deleted ...@, May 12 2015
...
Can we fucken fix that please?
Comment 20 by Deleted ...@, Jul 14 2015
Yeah guys this is embarrassing. Kind of a common use case. Please take another look
Labels: Hotlist-Interop
Here is a clicky of the test case from #9: http://jsfiddle.net/xw69mLky/

Works in IE 11 and Firefox 39 on Windows 7. Chrome 43 still fails.
Comment 22 Deleted
Comment 23 Deleted
Seems like it would be an easy fix, why hasn't it been implemented yet? I know most users won't notice it, but its a frustrating bug for web developers.
Labels: -Cr-Blink
Labels: -Cr-Blink-CSS
Cc: -dsinclair@chromium.org drott@chromium.org e...@chromium.org
Labels: -Pri-2 Pri-3
Project Member Comment 29 by bugdroid1@chromium.org, Sep 6
Status: Fixed
Project Member Comment 31 by bugdroid1@chromium.org, Sep 8
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b918a399a2af11b95df12949815b20c7b2b2a482

commit b918a399a2af11b95df12949815b20c7b2b2a482
Author: wfh <wfh@chromium.org>
Date: Thu Sep 08 01:38:40 2016

Revert of Apply first-line transform-text style (patchset #1 id:1 of https://codereview.chromium.org/2305833002/ )

Reason for revert:
see crbug.com/644733

Original issue's description:
> Apply first-line transform-text style
> BUG=129669
>
> Committed: https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658
> Cr-Commit-Position: refs/heads/master@{#416608}

TBR=eae@chromium.org,robhogan@gmail.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=129669, 644733 

Review-Url: https://codereview.chromium.org/2317303002
Cr-Commit-Position: refs/heads/master@{#417154}

[delete] https://crrev.com/05fc08750bd6c061013232ed4879b4e73f47e94b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[delete] https://crrev.com/05fc08750bd6c061013232ed4879b4e73f47e94b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Project Member Comment 32 by bugdroid1@chromium.org, Sep 8
Labels: merge-merged-2854
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b918a399a2af11b95df12949815b20c7b2b2a482

commit b918a399a2af11b95df12949815b20c7b2b2a482
Author: wfh <wfh@chromium.org>
Date: Thu Sep 08 01:38:40 2016

Revert of Apply first-line transform-text style (patchset #1 id:1 of https://codereview.chromium.org/2305833002/ )

Reason for revert:
see crbug.com/644733

Original issue's description:
> Apply first-line transform-text style
> BUG=129669
>
> Committed: https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658
> Cr-Commit-Position: refs/heads/master@{#416608}

TBR=eae@chromium.org,robhogan@gmail.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=129669, 644733 

Review-Url: https://codereview.chromium.org/2317303002
Cr-Commit-Position: refs/heads/master@{#417154}

[delete] https://crrev.com/05fc08750bd6c061013232ed4879b4e73f47e94b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[delete] https://crrev.com/05fc08750bd6c061013232ed4879b4e73f47e94b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/b918a399a2af11b95df12949815b20c7b2b2a482/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Project Member Comment 33 by bugdroid1@chromium.org, Sep 12
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa

commit 25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa
Author: robhogan <robhogan@gmail.com>
Date: Mon Sep 12 20:42:02 2016

Apply first-line transform-text style

A second go at https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658

BUG=129669, 644733 

Review-Url: https://codereview.chromium.org/2331793002
Cr-Commit-Position: refs/heads/master@{#418032}

[add] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[add] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Project Member Comment 34 by bugdroid1@chromium.org, Sep 14
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bb4ee8efe0d1e24a11a9f397a480908012b31acc

commit bb4ee8efe0d1e24a11a9f397a480908012b31acc
Author: robhogan <robhogan@gmail.com>
Date: Wed Sep 14 00:16:02 2016

Revert of Apply first-line transform-text style (patchset #3 id:40001 of https://codereview.chromium.org/2331793002/ )

Reason for revert:
Still hitting clusterfuzz.

Original issue's description:
> Apply first-line transform-text style
>
> A second go at https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658
>
> BUG=129669, 644733 
>
> Committed: https://crrev.com/25c2cadce2d4a92f4f0f8b669fed2d097a6b7afa
> Cr-Commit-Position: refs/heads/master@{#418032}

TBR=eae@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=129669, 644733 

Review-Url: https://codereview.chromium.org/2337133004
Cr-Commit-Position: refs/heads/master@{#418432}

[delete] https://crrev.com/4aabce05f776aa8c56e1d208f9c27423ea90690b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[delete] https://crrev.com/4aabce05f776aa8c56e1d208f9c27423ea90690b/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/bb4ee8efe0d1e24a11a9f397a480908012b31acc/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Project Member Comment 35 by bugdroid1@chromium.org, Sep 15
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e17f77cab60f321629c438796cc14fae3f2fa7dc

commit e17f77cab60f321629c438796cc14fae3f2fa7dc
Author: robhogan <robhogan@gmail.com>
Date: Thu Sep 15 12:07:33 2016

Apply first-line transform-text style

A third go at https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658

Although I still can't reproduce the clusterfuzz reports locally I'm confident
this will cure the specific crashes because I'm no longer transforming the
first line's text unless it has a distinct first-line style (:/).

BUG=129669, 644733 

Review-Url: https://codereview.chromium.org/2339683004
Cr-Commit-Position: refs/heads/master@{#418840}

[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-capitalize-expected.txt
[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-capitalize.html
[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-lowercase-expected.txt
[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-lowercase.html
[add] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Project Member Comment 36 by bugdroid1@chromium.org, Sep 26
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d20ce6090a7fd879d433d9d8df0e50100914352b

commit d20ce6090a7fd879d433d9d8df0e50100914352b
Author: robhogan <robhogan@gmail.com>
Date: Mon Sep 26 20:59:13 2016

Revert of Apply first-line transform-text style (patchset #1 id:1 of https://codereview.chromium.org/2339683004/ )

Reason for revert:
This is still causing asan crashes. The crashes seem specific to cases where the transformed text is longer than the original text. I think the Iterator object is keeping a pointer to the text and the reallocation required fit the new text throws it out.

Original issue's description:
> Apply first-line transform-text style
>
> A third go at https://crrev.com/3c64df1fc98aa06eabfc18d1f5c2f2b0aec1a658
>
> Although I still can't reproduce the clusterfuzz reports locally I'm confident
> this will cure the specific crashes because I'm no longer transforming the
> first line's text unless it has a distinct first-line style (:/).
>
> BUG=129669, 644733 
>
> Committed: https://crrev.com/e17f77cab60f321629c438796cc14fae3f2fa7dc
> Cr-Commit-Position: refs/heads/master@{#418840}

TBR=eae@chromium.org
BUG=129669, 644733 , 649810 

Review-Url: https://codereview.chromium.org/2369113002
Cr-Commit-Position: refs/heads/master@{#420988}

[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-capitalize-expected.txt
[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-capitalize.html
[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-expected.txt
[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-lowercase-expected.txt
[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line-lowercase.html
[delete] https://crrev.com/8c8b27dda56ab54ec9028335ff0328aae0530feb/third_party/WebKit/LayoutTests/fast/text/transform-text-first-line.html
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/LayoutText.cpp
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/LayoutText.h
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/api/LineLayoutText.h
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/line/InlineFlowBox.cpp
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
[modify] https://crrev.com/d20ce6090a7fd879d433d9d8df0e50100914352b/third_party/WebKit/Source/core/layout/line/InlineTextBox.h

Either Chrome is lying to me about being up-to-date, the latest version of Windows 10 nullifies the fix, or this is still an issue.
Owner: robho...@gmail.com
Status: Assigned
Unfortunately, the issue was supposed to be fixed, but the fix itself causes crashes, so it was reverted (a few times already) but the status of the issue was not updated to reflect that.

Sorry, this is not fixed yet.
Owner: robhogan@chromium.org
Sign in to add a comment