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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 127 |
128 | 128 |
129 void CSSToStyleMap::mapFillImage(StyleResolverState& state, FillLayer* layer, CS
SValue* value) | 129 void CSSToStyleMap::mapFillImage(StyleResolverState& state, FillLayer* layer, CS
SValue* value) |
130 { | 130 { |
131 if (value->isInitialValue()) { | 131 if (value->isInitialValue()) { |
132 layer->setImage(FillLayer::initialFillImage(layer->type())); | 132 layer->setImage(FillLayer::initialFillImage(layer->type())); |
133 return; | 133 return; |
134 } | 134 } |
135 | 135 |
136 CSSPropertyID property = layer->type() == BackgroundFillLayer ? CSSPropertyB
ackgroundImage : CSSPropertyWebkitMaskImage; | 136 CSSPropertyID property = layer->type() == BackgroundFillLayer ? CSSPropertyB
ackgroundImage : CSSPropertyWebkitMaskImage; |
137 layer->setImage(state.styleImage(property, value)); | 137 layer->setImage(state.styleImage(property, *value)); |
138 } | 138 } |
139 | 139 |
140 void CSSToStyleMap::mapFillRepeatX(StyleResolverState&, FillLayer* layer, CSSVal
ue* value) | 140 void CSSToStyleMap::mapFillRepeatX(StyleResolverState&, FillLayer* layer, CSSVal
ue* value) |
141 { | 141 { |
142 if (value->isInitialValue()) { | 142 if (value->isInitialValue()) { |
143 layer->setRepeatX(FillLayer::initialFillRepeatX(layer->type())); | 143 layer->setRepeatX(FillLayer::initialFillRepeatX(layer->type())); |
144 return; | 144 return; |
145 } | 145 } |
146 | 146 |
147 if (!value->isPrimitiveValue()) | 147 if (!value->isPrimitiveValue()) |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 imageProperty = CSSPropertyBorderImageSource; | 438 imageProperty = CSSPropertyBorderImageSource; |
439 else if (property == CSSPropertyWebkitMaskBoxImage) | 439 else if (property == CSSPropertyWebkitMaskBoxImage) |
440 imageProperty = CSSPropertyWebkitMaskBoxImageSource; | 440 imageProperty = CSSPropertyWebkitMaskBoxImageSource; |
441 else | 441 else |
442 imageProperty = property; | 442 imageProperty = property; |
443 | 443 |
444 for (unsigned i = 0 ; i < borderImage->length() ; ++i) { | 444 for (unsigned i = 0 ; i < borderImage->length() ; ++i) { |
445 CSSValue* current = borderImage->item(i); | 445 CSSValue* current = borderImage->item(i); |
446 | 446 |
447 if (current->isImageValue() || current->isImageGeneratorValue() || curre
nt->isImageSetValue()) | 447 if (current->isImageValue() || current->isImageGeneratorValue() || curre
nt->isImageSetValue()) |
448 image.setImage(state.styleImage(imageProperty, current)); | 448 image.setImage(state.styleImage(imageProperty, *current)); |
449 else if (current->isBorderImageSliceValue()) | 449 else if (current->isBorderImageSliceValue()) |
450 mapNinePieceImageSlice(state, current, image); | 450 mapNinePieceImageSlice(state, current, image); |
451 else if (current->isValueList()) { | 451 else if (current->isValueList()) { |
452 CSSValueList* slashList = toCSSValueList(current); | 452 CSSValueList* slashList = toCSSValueList(current); |
453 size_t length = slashList->length(); | 453 size_t length = slashList->length(); |
454 // Map in the image slices. | 454 // Map in the image slices. |
455 if (length && slashList->item(0)->isBorderImageSliceValue()) | 455 if (length && slashList->item(0)->isBorderImageSliceValue()) |
456 mapNinePieceImageSlice(state, slashList->item(0), image); | 456 mapNinePieceImageSlice(state, slashList->item(0), image); |
457 | 457 |
458 // Map in the border slices. | 458 // Map in the border slices. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 verticalRule = SpaceImageRule; | 580 verticalRule = SpaceImageRule; |
581 break; | 581 break; |
582 default: // CSSValueRepeat | 582 default: // CSSValueRepeat |
583 verticalRule = RepeatImageRule; | 583 verticalRule = RepeatImageRule; |
584 break; | 584 break; |
585 } | 585 } |
586 image.setVerticalRule(verticalRule); | 586 image.setVerticalRule(verticalRule); |
587 } | 587 } |
588 | 588 |
589 }; | 589 }; |
OLD | NEW |