Bug 66701 - Add CSS parsing of -webkit-flex-pack
Summary: Add CSS parsing of -webkit-flex-pack
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tony Chang
URL:
Keywords:
Depends on:
Blocks: 62048
  Show dependency treegraph
 
Reported: 2011-08-22 12:28 PDT by Tony Chang
Modified: 2011-08-22 15:20 PDT (History)
4 users (show)

See Also:


Attachments
Patch (17.40 KB, patch)
2011-08-22 12:29 PDT, Tony Chang
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>