Bug 76103

Summary: Implement font-variant-ligatures: {no-}common-ligatures
Product: WebKit Reporter: mitz
Component: TextAssignee: mitz
Status: RESOLVED FIXED    
Severity: Normal CC: macpherson, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Parse font-variant-ligatures and respect the common-ligatures value keywords sam: review+

Description mitz 2012-01-11 14:31:30 PST
<rdar://problem/10679035>

The “font-variant-ligatures” property is currently defined in <http://dev.w3.org/cvsweb/~checkout~/csswg/css3-fonts/Fonts.html?rev=1.68;content-type=text%2Fhtml#font-variant-ligatures-prop> to include the value keywords “normal’, “common-ligatures” and “no-common-ligatures” among others. “normal” maps to the current behavior, which lets the “text-rendering” property control ligatures, “common-ligatures” should enable basic ligatures, and “no-common-ligatures” should disable basic ligatures.
Comment 1 mitz 2012-01-11 15:03:54 PST
Created attachment 122101 [details]
Parse font-variant-ligatures and respect the common-ligatures value keywords
Comment 2 Sam Weinig 2012-01-11 17:20:45 PST
Comment on attachment 122101 [details]
Parse font-variant-ligatures and respect the common-ligatures value keywords

View in context: https://bugs.webkit.org/attachment.cgi?id=122101&action=review

> Source/WebCore/css/CSSStyleApplyProperty.cpp:759
> +        if (value->isPrimitiveValue())
> +            ASSERT(static_cast<CSSPrimitiveValue*>(value)->getIdent() == CSSValueNormal);

This seems like it should go in the else block within an !ASSERTIONS_DISABLED.

> Source/WebCore/platform/graphics/FontDescription.h:196
> +    unsigned m_commonLigaturesState : 3;
> +    unsigned m_discretionaryLigaturesState : 3;
> +    unsigned m_historicalLigaturesState : 3;

Do you really need three bits here?
Comment 3 mitz 2012-01-11 20:10:57 PST
Committed <http://trac.webkit.org/r104786>.