Changeset 101288 in webkit


Ignore:
Timestamp:
Nov 28, 2011 2:59:22 PM (12 years ago)
Author:
jchaffraix@webkit.org
Message:

Add limited parsing support for grid-columns and grid-rows
https://bugs.webkit.org/show_bug.cgi?id=72531

Reviewed by Tony Chang.

Source/WebCore:

Test: fast/css-grid-layout/grid-columns-rows-get-set.html

Added support for:
<track-list> := <length> | <percentage> | 'none' | 'auto'

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • rendering/style/StyleAllInOne.cpp:

Updated our build systems.

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::valueForGridTrackList):
Helper function to convert our RenderStyle information to a proper CSSValue.
It doesn't do much now but it will be expanded as we add more support.

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Call the previous
function.

  • css/CSSParser.h:
  • css/CSSParser.cpp:

(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseGridTrackList):
CSS parsing part of this change. Pretty simple for now.

  • css/CSSPropertyNames.in:

Added -webkit-grid-columns and -webkit-grid-rows.

  • css/CSSProperty.cpp:

(WebCore::CSSProperty::isInheritedProperty):

  • css/CSSStyleApplyProperty.cpp:

(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):

  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::applyProperty):
Style application plumbing.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::RenderStyle):
(WebCore::RenderStyle::diff):
This change is required for later when we add layout for our grid.

  • rendering/style/RenderStyle.h:

(WebCore::InheritedFlags::gridColumns):
(WebCore::InheritedFlags::gridRows):
(WebCore::InheritedFlags::setGridColumns):
(WebCore::InheritedFlags::setGridRows):
(WebCore::InheritedFlags::initialGridColumns):
(WebCore::InheritedFlags::initialGridRows):
Getters / Setters and initial values.

  • rendering/style/StyleGridData.cpp: Added.

(WebCore::StyleGridData::StyleGridData):

  • rendering/style/StyleGridData.h: Added.

(WebCore::StyleGridData::create):
(WebCore::StyleGridData::copy):
(WebCore::StyleGridData::operator==):
(WebCore::StyleGridData::operator!=):
This class holds the grid element information. For now pretty simple
shell that will be used for the rest of the support.

  • rendering/style/StyleRareNonInheritedData.cpp:

(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):

  • rendering/style/StyleRareNonInheritedData.h:

Added StyleGridElementData to StyleRareNonInheritedData.

LayoutTests:

Test our currently supported grammar.

  • fast/css-grid-layout/grid-columns-rows-get-set.html: Added.
  • fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Added.
  • fast/css-grid-layout/grid-columns-rows-get-set-expected.txt: Added.
