[Webkit-unassigned] [Bug 130457] New: Improper styling of pseudo element first-letter

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 19 10:33:15 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=130457

           Summary: Improper styling of pseudo element first-letter
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mario at webkit.org
                CC: simon.fraser at apple.com, commit-queue at webkit.org,
                    ryuan.choi at gmail.com, gyuyoung.kim at webkit.org,
                    glenn at skynav.com, dchris at gmail.com,
                    kondapallykalyan at gmail.com,
                    esprehn+autocc at chromium.org,
                    sergio.correia at openbossa.org



WebKit Commit Bot <commit-queue at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |commit-queue at webkit.org,
                   |                            |dchris at gmail.com,
                   |                            |esprehn+autocc at chromium.org
                   |                            |, glenn at skynav.com,
                   |                            |gyuyoung.kim at webkit.org,
                   |                            |kondapallykalyan at gmail.com,
                   |                            |ryuan.choi at gmail.com,
                   |                            |sergio.correia at openbossa.or
                   |                            |g


This bug is tracks down an issue as reported for Blink as issue 340688[1]. Description of the issue as reported there is as follows:

What steps will reproduce the problem?
1. Create an element who matches the the following letter-space-ampersand-space.  Other variations probably exist, but this is how I encountered it.
2. Style the element using pseudo-class first-letter.
In this case:
.subcat-categories h3{
    font-size:12px;
    font-weight:bold;color:#ae2525;
}
.subcat-categories h3:first-letter{font-size:135%;}

What is the expected result?
The first letter should be styled with the pseudo class.

What happens instead?
The first letter AND the ampersand are styled with the pseudo class.


[1] https://code.google.com/p/chromium/issues/detail?id=340688
[2] https://src.chromium.org/viewvc/blink?revision=169547&view=revision
[3] trac.webkit.org/wiki/CSS21Results

--- Comment #1 from Mario Sanchez Prada <mario at webkit.org>  2014-03-19 10:30:25 PST ---
Created an attachment (id=227193)
 --> (https://bugs.webkit.org/attachment.cgi?id=227193&action=review)
Patch proposal

Attaching the patch as backported from Blink. Please notice that I needed to backport also some additional code (from blink revision r159205[1]) in order to make sure that the behaviour is consistent, because otherwise we would get weird effects when no first-letter would be created at all. Specifically about patch from Blink r159205, I haven't backported the changes for the tests added/modified there because:

- editing/selection/extend-by-word-002.html: it's written in a different way in WebKit and, apparently, it does not need updating (at least for the GTK port)
- fast/css-generated-content/quote-first-letter.html: didn't need updating at all
- fast/css-generated-content/empty-first-letter-with-columns-crash.html: WebKit was not crashing before nor after applying this patch, so there's no point on adding I guess

So, that's why I only took the code from r159205 :)

Last, I run the CSS2.1 test suite manually [2] and I'm happy to say this patch did NOT introduce any regression in the first-letter* tests there, so please review.

Thanks

[1] https://src.chromium.org/viewvc/blink?revision=159205&view=revision
[2] http://trac.webkit.org/wiki/CSS21Results

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list