Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: sky/engine/core/css/resolver/CSSToStyleMap.cpp

Issue 892903002: Remove -webkit-mask-*. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix goofups Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 134
135 void CSSToStyleMap::mapFillImage(FillLayer* layer, CSSValue* value) 135 void CSSToStyleMap::mapFillImage(FillLayer* layer, CSSValue* value)
136 { 136 {
137 if (value->isInitialValue()) { 137 if (value->isInitialValue()) {
138 layer->setImage(FillLayer::initialFillImage(layer->type())); 138 layer->setImage(FillLayer::initialFillImage(layer->type()));
139 return; 139 return;
140 } 140 }
141 141
142 CSSPropertyID property = layer->type() == BackgroundFillLayer ? CSSPropertyB ackgroundImage : CSSPropertyWebkitMaskImage; 142 layer->setImage(styleImage(CSSPropertyBackgroundImage, value));
143 layer->setImage(styleImage(property, value));
144 } 143 }
145 144
146 void CSSToStyleMap::mapFillRepeatX(FillLayer* layer, CSSValue* value) const 145 void CSSToStyleMap::mapFillRepeatX(FillLayer* layer, CSSValue* value) const
147 { 146 {
148 if (value->isInitialValue()) { 147 if (value->isInitialValue()) {
149 layer->setRepeatX(FillLayer::initialFillRepeatX(layer->type())); 148 layer->setRepeatX(FillLayer::initialFillRepeatX(layer->type()));
150 return; 149 return;
151 } 150 }
152 151
153 if (!value->isPrimitiveValue()) 152 if (!value->isPrimitiveValue())
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (!value || !value->isValueList()) 435 if (!value || !value->isValueList())
437 return; 436 return;
438 437
439 // Retrieve the border image value. 438 // Retrieve the border image value.
440 CSSValueList* borderImage = toCSSValueList(value); 439 CSSValueList* borderImage = toCSSValueList(value);
441 440
442 // Set the image (this kicks off the load). 441 // Set the image (this kicks off the load).
443 CSSPropertyID imageProperty; 442 CSSPropertyID imageProperty;
444 if (property == CSSPropertyWebkitBorderImage) 443 if (property == CSSPropertyWebkitBorderImage)
445 imageProperty = CSSPropertyBorderImageSource; 444 imageProperty = CSSPropertyBorderImageSource;
446 else if (property == CSSPropertyWebkitMaskBoxImage)
447 imageProperty = CSSPropertyWebkitMaskBoxImageSource;
448 else 445 else
449 imageProperty = property; 446 imageProperty = property;
450 447
451 for (unsigned i = 0 ; i < borderImage->length() ; ++i) { 448 for (unsigned i = 0 ; i < borderImage->length() ; ++i) {
452 CSSValue* current = borderImage->item(i); 449 CSSValue* current = borderImage->item(i);
453 450
454 if (current->isImageValue() || current->isImageGeneratorValue() || curre nt->isImageSetValue()) 451 if (current->isImageValue() || current->isImageGeneratorValue() || curre nt->isImageSetValue())
455 image.setImage(styleImage(imageProperty, current)); 452 image.setImage(styleImage(imageProperty, current));
456 else if (current->isBorderImageSliceValue()) 453 else if (current->isBorderImageSliceValue())
457 mapNinePieceImageSlice(current, image); 454 mapNinePieceImageSlice(current, image);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 verticalRule = SpaceImageRule; 588 verticalRule = SpaceImageRule;
592 break; 589 break;
593 default: // CSSValueRepeat 590 default: // CSSValueRepeat
594 verticalRule = RepeatImageRule; 591 verticalRule = RepeatImageRule;
595 break; 592 break;
596 } 593 }
597 image.setVerticalRule(verticalRule); 594 image.setVerticalRule(verticalRule);
598 } 595 }
599 596
600 }; 597 };
OLDNEW
« no previous file with comments | « sky/engine/core/css/resolver/AnimatedStyleBuilder.cpp ('k') | sky/engine/core/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698