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

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

Issue 333423005: [CSS Grid Layout] Implement 'justify-items' parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Suggested changes and additional test cases. Created 6 years, 6 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
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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 EAlignContent alignContent() const { return static_cast<EAlignContent>(rareN onInheritedData->m_alignContent); } 778 EAlignContent alignContent() const { return static_cast<EAlignContent>(rareN onInheritedData->m_alignContent); }
779 ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonIn heritedData->m_alignItems); } 779 ItemPosition alignItems() const { return static_cast<ItemPosition>(rareNonIn heritedData->m_alignItems); }
780 OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<O verflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); } 780 OverflowAlignment alignItemsOverflowAlignment() const { return static_cast<O verflowAlignment>(rareNonInheritedData->m_alignItemsOverflowAlignment); }
781 ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInh eritedData->m_alignSelf); } 781 ItemPosition alignSelf() const { return static_cast<ItemPosition>(rareNonInh eritedData->m_alignSelf); }
782 OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<Ov erflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); } 782 OverflowAlignment alignSelfOverflowAlignment() const { return static_cast<Ov erflowAlignment>(rareNonInheritedData->m_alignSelfOverflowAlignment); }
783 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(ra reNonInheritedData->m_flexibleBox->m_flexDirection); } 783 EFlexDirection flexDirection() const { return static_cast<EFlexDirection>(ra reNonInheritedData->m_flexibleBox->m_flexDirection); }
784 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; } 784 bool isColumnFlexDirection() const { return flexDirection() == FlowColumn || flexDirection() == FlowColumnReverse; }
785 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; } 785 bool isReverseFlexDirection() const { return flexDirection() == FlowRowRever se || flexDirection() == FlowColumnReverse; }
786 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedD ata->m_flexibleBox->m_flexWrap); } 786 EFlexWrap flexWrap() const { return static_cast<EFlexWrap>(rareNonInheritedD ata->m_flexibleBox->m_flexWrap); }
787 EJustifyContent justifyContent() const { return static_cast<EJustifyContent> (rareNonInheritedData->m_justifyContent); } 787 EJustifyContent justifyContent() const { return static_cast<EJustifyContent> (rareNonInheritedData->m_justifyContent); }
788 ItemPosition justifyItems() const { return static_cast<ItemPosition>(rareNon InheritedData->m_justifyItems); }
789 OverflowAlignment justifyItemsOverflowAlignment() const { return static_cast <OverflowAlignment>(rareNonInheritedData->m_justifyItemsOverflowAlignment); }
790 bool justifyItemsIsLegacy() const { return rareNonInheritedData->m_justifyIt emsIsLegacy; }
788 ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonI nheritedData->m_justifySelf); } 791 ItemPosition justifySelf() const { return static_cast<ItemPosition>(rareNonI nheritedData->m_justifySelf); }
789 OverflowAlignment justifySelfOverflowAlignment() const { return static_cast< OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); } 792 OverflowAlignment justifySelfOverflowAlignment() const { return static_cast< OverflowAlignment>(rareNonInheritedData->m_justifySelfOverflowAlignment); }
790 793
791 const Vector<GridTrackSize>& gridTemplateColumns() const { return rareNonInh eritedData->m_grid->m_gridTemplateColumns; } 794 const Vector<GridTrackSize>& gridTemplateColumns() const { return rareNonInh eritedData->m_grid->m_gridTemplateColumns; }
792 const Vector<GridTrackSize>& gridTemplateRows() const { return rareNonInheri tedData->m_grid->m_gridTemplateRows; } 795 const Vector<GridTrackSize>& gridTemplateRows() const { return rareNonInheri tedData->m_grid->m_gridTemplateRows; }
793 const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheri tedData->m_grid->m_namedGridColumnLines; } 796 const NamedGridLinesMap& namedGridColumnLines() const { return rareNonInheri tedData->m_grid->m_namedGridColumnLines; }
794 const NamedGridLinesMap& namedGridRowLines() const { return rareNonInherited Data->m_grid->m_namedGridRowLines; } 797 const NamedGridLinesMap& namedGridRowLines() const { return rareNonInherited Data->m_grid->m_namedGridRowLines; }
795 const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return ra reNonInheritedData->m_grid->m_orderedNamedGridColumnLines; } 798 const OrderedNamedGridLines& orderedNamedGridColumnLines() const { return ra reNonInheritedData->m_grid->m_orderedNamedGridColumnLines; }
796 const OrderedNamedGridLines& orderedNamedGridRowLines() const { return rareN onInheritedData->m_grid->m_orderedNamedGridRowLines; } 799 const OrderedNamedGridLines& orderedNamedGridRowLines() const { return rareN onInheritedData->m_grid->m_orderedNamedGridRowLines; }
797 const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData- >m_grid->m_namedGridArea; } 800 const NamedGridAreaMap& namedGridArea() const { return rareNonInheritedData- >m_grid->m_namedGridArea; }
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, max(std::numer ic_limits<int>::min() + 2, o)); } 1260 void setOrder(int o) { SET_VAR(rareNonInheritedData, m_order, max(std::numer ic_limits<int>::min() + 2, o)); }
1258 void addCallbackSelector(const String& selector); 1261 void addCallbackSelector(const String& selector);
1259 void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alig nContent, p); } 1262 void setAlignContent(EAlignContent p) { SET_VAR(rareNonInheritedData, m_alig nContent, p); }
1260 void setAlignItems(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignIt ems, a); } 1263 void setAlignItems(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignIt ems, a); }
1261 void setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment) { S ET_VAR(rareNonInheritedData, m_alignItemsOverflowAlignment, overflowAlignment); } 1264 void setAlignItemsOverflowAlignment(OverflowAlignment overflowAlignment) { S ET_VAR(rareNonInheritedData, m_alignItemsOverflowAlignment, overflowAlignment); }
1262 void setAlignSelf(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignSel f, a); } 1265 void setAlignSelf(ItemPosition a) { SET_VAR(rareNonInheritedData, m_alignSel f, a); }
1263 void setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment) { SE T_VAR(rareNonInheritedData, m_alignSelfOverflowAlignment, overflowAlignment); } 1266 void setAlignSelfOverflowAlignment(OverflowAlignment overflowAlignment) { SE T_VAR(rareNonInheritedData, m_alignSelfOverflowAlignment, overflowAlignment); }
1264 void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedDa ta.access()->m_flexibleBox, m_flexDirection, direction); } 1267 void setFlexDirection(EFlexDirection direction) { SET_VAR(rareNonInheritedDa ta.access()->m_flexibleBox, m_flexDirection, direction); }
1265 void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_fle xibleBox, m_flexWrap, w); } 1268 void setFlexWrap(EFlexWrap w) { SET_VAR(rareNonInheritedData.access()->m_fle xibleBox, m_flexWrap, w); }
1266 void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_ justifyContent, p); } 1269 void setJustifyContent(EJustifyContent p) { SET_VAR(rareNonInheritedData, m_ justifyContent, p); }
1270 void setJustifyItems(ItemPosition justifyItems) { SET_VAR(rareNonInheritedDa ta, m_justifyItems, justifyItems); }
1271 void setJustifyItemsOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifyItemsOverflowAlignment, overflowAlignmen t); }
1272 void setJustifyItemsIsLegacy(bool isLegacy) { SET_VAR(rareNonInheritedData, m_justifyItemsIsLegacy, isLegacy); }
1267 void setJustifySelf(ItemPosition justifySelf) { SET_VAR(rareNonInheritedData , m_justifySelf, justifySelf); } 1273 void setJustifySelf(ItemPosition justifySelf) { SET_VAR(rareNonInheritedData , m_justifySelf, justifySelf); }
1268 void setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment) ; } 1274 void setJustifySelfOverflowAlignment(OverflowAlignment overflowAlignment) { SET_VAR(rareNonInheritedData, m_justifySelfOverflowAlignment, overflowAlignment) ; }
1269 void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheri tedData.access()->m_grid, m_gridAutoColumns, length); } 1275 void setGridAutoColumns(const GridTrackSize& length) { SET_VAR(rareNonInheri tedData.access()->m_grid, m_gridAutoColumns, length); }
1270 void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInherited Data.access()->m_grid, m_gridAutoRows, length); } 1276 void setGridAutoRows(const GridTrackSize& length) { SET_VAR(rareNonInherited Data.access()->m_grid, m_gridAutoRows, length); }
1271 void setGridTemplateColumns(const Vector<GridTrackSize>& lengths) { SET_VAR( rareNonInheritedData.access()->m_grid, m_gridTemplateColumns, lengths); } 1277 void setGridTemplateColumns(const Vector<GridTrackSize>& lengths) { SET_VAR( rareNonInheritedData.access()->m_grid, m_gridTemplateColumns, lengths); }
1272 void setGridTemplateRows(const Vector<GridTrackSize>& lengths) { SET_VAR(rar eNonInheritedData.access()->m_grid, m_gridTemplateRows, lengths); } 1278 void setGridTemplateRows(const Vector<GridTrackSize>& lengths) { SET_VAR(rar eNonInheritedData.access()->m_grid, m_gridTemplateRows, lengths); }
1273 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGr idColumnLines); } 1279 void setNamedGridColumnLines(const NamedGridLinesMap& namedGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_namedGridColumnLines, namedGr idColumnLines); }
1274 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLine s); } 1280 void setNamedGridRowLines(const NamedGridLinesMap& namedGridRowLines) { SET_ VAR(rareNonInheritedData.access()->m_grid, m_namedGridRowLines, namedGridRowLine s); }
1275 void setOrderedNamedGridColumnLines(const OrderedNamedGridLines& orderedName dGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedName dGridColumnLines, orderedNamedGridColumnLines); } 1281 void setOrderedNamedGridColumnLines(const OrderedNamedGridLines& orderedName dGridColumnLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedName dGridColumnLines, orderedNamedGridColumnLines); }
1276 void setOrderedNamedGridRowLines(const OrderedNamedGridLines& orderedNamedGr idRowLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedNamedGridR owLines, orderedNamedGridRowLines); } 1282 void setOrderedNamedGridRowLines(const OrderedNamedGridLines& orderedNamedGr idRowLines) { SET_VAR(rareNonInheritedData.access()->m_grid, m_orderedNamedGridR owLines, orderedNamedGridRowLines); }
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 static Length initialFlexBasis() { return Length(Auto); } 1601 static Length initialFlexBasis() { return Length(Auto); }
1596 static int initialOrder() { return 0; } 1602 static int initialOrder() { return 0; }
1597 static EAlignContent initialAlignContent() { return AlignContentStretch; } 1603 static EAlignContent initialAlignContent() { return AlignContentStretch; }
1598 static ItemPosition initialAlignItems() { return ItemPositionStretch; } 1604 static ItemPosition initialAlignItems() { return ItemPositionStretch; }
1599 static OverflowAlignment initialAlignItemsOverflowAlignment() { return Overf lowAlignmentDefault; } 1605 static OverflowAlignment initialAlignItemsOverflowAlignment() { return Overf lowAlignmentDefault; }
1600 static ItemPosition initialAlignSelf() { return ItemPositionAuto; } 1606 static ItemPosition initialAlignSelf() { return ItemPositionAuto; }
1601 static OverflowAlignment initialAlignSelfOverflowAlignment() { return Overfl owAlignmentDefault; } 1607 static OverflowAlignment initialAlignSelfOverflowAlignment() { return Overfl owAlignmentDefault; }
1602 static EFlexDirection initialFlexDirection() { return FlowRow; } 1608 static EFlexDirection initialFlexDirection() { return FlowRow; }
1603 static EFlexWrap initialFlexWrap() { return FlexNoWrap; } 1609 static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
1604 static EJustifyContent initialJustifyContent() { return JustifyFlexStart; } 1610 static EJustifyContent initialJustifyContent() { return JustifyFlexStart; }
1611 static ItemPosition initialJustifyItems() { return ItemPositionAuto; }
1612 static OverflowAlignment initialJustifyItemsOverflowAlignment() { return Ove rflowAlignmentDefault; }
1605 static ItemPosition initialJustifySelf() { return ItemPositionAuto; } 1613 static ItemPosition initialJustifySelf() { return ItemPositionAuto; }
1606 static OverflowAlignment initialJustifySelfOverflowAlignment() { return Over flowAlignmentDefault; } 1614 static OverflowAlignment initialJustifySelfOverflowAlignment() { return Over flowAlignmentDefault; }
1607 static int initialMarqueeLoopCount() { return -1; } 1615 static int initialMarqueeLoopCount() { return -1; }
1608 static int initialMarqueeSpeed() { return 85; } 1616 static int initialMarqueeSpeed() { return 85; }
1609 static Length initialMarqueeIncrement() { return Length(6, Fixed); } 1617 static Length initialMarqueeIncrement() { return Length(6, Fixed); }
1610 static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; } 1618 static EMarqueeBehavior initialMarqueeBehavior() { return MSCROLL; }
1611 static EMarqueeDirection initialMarqueeDirection() { return MAUTO; } 1619 static EMarqueeDirection initialMarqueeDirection() { return MAUTO; }
1612 static EUserModify initialUserModify() { return READ_ONLY; } 1620 static EUserModify initialUserModify() { return READ_ONLY; }
1613 static EUserDrag initialUserDrag() { return DRAG_AUTO; } 1621 static EUserDrag initialUserDrag() { return DRAG_AUTO; }
1614 static EUserSelect initialUserSelect() { return SELECT_TEXT; } 1622 static EUserSelect initialUserSelect() { return SELECT_TEXT; }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1881 inline bool RenderStyle::hasPseudoElementStyle() const 1889 inline bool RenderStyle::hasPseudoElementStyle() const
1882 { 1890 {
1883 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK; 1891 return noninherited_flags._pseudoBits & PSEUDO_ELEMENT_MASK;
1884 } 1892 }
1885 1893
1886 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&); 1894 float calcBorderRadiiConstraintScaleFor(const FloatRect&, const FloatRoundedRect ::Radii&);
1887 1895
1888 } // namespace WebCore 1896 } // namespace WebCore
1889 1897
1890 #endif // RenderStyle_h 1898 #endif // RenderStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698