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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp

Issue 2035333002: Removed deprecated method CSSValueList::itemWithBoundsCheck() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_make_cssvaluelist_and_computedstylemapping_store_const
Patch Set: Rebase Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValueList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValueList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698