Changeset 85935 in webkit


Ignore:
Timestamp:
May 6, 2011 1:17:21 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-05-06 Luke Macpherson <macpherson@chromium.org>

Reviewed by Eric Seidel.

Move burden of checking for BJustify box alignment into RenderStyle
https://bugs.webkit.org/show_bug.cgi?id=60246

No new tests added as no functionality changed.

  • css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove special-case logic checking for BJUSTIFY and use existing macro.
  • rendering/style/RenderStyle.h: (WebCore::InheritedFlags::setBoxAlign): Assert valid values are used.
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85933 r85935  
     12011-05-06  Luke Macpherson   <macpherson@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move burden of checking for BJustify box alignment into RenderStyle
     6        https://bugs.webkit.org/show_bug.cgi?id=60246
     7
     8        No new tests added as no functionality changed.
     9
     10        * css/CSSStyleSelector.cpp:
     11        (WebCore::CSSStyleSelector::applyProperty):
     12        Remove special-case logic checking for BJUSTIFY and use existing macro.
     13        * rendering/style/RenderStyle.h:
     14        (WebCore::InheritedFlags::setBoxAlign):
     15        Assert valid values are used.
     16
    1172011-05-06  Luke Macpherson   <macpherson@chromium.org>
    218
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r85933 r85935  
    48744874        return;
    48754875    case CSSPropertyWebkitBoxAlign:
    4876     {
    4877         HANDLE_INHERIT_AND_INITIAL(boxAlign, BoxAlign)
    4878         if (!primitiveValue)
    4879             return;
    4880         EBoxAlignment boxAlignment = *primitiveValue;
    4881         if (boxAlignment != BJUSTIFY)
    4882             m_style->setBoxAlign(boxAlignment);
    4883         return;
    4884     }
     4876        HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE(boxAlign, BoxAlign)
     4877        return;
    48854878    case CSSPropertySrc: // Only used in @font-face rules.
    48864879        return;
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r85603 r85935  
    10271027    void setOpacity(float f) { SET_VAR(rareNonInheritedData, opacity, f); }
    10281028    void setAppearance(ControlPart a) { SET_VAR(rareNonInheritedData, m_appearance, a); }
    1029     void setBoxAlign(EBoxAlignment a) { SET_VAR(rareNonInheritedData.access()->flexibleBox, align, a); }
     1029    // For valid values of box-align see http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/#alignment
     1030    void setBoxAlign(EBoxAlignment a) { ASSERT(a == BSTRETCH || a == BSTART || a == BCENTER || a == BEND || a == BBASELINE); SET_VAR(rareNonInheritedData.access()->flexibleBox, align, a); }
    10301031    void setBoxDirection(EBoxDirection d) { inherited_flags._box_direction = d; }
    10311032    void setBoxFlex(float f) { SET_VAR(rareNonInheritedData.access()->flexibleBox, flex, f); }
Note: See TracChangeset for help on using the changeset viewer.