Bug 139667 - Incorrect order of arguments in initial-letter property
Summary: Incorrect order of arguments in initial-letter property
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.8
: P2 Normal
Assignee: Sylvain Galineau
URL:
Keywords: InRadar, WebExposed
Depends on:
Blocks:
 
Reported: 2014-12-15 20:01 PST by Dave Cramer
Modified: 2015-06-16 11:14 PDT (History)
7 users (show)

See Also:


Attachments
fix.patch (6.55 KB, patch)
2015-02-10 16:39 PST, Sylvain Galineau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Cramer 2014-12-15 20:01:00 PST
The order of arguments in the implementation of the initial-letter property does not match the current spec (http://dev.w3.org/csswg/css-inline/#sizing-drop-initials). The first argument should be size, and the second argument should be the number of lines that the initial letter sinks. This was incorrect in earlier versions of the editor's draft, due to an error by said editor. For example,

p::first-letter { -webkit-initial-letter: 3 1 } 

should produce a pure "raised cap," the size of a 3-line drop cap but sitting on the first text baseline.
Comment 1 Sylvain Galineau 2015-02-10 16:39:45 PST
Created attachment 246350 [details]
fix.patch

Swapped the arguments in CSSParser.cpp. Updated the layout tests.
Comment 2 Darin Adler 2015-02-11 08:32:12 PST
Comment on attachment 246350 [details]
fix.patch

I think we shipped this in multiple web browser versions. Maybe we should swap the order only when removing the WebKit prefix and keep the backwards version for a while with the vendor prefix?
Comment 3 Jon Lee 2015-02-11 09:23:23 PST
(In reply to comment #2)
> Comment on attachment 246350 [details]
> fix.patch
> 
> I think we shipped this in multiple web browser versions. Maybe we should
> swap the order only when removing the WebKit prefix and keep the backwards
> version for a while with the vendor prefix?

We haven't shipped this. You might be confusing this with first-letter (see 136484).
Comment 4 Sylvain Galineau 2015-03-02 13:15:54 PST
Any additional work needed to land this patch?
Comment 5 Radar WebKit Bug Importer 2015-06-16 10:58:14 PDT
<rdar://problem/21404945>
Comment 6 WebKit Commit Bot 2015-06-16 10:58:59 PDT
Comment on attachment 246350 [details]
fix.patch

Clearing flags on attachment: 246350

Committed r185595: <http://trac.webkit.org/changeset/185595>
Comment 7 WebKit Commit Bot 2015-06-16 10:59:04 PDT
All reviewed patches have been landed.  Closing bug.