Index: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
index c7ffb42f74de93c23f30f1f47303fb596e93a064..6f6cbcaa49860b230f76958f79ab2ee2cf42a98a 100644 |
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp |
@@ -699,8 +699,10 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor |
// Get a CSSValue for this property and layer. |
if (values[propertyIndex]->isBaseValueList()) { |
- // Might return 0 if there is not an item for this layer for this property. |
- value = toCSSValueList(values[propertyIndex])->itemWithBoundsCheck(layer); |
+ const CSSValueList* propertyValues = toCSSValueList(values[propertyIndex]); |
+ // There might not be an item for this layer for this property. |
+ if (layer < propertyValues->length()) |
+ value = propertyValues->item(layer); |
} else if (layer == 0 || (layer != numLayers - 1 && property == CSSPropertyBackgroundColor)) { |
// Singletons except background color belong in the 0th layer. |
// Background color belongs in the last layer. |