| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 if (firstLength.isUndefined() || secondLength.isUndefined()) | 220 if (firstLength.isUndefined() || secondLength.isUndefined()) |
| 221 return; | 221 return; |
| 222 | 222 |
| 223 b.setWidth(firstLength); | 223 b.setWidth(firstLength); |
| 224 b.setHeight(secondLength); | 224 b.setHeight(secondLength); |
| 225 layer->setSizeLength(b); | 225 layer->setSizeLength(b); |
| 226 } | 226 } |
| 227 | 227 |
| 228 void CSSToStyleMap::mapFillXPosition(CSSPropertyID propertyID, FillLayer* layer,
CSSValue* value) const | 228 void CSSToStyleMap::mapFillXPosition(CSSPropertyID propertyID, FillLayer* layer,
CSSValue* value) const |
| 229 { | 229 { |
| 230 if (value->isInitialValue()) { | |
| 231 layer->setXPosition(FillLayer::initialFillXPosition(layer->type())); | |
| 232 return; | |
| 233 } | |
| 234 | |
| 235 if (!value->isPrimitiveValue()) | 230 if (!value->isPrimitiveValue()) |
| 236 return; | 231 return; |
| 237 | 232 |
| 238 float zoomFactor = style()->effectiveZoom(); | 233 float zoomFactor = style()->effectiveZoom(); |
| 239 | 234 |
| 240 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 235 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 241 Pair* pair = primitiveValue->getPairValue(); | 236 Pair* pair = primitiveValue->getPairValue(); |
| 242 if (pair) { | 237 if (pair) { |
| 243 ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionX |
| propertyID == CSSPropertyWebkitMaskPositionX); | 238 ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionX |
| propertyID == CSSPropertyWebkitMaskPositionX); |
| 244 primitiveValue = pair->second(); | 239 primitiveValue = pair->second(); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 256 else | 251 else |
| 257 return; | 252 return; |
| 258 | 253 |
| 259 layer->setXPosition(length); | 254 layer->setXPosition(length); |
| 260 if (pair) | 255 if (pair) |
| 261 layer->setBackgroundXOrigin(*(pair->first())); | 256 layer->setBackgroundXOrigin(*(pair->first())); |
| 262 } | 257 } |
| 263 | 258 |
| 264 void CSSToStyleMap::mapFillYPosition(CSSPropertyID propertyID, FillLayer* layer,
CSSValue* value) const | 259 void CSSToStyleMap::mapFillYPosition(CSSPropertyID propertyID, FillLayer* layer,
CSSValue* value) const |
| 265 { | 260 { |
| 266 if (value->isInitialValue()) { | |
| 267 layer->setYPosition(FillLayer::initialFillYPosition(layer->type())); | |
| 268 return; | |
| 269 } | |
| 270 | |
| 271 if (!value->isPrimitiveValue()) | 261 if (!value->isPrimitiveValue()) |
| 272 return; | 262 return; |
| 273 | 263 |
| 274 float zoomFactor = style()->effectiveZoom(); | 264 float zoomFactor = style()->effectiveZoom(); |
| 275 | 265 |
| 276 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 266 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); |
| 277 Pair* pair = primitiveValue->getPairValue(); | 267 Pair* pair = primitiveValue->getPairValue(); |
| 278 if (pair) { | 268 if (pair) { |
| 279 ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionY |
| propertyID == CSSPropertyWebkitMaskPositionY); | 269 ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPositionY |
| propertyID == CSSPropertyWebkitMaskPositionY); |
| 280 primitiveValue = pair->second(); | 270 primitiveValue = pair->second(); |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 verticalRule = SpaceImageRule; | 696 verticalRule = SpaceImageRule; |
| 707 break; | 697 break; |
| 708 default: // CSSValueRepeat | 698 default: // CSSValueRepeat |
| 709 verticalRule = RepeatImageRule; | 699 verticalRule = RepeatImageRule; |
| 710 break; | 700 break; |
| 711 } | 701 } |
| 712 image.setVerticalRule(verticalRule); | 702 image.setVerticalRule(verticalRule); |
| 713 } | 703 } |
| 714 | 704 |
| 715 }; | 705 }; |
| OLD | NEW |