OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 5 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc.
All rights reserved. |
7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 7 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 8 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 9 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 10 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 svgStyle.setBaselineShift(BS_SUB); | 1123 svgStyle.setBaselineShift(BS_SUB); |
1124 return; | 1124 return; |
1125 case CSSValueSuper: | 1125 case CSSValueSuper: |
1126 svgStyle.setBaselineShift(BS_SUPER); | 1126 svgStyle.setBaselineShift(BS_SUPER); |
1127 return; | 1127 return; |
1128 default: | 1128 default: |
1129 ASSERT_NOT_REACHED(); | 1129 ASSERT_NOT_REACHED(); |
1130 } | 1130 } |
1131 } | 1131 } |
1132 | 1132 |
1133 void StyleBuilderFunctions::applyValueCSSPropertyGridAutoFlow(StyleResolverState
& state, CSSValue* value) | |
1134 { | |
1135 ASSERT(value->isValueList()); | |
1136 CSSValueList* list = toCSSValueList(value); | |
1137 | |
1138 CSSPrimitiveValue* first = list->length() >= 1 ? toCSSPrimitiveValue(list->i
tem(0)) : nullptr; | |
1139 | |
1140 if (!first) { | |
1141 applyInitialCSSPropertyGridAutoFlow(state); | |
1142 return; | |
1143 } | |
1144 | |
1145 CSSPrimitiveValue* second = list->length() == 2 ? toCSSPrimitiveValue(list->
item(1)) : nullptr; | |
1146 | |
1147 GridAutoFlow autoFlow = RenderStyle::initialGridAutoFlow(); | |
1148 switch (first->getValueID()) { | |
1149 case CSSValueRow: | |
1150 if (second) { | |
1151 if (second->getValueID() == CSSValueDense) | |
1152 autoFlow = AutoFlowRowDense; | |
1153 else | |
1154 autoFlow = AutoFlowStackRow; | |
1155 } else { | |
1156 autoFlow = AutoFlowRow; | |
1157 } | |
1158 break; | |
1159 case CSSValueColumn: | |
1160 if (second) { | |
1161 if (second->getValueID() == CSSValueDense) | |
1162 autoFlow = AutoFlowColumnDense; | |
1163 else | |
1164 autoFlow = AutoFlowStackColumn; | |
1165 } else { | |
1166 autoFlow = AutoFlowColumn; | |
1167 } | |
1168 break; | |
1169 case CSSValueDense: | |
1170 if (second && second->getValueID() == CSSValueColumn) | |
1171 autoFlow = AutoFlowColumnDense; | |
1172 else | |
1173 autoFlow = AutoFlowRowDense; | |
1174 break; | |
1175 case CSSValueStack: | |
1176 if (second && second->getValueID() == CSSValueColumn) | |
1177 autoFlow = AutoFlowStackColumn; | |
1178 else | |
1179 autoFlow = AutoFlowStackRow; | |
1180 break; | |
1181 default: | |
1182 ASSERT_NOT_REACHED(); | |
1183 break; | |
1184 } | |
1185 | |
1186 state.style()->setGridAutoFlow(autoFlow); | |
1187 } | |
1188 | |
1189 } // namespace blink | 1133 } // namespace blink |
OLD | NEW |