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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 1373753002: Change CSSToStyleMap functions to take const CSSValue&s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix for mask Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
index 296806107e61d9fe3f60367fe4802219ec2c42d8..cca6a8c4343dd363114af6151ae585d9c6466c1a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp
@@ -77,10 +77,12 @@ PassRefPtr<StyleReflection> StyleBuilderConverter::convertBoxReflect(StyleResolv
reflection->setDirection(*reflectValue->direction());
if (reflectValue->offset())
reflection->setOffset(reflectValue->offset()->convertToLength(state.cssToLengthConversionData()));
- NinePieceImage mask;
- mask.setMaskDefaults();
- CSSToStyleMap::mapNinePieceImage(state, CSSPropertyWebkitBoxReflect, reflectValue->mask(), mask);
- reflection->setMask(mask);
+ if (reflectValue->mask()) {
+ NinePieceImage mask;
+ mask.setMaskDefaults();
+ CSSToStyleMap::mapNinePieceImage(state, CSSPropertyWebkitBoxReflect, *reflectValue->mask(), mask);
+ reflection->setMask(mask);
+ }
return reflection.release();
}

Powered by Google App Engine
This is Rietveld 408576698