Bug 139667

Summary: Incorrect order of arguments in initial-letter property
Product: WebKit Reporter: Dave Cramer <dauwhe>
Component: CSSAssignee: Sylvain Galineau <galineau>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, galineau, hyatt, jonlee, mmaxfield, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar, WebExposed
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.8   
Attachments:
Description Flags
fix.patch none

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.