| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * (C) 2004-2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) | 4 * Copyright (C) 2006, 2007 Nicholas Shanks (webkit@nickshanks.com) |
| 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. |
| 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 6 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> | 7 * Copyright (C) 2007, 2008 Eric Seidel <eric@webkit.org> |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. | 9 * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 if (value.isPrimitiveValue() && (toCSSPrimitiveValue(value).getValueID() ==
CSSValueContain || toCSSPrimitiveValue(value).getValueID() == CSSValueCover)) { | 189 if (value.isPrimitiveValue() && (toCSSPrimitiveValue(value).getValueID() ==
CSSValueContain || toCSSPrimitiveValue(value).getValueID() == CSSValueCover)) { |
| 190 layer->setSizeLength(b); | 190 layer->setSizeLength(b); |
| 191 return; | 191 return; |
| 192 } | 192 } |
| 193 | 193 |
| 194 Length firstLength; | 194 Length firstLength; |
| 195 Length secondLength; | 195 Length secondLength; |
| 196 | 196 |
| 197 if (value.isValuePair()) { | 197 if (value.isValuePair()) { |
| 198 const CSSValuePair& pair = toCSSValuePair(value); | 198 const CSSValuePair& pair = toCSSValuePair(value); |
| 199 // TODO(sashab): Make StyleBuilderConverter take const&s and remove thes
e const_casts. | 199 firstLength = StyleBuilderConverter::convertLengthOrAuto(state, pair.fir
st()); |
| 200 firstLength = StyleBuilderConverter::convertLengthOrAuto(state, const_ca
st<CSSValue*>(&pair.first())); | 200 secondLength = StyleBuilderConverter::convertLengthOrAuto(state, pair.se
cond()); |
| 201 secondLength = StyleBuilderConverter::convertLengthOrAuto(state, const_c
ast<CSSValue*>(&pair.second())); | |
| 202 } else { | 201 } else { |
| 203 ASSERT(value.isPrimitiveValue()); | 202 ASSERT(value.isPrimitiveValue()); |
| 204 firstLength = StyleBuilderConverter::convertLengthOrAuto(state, const_ca
st<CSSValue*>(&value)); | 203 firstLength = StyleBuilderConverter::convertLengthOrAuto(state, value); |
| 205 secondLength = Length(); | 204 secondLength = Length(); |
| 206 } | 205 } |
| 207 | 206 |
| 208 b.setWidth(firstLength); | 207 b.setWidth(firstLength); |
| 209 b.setHeight(secondLength); | 208 b.setHeight(secondLength); |
| 210 layer->setSizeLength(b); | 209 layer->setSizeLength(b); |
| 211 } | 210 } |
| 212 | 211 |
| 213 void CSSToStyleMap::mapFillXPosition(StyleResolverState& state, FillLayer* layer
, const CSSValue& value) | 212 void CSSToStyleMap::mapFillXPosition(StyleResolverState& state, FillLayer* layer
, const CSSValue& value) |
| 214 { | 213 { |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 verticalRule = SpaceImageRule; | 579 verticalRule = SpaceImageRule; |
| 581 break; | 580 break; |
| 582 default: // CSSValueRepeat | 581 default: // CSSValueRepeat |
| 583 verticalRule = RepeatImageRule; | 582 verticalRule = RepeatImageRule; |
| 584 break; | 583 break; |
| 585 } | 584 } |
| 586 image.setVerticalRule(verticalRule); | 585 image.setVerticalRule(verticalRule); |
| 587 } | 586 } |
| 588 | 587 |
| 589 }; | 588 }; |
| OLD | NEW |