Bug 66701

Summary: Add CSS parsing of -webkit-flex-pack
Product: WebKit Reporter: Tony Chang <tony>
Component: New BugsAssignee: Tony Chang <tony>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, hyatt, macpherson, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 62048    
Attachments:
Description Flags
Patch eric: review+

Description Tony Chang 2011-08-22 12:28:56 PDT
Add CSS parsing of -webkit-flex-pack
Comment 1 Tony Chang 2011-08-22 12:29:43 PDT
Created attachment 104715 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-08-22 14:22:35 PDT
Comment on attachment 104715 [details]
Patch

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

> Source/WebCore/css/CSSPrimitiveValueMappings.h:1056
> +template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EFlexPack e)
> +    : m_type(CSS_IDENT)
> +    , m_hasCachedCSSText(false)
> +{
> +    switch (e) {
> +    case PackStart:
> +        m_value.ident = CSSValueStart;
> +        break;
> +    case PackEnd:
> +        m_value.ident = CSSValueEnd;
> +        break;
> +    case PackCenter:
> +        m_value.ident = CSSValueCenter;
> +        break;
> +    case PackJustify:
> +        m_value.ident = CSSValueJustify;
> +        break;
> +    }
> +}

I feel a little sad inside every time I read one of these.  More code could be shared between all of these.  I guess I should pick on Luke.

> Source/WebCore/rendering/style/RenderStyleConstants.h:169
> +// New CSS3 Flexbox Properties

The New isn't needed.  They won't be New forever. :)

> Source/WebCore/rendering/style/StyleFlexibleBoxData.h:54
> +    unsigned m_flexPack : 2; // EFlexPack

Bleh.  public members.  Bleh.
Comment 3 Tony Chang 2011-08-22 15:20:27 PDT
Committed r93551: <http://trac.webkit.org/changeset/93551>