Location:
trunk
Files:
5 added
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r101287 r101288  
     12011-11-28  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Add limited parsing support for grid-columns and grid-rows
     4        https://bugs.webkit.org/show_bug.cgi?id=72531
     5
     6        Reviewed by Tony Chang.
     7
     8        Test our currently supported grammar.
     9
     10        * fast/css-grid-layout/grid-columns-rows-get-set.html: Added.
     11        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Added.
     12        * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt: Added.
     13
    1142011-11-28  Sheriff Bot  <webkit.review.bot@gmail.com>
    215
  • trunk/Source/WebCore/CMakeLists.txt

    r101257 r101288  
    13281328    rendering/style/StyleFlexibleBoxData.cpp
    13291329    rendering/style/StyleGeneratedImage.cpp
     1330    rendering/style/StyleGridData.cpp
    13301331    rendering/style/StyleInheritedData.cpp
    13311332    rendering/style/StyleMarqueeData.cpp
  • trunk/Source/WebCore/ChangeLog

    r101286 r101288  
     12011-11-28  Julien Chaffraix  <jchaffraix@webkit.org>
     2
     3        Add limited parsing support for grid-columns and grid-rows
     4        https://bugs.webkit.org/show_bug.cgi?id=72531
     5
     6        Reviewed by Tony Chang.
     7
     8        Test: fast/css-grid-layout/grid-columns-rows-get-set.html
     9
     10        Added support for:
     11        <track-list> := <length> | <percentage> | 'none' | 'auto'
     12
     13        * CMakeLists.txt:
     14        * GNUmakefile.list.am:
     15        * Target.pri:
     16        * WebCore.gypi:
     17        * WebCore.vcproj/WebCore.vcproj:
     18        * WebCore.xcodeproj/project.pbxproj:
     19        * rendering/style/StyleAllInOne.cpp:
     20        Updated our build systems.
     21
     22        * css/CSSComputedStyleDeclaration.cpp:
     23        (WebCore::valueForGridTrackList):
     24        Helper function to convert our RenderStyle information to a proper CSSValue.
     25        It doesn't do much now but it will be expanded as we add more support.
     26
     27        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Call the previous
     28        function.
     29
     30        * css/CSSParser.h:
     31        * css/CSSParser.cpp:
     32        (WebCore::CSSParser::parseValue):
     33        (WebCore::CSSParser::parseGridTrackList):
     34        CSS parsing part of this change. Pretty simple for now.
     35
     36        * css/CSSPropertyNames.in:
     37        Added -webkit-grid-columns and -webkit-grid-rows.
     38
     39        * css/CSSProperty.cpp:
     40        (WebCore::CSSProperty::isInheritedProperty):
     41        * css/CSSStyleApplyProperty.cpp:
     42        (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
     43        * css/CSSStyleSelector.cpp:
     44        (WebCore::CSSStyleSelector::applyProperty):
     45        Style application plumbing.
     46
     47        * rendering/style/RenderStyle.cpp:
     48        (WebCore::RenderStyle::RenderStyle):
     49        (WebCore::RenderStyle::diff):
     50        This change is required for later when we add layout for our grid.
     51
     52        * rendering/style/RenderStyle.h:
     53        (WebCore::InheritedFlags::gridColumns):
     54        (WebCore::InheritedFlags::gridRows):
     55        (WebCore::InheritedFlags::setGridColumns):
     56        (WebCore::InheritedFlags::setGridRows):
     57        (WebCore::InheritedFlags::initialGridColumns):
     58        (WebCore::InheritedFlags::initialGridRows):
     59        Getters / Setters and initial values.
     60
     61        * rendering/style/StyleGridData.cpp: Added.
     62        (WebCore::StyleGridData::StyleGridData):
     63        * rendering/style/StyleGridData.h: Added.
     64        (WebCore::StyleGridData::create):
     65        (WebCore::StyleGridData::copy):
     66        (WebCore::StyleGridData::operator==):
     67        (WebCore::StyleGridData::operator!=):
     68        This class holds the grid element information. For now pretty simple
     69        shell that will be used for the rest of the support.
     70
     71        * rendering/style/StyleRareNonInheritedData.cpp:
     72        (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
     73        (WebCore::StyleRareNonInheritedData::operator==):
     74        * rendering/style/StyleRareNonInheritedData.h:
     75        Added StyleGridElementData to StyleRareNonInheritedData.
     76
    1772011-11-28  Noel Gordon  <noel.gordon@gmail.com>
    278
  • trunk/Source/WebCore/GNUmakefile.list.am

    r101270 r101288  
    33013301        Source/WebCore/rendering/style/StyleGeneratedImage.cpp \
    33023302        Source/WebCore/rendering/style/StyleGeneratedImage.h \
     3303        Source/WebCore/rendering/style/StyleGridData.cpp \
     3304        Source/WebCore/rendering/style/StyleGridData.h \
    33033305        Source/WebCore/rendering/style/StyleImage.h \
    33043306        Source/WebCore/rendering/style/StyleInheritedData.cpp \
  • trunk/Source/WebCore/Target.pri

    r101262 r101288  
    12641264    rendering/style/StyleFlexibleBoxData.cpp \
    12651265    rendering/style/StyleGeneratedImage.cpp \
     1266    rendering/style/StyleGridData.cpp \
    12661267    rendering/style/StyleInheritedData.cpp \
    12671268    rendering/style/StyleMarqueeData.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r101257 r101288  
    954954            'rendering/style/StyleFlexibleBoxData.h',
    955955            'rendering/style/StyleGeneratedImage.h',
     956            'rendering/style/StyleGridData.h',
    956957            'rendering/style/StyleImage.h',
    957958            'rendering/style/StyleInheritedData.h',
     
    47734774            'rendering/style/StyleFlexibleBoxData.cpp',
    47744775            'rendering/style/StyleGeneratedImage.cpp',
     4776            'rendering/style/StyleGridData.cpp',
    47754777            'rendering/style/StyleInheritedData.cpp',
    47764778            'rendering/style/StyleMarqueeData.cpp',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r101257 r101288  
    4077240772                                </File>
    4077340773                                <File
     40774                                        RelativePath="..\rendering\style\StyleGridData.cpp"
     40775                                        >
     40776                                        <FileConfiguration
     40777                                                Name="Debug|Win32"
     40778                                                ExcludedFromBuild="true"
     40779                                                >
     40780                                                <Tool
     40781                                                        Name="VCCLCompilerTool"
     40782                                                />
     40783                                        </FileConfiguration>
     40784                                        <FileConfiguration
     40785                                                Name="Release|Win32"
     40786                                                ExcludedFromBuild="true"
     40787                                                >
     40788                                                <Tool
     40789                                                        Name="VCCLCompilerTool"
     40790                                                />
     40791                                        </FileConfiguration>
     40792                                        <FileConfiguration
     40793                                                Name="Debug_Cairo_CFLite|Win32"
     40794                                                ExcludedFromBuild="true"
     40795                                                >
     40796                                                <Tool
     40797                                                        Name="VCCLCompilerTool"
     40798                                                />
     40799                                        </FileConfiguration>
     40800                                        <FileConfiguration
     40801                                                Name="Release_Cairo_CFLite|Win32"
     40802                                                ExcludedFromBuild="true"
     40803                                                >
     40804                                                <Tool
     40805                                                        Name="VCCLCompilerTool"
     40806                                                />
     40807                                        </FileConfiguration>
     40808                                        <FileConfiguration
     40809                                                Name="Debug_All|Win32"
     40810                                                ExcludedFromBuild="true"
     40811                                                >
     40812                                                <Tool
     40813                                                        Name="VCCLCompilerTool"
     40814                                                />
     40815                                        </FileConfiguration>
     40816                                        <FileConfiguration
     40817                                                Name="Production|Win32"
     40818                                                ExcludedFromBuild="true"
     40819                                                >
     40820                                                <Tool
     40821                                                        Name="VCCLCompilerTool"
     40822                                                />
     40823                                        </FileConfiguration>
     40824                                </File>
     40825                                <File
     40826                                        RelativePath="..\rendering\style\StyleGridData.h"
     40827                                        >
     40828                                </File>
     40829                                <File
    4077440830                                        RelativePath="..\rendering\style\StyleImage.h"
    4077540831                                        >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r101257 r101288  
    33993399                A0EE0DF7144F825500F80B0D /* WebGLDebugShaders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */; };
    34003400                A0EE0DF8144F825500F80B0D /* WebGLDebugShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */; };
     3401                A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A10DC76814747BAB005E2471 /* StyleGridData.cpp */; };
     3402                A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DC76914747BAB005E2471 /* StyleGridData.h */; settings = {ATTRIBUTES = (Private, ); }; };
    34013403                A120ACA413F998CA00FE4AC7 /* LayoutRepainter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */; };
    34023404                A12538D413F9B60A00024754 /* LayoutRepainter.h in Headers */ = {isa = PBXBuildFile; fileRef = A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1062110623                A0EE0DF3144F825500F80B0D /* WebGLDebugShaders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebGLDebugShaders.cpp; path = canvas/WebGLDebugShaders.cpp; sourceTree = "<group>"; };
    1062210624                A0EE0DF4144F825500F80B0D /* WebGLDebugShaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLDebugShaders.h; path = canvas/WebGLDebugShaders.h; sourceTree = "<group>"; };
     10625                A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleGridData.cpp; path = style/StyleGridData.cpp; sourceTree = "<group>"; };
     10626                A10DC76914747BAB005E2471 /* StyleGridData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleGridData.h; path = style/StyleGridData.h; sourceTree = "<group>"; };
    1062310627                A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutRepainter.h; sourceTree = "<group>"; };
    1062410628                A120ACA113F9984600FE4AC7 /* LayoutRepainter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutRepainter.cpp; sourceTree = "<group>"; };
     
    1983119835                        isa = PBXGroup;
    1983219836                        children = (
     19837                                A10DC76814747BAB005E2471 /* StyleGridData.cpp */,
     19838                                A10DC76914747BAB005E2471 /* StyleGridData.h */,
    1983319839                                5038BE2D1472AD230095E0D1 /* StyleCachedShader.cpp */,
    1983419840                                5038BE2E1472AD230095E0D1 /* StyleCachedShader.h */,
     
    2479524801                                033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
    2479624802                                7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
     24803                                A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */,
    2479724804                        );
    2479824805                        runOnlyForDeploymentPostprocessing = 0;
     
    2767727684                                033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
    2767827685                                7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
     27686                                A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */,
    2767927687                        );
    2768027688                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r101275 r101288  
    221221    CSSPropertyWebkitFlexFlow,
    222222    CSSPropertyWebkitFontSmoothing,
     223#if ENABLE(CSS_GRID_LAYOUT)
     224    CSSPropertyWebkitGridColumns,
     225    CSSPropertyWebkitGridRows,
     226#endif
    223227    CSSPropertyWebkitHighlight,
    224228    CSSPropertyWebkitHyphenateCharacter,
     
    790794#endif
    791795
     796#if ENABLE(CSS_GRID_LAYOUT)
     797static PassRefPtr<CSSValue> valueForGridTrackList(const Length& trackLength, const RenderStyle* style, CSSPrimitiveValueCache* primitiveValueCache)
     798{
     799    if (trackLength.isPercent())
     800        return primitiveValueCache->createValue(trackLength);
     801    if (trackLength.isAuto())
     802        return primitiveValueCache->createIdentifierValue(CSSValueAuto);
     803    if (trackLength.isUndefined())
     804        return primitiveValueCache->createIdentifierValue(CSSValueNone);
     805    return zoomAdjustedPixelValue(trackLength.value(), style, primitiveValueCache);
     806}
     807#endif
     808
    792809static PassRefPtr<CSSValue> getDelayValue(const AnimationList* animList, CSSPrimitiveValueCache* primitiveValueCache)
    793810{
     
    14971514            return list.release();
    14981515        }
     1516#if ENABLE(CSS_GRID_LAYOUT)
     1517        case CSSPropertyWebkitGridColumns: {
     1518            Length gridColumns = style->gridColumns();
     1519            return valueForGridTrackList(gridColumns, style.get(), primitiveValueCache);
     1520        }
     1521        case CSSPropertyWebkitGridRows: {
     1522            Length gridRows = style->gridRows();
     1523            return valueForGridTrackList(gridRows, style.get(), primitiveValueCache);
     1524        }
     1525#endif
    14991526        case CSSPropertyHeight:
    15001527            if (renderer)
  • trunk/Source/WebCore/css/CSSParser.cpp

    r101078 r101288  
    17731773        return false;
    17741774    }
     1775#if ENABLE(CSS_GRID_LAYOUT)
     1776    case CSSPropertyWebkitGridColumns:
     1777    case CSSPropertyWebkitGridRows:
     1778        return parseGridTrackList(propId, important);
     1779#endif
    17751780    case CSSPropertyWebkitMarginCollapse: {
    17761781        const int properties[2] = { CSSPropertyWebkitMarginBeforeCollapse,
     
    35173522}
    35183523
     3524#if ENABLE(CSS_GRID_LAYOUT)
     3525bool CSSParser::parseGridTrackList(int propId, bool important)
     3526{
     3527    CSSParserValue* value = m_valueList->current();
     3528    if (value->id == CSSValueNone || value->id == CSSValueAuto) {
     3529        addProperty(propId, primitiveValueCache()->createIdentifierValue(value->id), important);
     3530        return true;
     3531    }
     3532
     3533    if (validUnit(value, FLength | FPercent, m_strict)) {
     3534        addProperty(propId, createPrimitiveNumericValue(value), important);
     3535        return true;
     3536    }
     3537    return false;
     3538}
     3539#endif
     3540
    35193541
    35203542
  • trunk/Source/WebCore/css/CSSParser.h

    r101048 r101288  
    126126    bool parseAnimationShorthand(bool important);
    127127
     128#if ENABLE(CSS_GRID_LAYOUT)
     129    bool parseGridTrackList(int propId, bool important);
     130#endif
     131
    128132    bool parseDashboardRegions(int propId, bool important);
    129133
  • trunk/Source/WebCore/css/CSSProperty.cpp

    r101078 r101288  
    562562    case CSSPropertyWebkitFlexFlow:
    563563    case CSSPropertyWebkitFontSizeDelta:
     564#if ENABLE(CSS_GRID_LAYOUT)
     565    case CSSPropertyWebkitGridColumns:
     566    case CSSPropertyWebkitGridRows:
     567#endif
    564568    case CSSPropertyWebkitLineClamp:
    565569    case CSSPropertyWebkitLogicalWidth:
  • trunk/Source/WebCore/css/CSSPropertyNames.in

    r101078 r101288  
    368368-webkit-tap-highlight-color
    369369#endif
    370 
     370#if defined(ENABLE_CSS_GRID_LAYOUT) && ENABLE_CSS_GRID_LAYOUT
     371-webkit-grid-columns
     372-webkit-grid-rows
     373#endif
  • trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp

    r101275 r101288  
    11371137    setPropertyHandler(CSSPropertyLeft, ApplyPropertyLength<&RenderStyle::left, &RenderStyle::setLeft, &RenderStyle::initialOffset, AutoEnabled>::createHandler());
    11381138
     1139#if ENABLE(CSS_GRID_LAYOUT)
     1140    setPropertyHandler(CSSPropertyWebkitGridColumns, ApplyPropertyLength<&RenderStyle::gridColumns, &RenderStyle::setGridColumns, &RenderStyle::initialGridColumns, AutoEnabled, IntrinsicDisabled, MinIntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
     1141    setPropertyHandler(CSSPropertyWebkitGridRows, ApplyPropertyLength<&RenderStyle::gridRows, &RenderStyle::setGridRows, &RenderStyle::initialGridRows, AutoEnabled, IntrinsicDisabled, MinIntrinsicDisabled, NoneEnabled, UndefinedEnabled>::createHandler());
     1142#endif
     1143
    11391144    setPropertyHandler(CSSPropertyWidth, ApplyPropertyLength<&RenderStyle::width, &RenderStyle::setWidth, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexWidth>::createHandler());
    11401145    setPropertyHandler(CSSPropertyHeight, ApplyPropertyLength<&RenderStyle::height, &RenderStyle::setHeight, &RenderStyle::initialSize, AutoEnabled, IntrinsicEnabled, MinIntrinsicEnabled, NoneDisabled, UndefinedDisabled, FlexHeight>::createHandler());
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r101238 r101288  
    38473847    case CSSPropertyFontStyle:
    38483848    case CSSPropertyFontVariant:
     3849#if ENABLE(CSS_GRID_LAYOUT)
     3850    case CSSPropertyWebkitGridColumns:
     3851    case CSSPropertyWebkitGridRows:
     3852#endif
    38493853    case CSSPropertyTextRendering:
    38503854    case CSSPropertyWebkitTextOrientation:
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r101048 r101288  
    133133#if ENABLE(CSS_FILTERS)
    134134    rareNonInheritedData.access()->m_filter.init();
     135#endif
     136#if ENABLE(CSS_GRID_LAYOUT)
     137    rareNonInheritedData.access()->m_grid.init();
    135138#endif
    136139    rareInheritedData.init();
     
    426429            return StyleDifferenceLayout;
    427430        }
     431#endif
     432#if ENABLE(CSS_GRID_LAYOUT)
     433        if (rareNonInheritedData->m_grid.get() != other->rareNonInheritedData->m_grid.get())
     434            return StyleDifferenceLayout;
    428435#endif
    429436
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r101225 r101288  
    5757#endif
    5858#include "StyleFlexibleBoxData.h"
     59#if ENABLE(CSS_GRID_LAYOUT)
     60#include "StyleGridData.h"
     61#endif
    5962#include "StyleInheritedData.h"
    6063#include "StyleMarqueeData.h"
     
    724727    EFlexAlign flexAlign() const { return static_cast<EFlexAlign>(rareNonInheritedData->m_flexibleBox->m_flexAlign); }
    725728    EFlexFlow flexFlow() const { return static_cast<EFlexFlow>(rareNonInheritedData->m_flexibleBox->m_flexFlow); }
     729
     730#if ENABLE(CSS_GRID_LAYOUT)
     731    Length gridColumns() const { return rareNonInheritedData->m_grid->m_gridColumns; }
     732    Length gridRows() const { return rareNonInheritedData->m_grid->m_gridRows; }
     733#endif
    726734
    727735    const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShadow.get(); }
     
    11371145    void setFlexAlign(EFlexAlign a) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexAlign, a); }
    11381146    void setFlexFlow(EFlexFlow flow) { SET_VAR(rareNonInheritedData.access()->m_flexibleBox, m_flexFlow, flow); }
     1147#if ENABLE(CSS_GRID_LAYOUT)
     1148    void setGridColumns(Length length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridColumns, length); }
     1149    void setGridRows(Length length) { SET_VAR(rareNonInheritedData.access()->m_grid, m_gridRows, length); }
     1150#endif
     1151
    11391152    void setMarqueeIncrement(const Length& f) { SET_VAR(rareNonInheritedData.access()->m_marquee, increment, f); }
    11401153    void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marquee, speed, f); }
     
    15101523    static PrintColorAdjust initialPrintColorAdjust() { return PrintColorAdjustEconomy; }
    15111524
     1525#if ENABLE(CSS_GRID_LAYOUT)
     1526    static Length initialGridColumns() { return Length(Undefined); }
     1527    static Length initialGridRows() { return Length(Undefined); }
     1528#endif
     1529
    15121530    static const AtomicString& initialLineGrid() { return nullAtom; }
    15131531    static LineGridSnap initialLineGridSnap() { return LineGridSnapNone; }
  • trunk/Source/WebCore/rendering/style/StyleAllInOne.cpp

    r96142 r101288  
    4343#include "StyleFlexibleBoxData.cpp"
    4444#include "StyleGeneratedImage.cpp"
     45#include "StyleGridData.cpp"
    4546#include "StyleInheritedData.cpp"
    4647#include "StyleMarqueeData.cpp"
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp

    r101048 r101288  
    9696#if ENABLE(CSS_FILTERS)
    9797    , m_filter(o.m_filter)
     98#endif
     99#if ENABLE(CSS_GRID_LAYOUT)
     100    , m_grid(o.m_grid)
    98101#endif
    99102    , m_content(o.m_content ? o.m_content->clone() : nullptr)
     
    161164        && m_filter == o.m_filter
    162165#endif
     166#if ENABLE(CSS_GRID_LAYOUT)
     167        && m_grid == o.m_grid
     168#endif
    163169        && contentDataEquivalent(o)
    164170        && counterDataEquivalent(o)
  • trunk/Source/WebCore/rendering/style/StyleRareNonInheritedData.h

    r101048 r101288  
    4747#endif
    4848class StyleFlexibleBoxData;
     49#if ENABLE(CSS_GRID_LAYOUT)
     50class StyleGridData;
     51#endif
    4952class StyleMarqueeData;
    5053class StyleMultiColData;
     
    115118#endif
    116119
     120#if ENABLE(CSS_GRID_LAYOUT)
     121    DataRef<StyleGridData> m_grid;
     122#endif
     123
    117124    OwnPtr<ContentData> m_content;
    118125    OwnPtr<CounterDirectiveMap> m_counterDirectives;
Note: See TracChangeset for help on using the changeset viewer.