Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: Source/core/rendering/style/RenderStyle.h

Issue 18532004: Implement 'grid-template' parsing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined and updated after Ojan's and Elliott's comments Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(ra reNonInheritedData->m_flexibleBox->m_flexDirection); } 730 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(ra reNonInheritedData->m_flexibleBox->m_flexDirection); }
731 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } 731 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
732 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; } 732 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; }
733 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedD ata->m_flexibleBox->m_flexWrap); } 733 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedD ata->m_flexibleBox->m_flexWrap); }
734 EJustifyContent justifyContent() const { return static_cast<EJustifyContent> (rareNonInheritedData->m_justifyContent); } 734 EJustifyContent justifyContent() const { return static_cast<EJustifyContent> (rareNonInheritedData->m_justifyContent); }
735 735
736 const Vector<GridTrackSize>& gridDefinitionColumns() const { return rareNonI nheritedData->m_grid->m_gridDefinitionColumns; } 736 const Vector<GridTrackSize>& gridDefinitionColumns() const { return rareNonI nheritedData->m_grid->m_gridDefinitionColumns; }
737 const Vector<GridTrackSize>& gridDefinitionRows() const { return rareNonInhe ritedData->m_grid->m_gridDefinitionRows; } 737 const Vector<GridTrackSize>& gridDefinitionRows() const { return rareNonInhe ritedData->m_grid->m_gridDefinitionRows; }
738 const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheri tedData->m_grid->m_namedGridColumnLines; } 738 const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheri tedData->m_grid->m_namedGridColumnLines; }
739 const NamedGridLinesMap& namedGridRowLines() const { return rareNonInherited Data->m_grid->m_namedGridRowLines; } 739 const NamedGridLinesMap& namedGridRowLines() const { return rareNonInherited Data->m_grid->m_namedGridRowLines; }
740 const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData- >m_grid->m_namedGridArea; }
741 size_t namedGridAreaRowCount() const { return rareNonInheritedData->m_grid-> m_namedGridAreaRowCount; }
742 size_t namedGridAreaColumnCount() const { return rareNonInheritedData->m_gri d->m_namedGridAreaColumnCount; }
740 GridAutoFlow gridAutoFlow() const { return rareNonInheritedData->m_grid->m_g ridAutoFlow; } 743 GridAutoFlow gridAutoFlow() const { return rareNonInheritedData->m_grid->m_g ridAutoFlow; }
741 const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData-> m_grid->m_gridAutoColumns; } 744 const GridTrackSize& gridAutoColumns() const { return rareNonInheritedData-> m_grid->m_gridAutoColumns; }
742 const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_g rid->m_gridAutoRows; } 745 const GridTrackSize& gridAutoRows() const { return rareNonInheritedData->m_g rid->m_gridAutoRows; }
743 746
744 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; } 747 const GridPosition& gridColumnStart() const { return rareNonInheritedData->m _gridItem->m_gridColumnStart; }
745 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; } 748 const GridPosition& gridColumnEnd() const { return rareNonInheritedData->m_g ridItem->m_gridColumnEnd; }
746 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; } 749 const GridPosition& gridRowStart() const { return rareNonInheritedData->m_gr idItem->m_gridRowStart; }
747 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; } 750 const GridPosition& gridRowEnd() const { return rareNonInheritedData->m_grid Item->m_gridRowEnd; }
748 751
749 const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShad ow.get(); } 752 const ShadowData* boxShadow() const { return rareNonInheritedData->m_boxShad ow.get(); }
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 void setAlignSelf(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignSelf , a); } 1183 void setAlignSelf(EAlignItems a) { SET_VAR(rareNonInheritedData, m_alignSelf , a); }
1181 void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedDa ta.access()->m_flexibleBox, m_flexDirection, direction); } 1184 void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedDa ta.access()->m_flexibleBox, m_flexDirection, direction); }
1182 void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_fle xibleBox, m_flexWrap, w); } 1185 void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_fle xibleBox, m_flexWrap, w); }
1183 void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_ justifyContent, p); } 1186 void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_ justifyContent, p); }
1184 void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheri tedData.access()->m_grid, m_gridAutoColumns, length); } 1187 void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheri tedData.access()->m_grid, m_gridAutoColumns, length); }
1185 void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInherited Data.access()->m_grid, m_gridAutoRows, length); } 1188 void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInherited Data.access()->m_grid, m_gridAutoRows, length); }
1186 void setGridDefinitionColumns(const Vector<GridTrackSize>& lengths) { SET_VA R(rareNonInheritedData.access()->m_grid, m_gridDefinitionColumns, lengths); } 1189 void setGridDefinitionColumns(const Vector<GridTrackSize>& lengths) { SET_VA R(rareNonInheritedData.access()->m_grid, m_gridDefinitionColumns, lengths); }
1187 void setGridDefinitionRows(const Vector<GridTrackSize>& lengths) { SET_VAR(r areNonInheritedData.access()->m_grid, m_gridDefinitionRows, lengths); } 1190 void setGridDefinitionRows(const Vector<GridTrackSize>& lengths) { SET_VAR(r areNonInheritedData.access()->m_grid, m_gridDefinitionRows, lengths); }
1188 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGr idColumnLines); } 1191 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGr idColumnLines); }
1189 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLine s); } 1192 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLine s); }
1193 void setNamedGridArea(const NamedGridAreaMap& namedGridArea) { SET_VAR(rareN onInheritedData.access()->m_grid, m_namedGridArea, namedGridArea); }
1194 void setNamedGridAreaRowCount(size_t rowCount) { SET_VAR(rareNonInheritedDat a.access()->m_grid, m_namedGridAreaRowCount, rowCount); }
1195 void setNamedGridAreaColumnCount(size_t columnCount) { SET_VAR(rareNonInheri tedData.access()->m_grid, m_namedGridAreaColumnCount, columnCount); }
1190 void setGridAutoFlow(GridAutoFlow flow) { SET_VAR(rareNonInheritedData.acces s()->m_grid, m_gridAutoFlow, flow); } 1196 void setGridAutoFlow(GridAutoFlow flow) { SET_VAR(rareNonInheritedData.acces s()->m_grid, m_gridAutoFlow, flow); }
1191 1197
1192 void setGridColumnStart(const GridPosition& columnStartPosition) { SET_VAR(r areNonInheritedData.access()->m_gridItem, m_gridColumnStart, columnStartPosition ); } 1198 void setGridColumnStart(const GridPosition& columnStartPosition) { SET_VAR(r areNonInheritedData.access()->m_gridItem, m_gridColumnStart, columnStartPosition ); }
1193 void setGridColumnEnd(const GridPosition& columnEndPosition) { SET_VAR(rareN onInheritedData.access()->m_gridItem, m_gridColumnEnd, columnEndPosition); } 1199 void setGridColumnEnd(const GridPosition& columnEndPosition) { SET_VAR(rareN onInheritedData.access()->m_gridItem, m_gridColumnEnd, columnEndPosition); }
1194 void setGridRowStart(const GridPosition& rowStartPosition) { SET_VAR(rareNon InheritedData.access()->m_gridItem, m_gridRowStart, rowStartPosition); } 1200 void setGridRowStart(const GridPosition& rowStartPosition) { SET_VAR(rareNon InheritedData.access()->m_gridItem, m_gridRowStart, rowStartPosition); }
1195 void setGridRowEnd(const GridPosition& rowEndPosition) { SET_VAR(rareNonInhe ritedData.access()->m_gridItem, m_gridRowEnd, rowEndPosition); } 1201 void setGridRowEnd(const GridPosition& rowEndPosition) { SET_VAR(rareNonInhe ritedData.access()->m_gridItem, m_gridRowEnd, rowEndPosition); }
1196 1202
1197 void setMarqueeIncrement(Length f) { SET_VAR(rareNonInheritedData.access()-> m_marquee, increment, f); } 1203 void setMarqueeIncrement(Length f) { SET_VAR(rareNonInheritedData.access()-> m_marquee, increment, f); }
1198 void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marqu ee, speed, f); } 1204 void setMarqueeSpeed(int f) { SET_VAR(rareNonInheritedData.access()->m_marqu ee, speed, f); }
1199 void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData .access()->m_marquee, direction, d); } 1205 void setMarqueeDirection(EMarqueeDirection d) { SET_VAR(rareNonInheritedData .access()->m_marquee, direction, d); }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 static Vector<GridTrackSize> initialGridDefinitionRows() { return Vector<Gri dTrackSize>(); } 1594 static Vector<GridTrackSize> initialGridDefinitionRows() { return Vector<Gri dTrackSize>(); }
1589 1595
1590 static GridAutoFlow initialGridAutoFlow() { return AutoFlowNone; } 1596 static GridAutoFlow initialGridAutoFlow() { return AutoFlowNone; }
1591 1597
1592 static GridTrackSize initialGridAutoColumns() { return GridTrackSize(Auto); } 1598 static GridTrackSize initialGridAutoColumns() { return GridTrackSize(Auto); }
1593 static GridTrackSize initialGridAutoRows() { return GridTrackSize(Auto); } 1599 static GridTrackSize initialGridAutoRows() { return GridTrackSize(Auto); }
1594 1600
1595 static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLin esMap(); } 1601 static NamedGridLinesMap initialNamedGridColumnLines() { return NamedGridLin esMap(); }
1596 static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesM ap(); } 1602 static NamedGridLinesMap initialNamedGridRowLines() { return NamedGridLinesM ap(); }
1597 1603
1604 static NamedGridAreaMap initialNamedGridArea() { return NamedGridAreaMap(); }
1605 static size_t initialNamedGridAreaCount() { return 0; }
1606
1598 // 'auto' is the default. 1607 // 'auto' is the default.
1599 static GridPosition initialGridColumnStart() { return GridPosition(); } 1608 static GridPosition initialGridColumnStart() { return GridPosition(); }
1600 static GridPosition initialGridColumnEnd() { return GridPosition(); } 1609 static GridPosition initialGridColumnEnd() { return GridPosition(); }
1601 static GridPosition initialGridRowStart() { return GridPosition(); } 1610 static GridPosition initialGridRowStart() { return GridPosition(); }
1602 static GridPosition initialGridRowEnd() { return GridPosition(); } 1611 static GridPosition initialGridRowEnd() { return GridPosition(); }
1603 1612
1604 static unsigned initialTabSize() { return 8; } 1613 static unsigned initialTabSize() { return 8; }
1605 1614
1606 static const AtomicString& initialLineGrid() { return nullAtom; } 1615 static const AtomicString& initialLineGrid() { return nullAtom; }
1607 static LineSnap initialLineSnap() { return LineSnapNone; } 1616 static LineSnap initialLineSnap() { return LineSnapNone; }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation)) 1755 if (compareEqual(rareInheritedData->m_textOrientation, textOrientation))
1747 return false; 1756 return false;
1748 1757
1749 rareInheritedData.access()->m_textOrientation = textOrientation; 1758 rareInheritedData.access()->m_textOrientation = textOrientation;
1750 return true; 1759 return true;
1751 } 1760 }
1752 1761
1753 } // namespace WebCore 1762 } // namespace WebCore
1754 1763
1755 #endif // RenderStyle_h 1764 #endif // RenderStyle_h
OLDNEW
« no previous file with comments | « Source/core/rendering/style/GridCoordinate.h ('k') | Source/core/rendering/style/StyleGridData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698