Changeset 116166 in webkit


Ignore:
Timestamp:
May 4, 2012 2:15:13 PM (12 years ago)
Author:
tony@chromium.org
Message:

The computed style of flex-item-align should never be auto.
https://bugs.webkit.org/show_bug.cgi?id=85656

Reviewed by Ojan Vafai.

Source/WebCore:

If the node lacks a parent and flex-item-align is auto, we should
return stretch. This was recently clarified in the spec.

New testcase in css3/flexbox/css-properties.html.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

LayoutTests:

  • css3/flexbox/css-properties-expected.txt:
  • css3/flexbox/css-properties.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116165 r116166  
     12012-05-04  Tony Chang  <tony@chromium.org>
     2
     3        The computed style of flex-item-align should never be auto.
     4        https://bugs.webkit.org/show_bug.cgi?id=85656
     5
     6        Reviewed by Ojan Vafai.
     7
     8        * css3/flexbox/css-properties-expected.txt:
     9        * css3/flexbox/css-properties.html:
     10
    1112012-05-03  Jer Noble  <jer.noble@apple.com>
    212
  • trunk/LayoutTests/css3/flexbox/css-properties-expected.txt

    r111342 r116166  
    3131PASS flexbox.style.webkitFlexItemAlign is ""
    3232PASS window.getComputedStyle(flexbox, null).webkitFlexItemAlign is "stretch"
     33PASS window.getComputedStyle(document.documentElement, null).webkitFlexItemAlign is "stretch"
    3334PASS flexbox.style.webkitFlexItemAlign is ""
    3435PASS flexbox.style.webkitFlexItemAlign is "auto"
  • trunk/LayoutTests/css3/flexbox/css-properties.html

    r114699 r116166  
    8383// The initial value is 'stretch'.
    8484shouldBeEqualToString('window.getComputedStyle(flexbox, null).webkitFlexItemAlign', 'stretch');
     85shouldBeEqualToString('window.getComputedStyle(document.documentElement, null).webkitFlexItemAlign', 'stretch');
    8586
    8687flexbox.style.webkitFlexItemAlign = 'foo';
  • trunk/Source/WebCore/ChangeLog

    r116160 r116166  
     12012-05-04  Tony Chang  <tony@chromium.org>
     2
     3        The computed style of flex-item-align should never be auto.
     4        https://bugs.webkit.org/show_bug.cgi?id=85656
     5
     6        Reviewed by Ojan Vafai.
     7
     8        If the node lacks a parent and flex-item-align is auto, we should
     9        return stretch. This was recently clarified in the spec.
     10
     11        New testcase in css3/flexbox/css-properties.html.
     12
     13        * css/CSSComputedStyleDeclaration.cpp:
     14        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
     15
    1162012-05-04  Christophe Dumez  <christophe.dumez@intel.com>
    217
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r115573 r116166  
    16421642            return cssValuePool().createValue(style->flexAlign());
    16431643        case CSSPropertyWebkitFlexItemAlign:
    1644             if (style->flexItemAlign() == AlignAuto && m_node && m_node->parentNode() && m_node->parentNode()->computedStyle())
    1645                 return cssValuePool().createValue(m_node->parentNode()->computedStyle()->flexAlign());
     1644            if (style->flexItemAlign() == AlignAuto) {
     1645                if (m_node && m_node->parentNode() && m_node->parentNode()->computedStyle())
     1646                    return cssValuePool().createValue(m_node->parentNode()->computedStyle()->flexAlign());
     1647                return cssValuePool().createValue(AlignStretch);
     1648            }
    16461649            return cssValuePool().createValue(style->flexItemAlign());
    16471650        case CSSPropertyWebkitFlexDirection:
Note: See TracChangeset for help on using the changeset viewer.