Ignore:
Timestamp:
Mar 5, 2013, 8:27:54 AM (13 years ago)
Author:
jchaffraix@webkit.org
Message:

[CSS Grid Layout] Add parsing for grid-{end|after}
https://bugs.webkit.org/show_bug.cgi?id=111372

Reviewed by Tony Chang.

Source/WebCore:

Test: fast/css-grid-layout/grid-item-end-after-get-set.html

This change adds the proper support for grid-{end|after}. It doesn't update
grid-{row|column} to be a shorthand for both grid-{before|start} and grid-{after|end}
though.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Added the new properties to our known properties. Also added
support for getComputedStyle.

  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
Added parsing for the new properties.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isInheritedProperty):
The new properties are not inherited.

  • css/CSSPropertyNames.in:

Added the new properties.

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::applyProperty):
Added code to handle applying them to our style.

  • rendering/style/RenderStyle.h:
  • rendering/style/StyleGridItemData.cpp:

(WebCore::StyleGridItemData::StyleGridItemData):

  • rendering/style/StyleGridItemData.h:

(WebCore::StyleGridItemData::operator==):
(StyleGridItemData):
Updated our representation to store the new properties.

LayoutTests:

  • fast/css-grid-layout/grid-item-end-after-get-set-expected.txt: Added.
  • fast/css-grid-layout/grid-item-end-after-get-set.html: Added.

Note that some of the test fails as we don't treat grid-{row|column} as a shorthand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/style/StyleGridItemData.h

    r144681 r144762  
    4747    bool operator==(const StyleGridItemData& o) const
    4848    {
    49         return m_gridStart == o.m_gridStart && m_gridBefore == o.m_gridBefore;
     49        return m_gridStart == o.m_gridStart && m_gridEnd == o.m_gridEnd
     50            && m_gridBefore == o.m_gridBefore && m_gridAfter == o.m_gridAfter;
    5051    }
    5152
     
    5657
    5758    GridPosition m_gridStart;
     59    GridPosition m_gridEnd;
    5860    GridPosition m_gridBefore;
     61    GridPosition m_gridAfter;
    5962
    6063private:
Note: See TracChangeset for help on using the changeset viewer.