Index: third_party/WebKit/Source/core/style/ShadowList.cpp |
diff --git a/third_party/WebKit/Source/core/style/ShadowList.cpp b/third_party/WebKit/Source/core/style/ShadowList.cpp |
index 9f0c7e35523ea5c3424f9c11877ac4fef73cd4cc..ddefc4669fd36c6aa32f64eed5f52c7cc974210a 100644 |
--- a/third_party/WebKit/Source/core/style/ShadowList.cpp |
+++ b/third_party/WebKit/Source/core/style/ShadowList.cpp |
@@ -81,14 +81,13 @@ PassRefPtr<ShadowList> ShadowList::blend(const ShadowList* from, const ShadowLis |
PassOwnPtr<DrawLooperBuilder> ShadowList::createDrawLooper(DrawLooperBuilder::ShadowAlphaMode alphaMode, const Color& currentColor, bool isHorizontal) const |
{ |
OwnPtr<DrawLooperBuilder> drawLooperBuilder = DrawLooperBuilder::create(); |
- for (size_t i = shadows().size(); i--; ) { |
- const ShadowData& shadow = shadows()[i]; |
+ drawLooperBuilder->addUnmodifiedContent(); |
+ for (const ShadowData& shadow : shadows()) { |
float shadowX = isHorizontal ? shadow.x() : shadow.y(); |
float shadowY = isHorizontal ? shadow.y() : -shadow.x(); |
drawLooperBuilder->addShadow(FloatSize(shadowX, shadowY), shadow.blur(), shadow.color().resolve(currentColor), |
DrawLooperBuilder::ShadowRespectsTransforms, alphaMode); |
} |
- drawLooperBuilder->addUnmodifiedContent(); |
return drawLooperBuilder.release(); |
} |