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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 applyInheritCSSPropertyColor(state); | 159 applyInheritCSSPropertyColor(state); |
160 return; | 160 return; |
161 } | 161 } |
162 | 162 |
163 if (state.applyPropertyToRegularStyle()) | 163 if (state.applyPropertyToRegularStyle()) |
164 state.style()->setColor(StyleBuilderConverter::convertColor(state, value
)); | 164 state.style()->setColor(StyleBuilderConverter::convertColor(state, value
)); |
165 if (state.applyPropertyToVisitedLinkStyle()) | 165 if (state.applyPropertyToVisitedLinkStyle()) |
166 state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(s
tate, value, true)); | 166 state.style()->setVisitedLinkColor(StyleBuilderConverter::convertColor(s
tate, value, true)); |
167 } | 167 } |
168 | 168 |
169 void StyleBuilderFunctions::applyInitialCSSPropertyJustifyItems(StyleResolverSta
te& state) | |
170 { | |
171 state.style()->setJustifyItems(ComputedStyle::initialJustifyItems()); | |
172 state.style()->setJustifyItemsOverflowAlignment(ComputedStyle::initialJustif
yItemsOverflowAlignment()); | |
173 state.style()->setJustifyItemsPositionType(ComputedStyle::initialJustifyItem
sPositionType()); | |
174 } | |
175 | |
176 void StyleBuilderFunctions::applyInheritCSSPropertyJustifyItems(StyleResolverSta
te& state) | |
177 { | |
178 state.style()->setJustifyItems(state.parentStyle()->justifyItems()); | |
179 state.style()->setJustifyItemsOverflowAlignment(state.parentStyle()->justify
ItemsOverflowAlignment()); | |
180 state.style()->setJustifyItemsPositionType(state.parentStyle()->justifyItems
PositionType()); | |
181 } | |
182 | |
183 void StyleBuilderFunctions::applyValueCSSPropertyJustifyItems(StyleResolverState
& state, CSSValue* value) | |
184 { | |
185 state.style()->setJustifyItems(ComputedStyle::initialJustifyItems()); | |
186 state.style()->setJustifyItemsOverflowAlignment(ComputedStyle::initialJustif
yItemsOverflowAlignment()); | |
187 state.style()->setJustifyItemsPositionType(ComputedStyle::initialJustifyItem
sPositionType()); | |
188 | |
189 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | |
190 if (Pair* pairValue = primitiveValue->getPairValue()) { | |
191 if (pairValue->first()->getValueID() == CSSValueLegacy) { | |
192 state.style()->setJustifyItemsPositionType(LegacyPosition); | |
193 state.style()->setJustifyItems(*pairValue->second()); | |
194 } else { | |
195 state.style()->setJustifyItems(*pairValue->first()); | |
196 state.style()->setJustifyItemsOverflowAlignment(*pairValue->second()
); | |
197 } | |
198 } else { | |
199 state.style()->setJustifyItems(*primitiveValue); | |
200 } | |
201 } | |
202 | |
203 void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolverState& st
ate) | 169 void StyleBuilderFunctions::applyInitialCSSPropertyCursor(StyleResolverState& st
ate) |
204 { | 170 { |
205 state.style()->clearCursorList(); | 171 state.style()->clearCursorList(); |
206 state.style()->setCursor(ComputedStyle::initialCursor()); | 172 state.style()->setCursor(ComputedStyle::initialCursor()); |
207 } | 173 } |
208 | 174 |
209 void StyleBuilderFunctions::applyInheritCSSPropertyCursor(StyleResolverState& st
ate) | 175 void StyleBuilderFunctions::applyInheritCSSPropertyCursor(StyleResolverState& st
ate) |
210 { | 176 { |
211 state.style()->setCursor(state.parentStyle()->cursor()); | 177 state.style()->setCursor(state.parentStyle()->cursor()); |
212 state.style()->setCursorList(state.parentStyle()->cursors()); | 178 state.style()->setCursorList(state.parentStyle()->cursors()); |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
895 return; | 861 return; |
896 case CSSValueSuper: | 862 case CSSValueSuper: |
897 svgStyle.setBaselineShift(BS_SUPER); | 863 svgStyle.setBaselineShift(BS_SUPER); |
898 return; | 864 return; |
899 default: | 865 default: |
900 ASSERT_NOT_REACHED(); | 866 ASSERT_NOT_REACHED(); |
901 } | 867 } |
902 } | 868 } |
903 | 869 |
904 } // namespace blink | 870 } // namespace blink |
OLD | NEW |