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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValueList.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 bool useSingleWordShorthand = false; 692 bool useSingleWordShorthand = false;
693 bool foundPositionXCSSProperty = false; 693 bool foundPositionXCSSProperty = false;
694 bool foundPositionYCSSProperty = false; 694 bool foundPositionYCSSProperty = false;
695 695
696 for (unsigned propertyIndex = 0; propertyIndex < size; propertyIndex++) { 696 for (unsigned propertyIndex = 0; propertyIndex < size; propertyIndex++) {
697 const CSSValue* value = nullptr; 697 const CSSValue* value = nullptr;
698 CSSPropertyID property = shorthand.properties()[propertyIndex]; 698 CSSPropertyID property = shorthand.properties()[propertyIndex];
699 699
700 // Get a CSSValue for this property and layer. 700 // Get a CSSValue for this property and layer.
701 if (values[propertyIndex]->isBaseValueList()) { 701 if (values[propertyIndex]->isBaseValueList()) {
702 const CSSValueList* propertyValues = toCSSValueList(values[prope rtyIndex]);
702 // Might return 0 if there is not an item for this layer for thi s property. 703 // Might return 0 if there is not an item for this layer for thi s property.
Timothy Loh 2016/06/06 03:11:06 comment needs to eb updated
sashab 2016/06/06 03:36:51 Yeah I saw this comment but not sure what to updat
703 value = toCSSValueList(values[propertyIndex])->itemWithBoundsChe ck(layer); 704 if (layer < propertyValues->length())
705 value = propertyValues->item(layer);
704 } else if (layer == 0 || (layer != numLayers - 1 && property == CSSP ropertyBackgroundColor)) { 706 } else if (layer == 0 || (layer != numLayers - 1 && property == CSSP ropertyBackgroundColor)) {
705 // Singletons except background color belong in the 0th layer. 707 // Singletons except background color belong in the 0th layer.
706 // Background color belongs in the last layer. 708 // Background color belongs in the last layer.
707 value = values[propertyIndex]; 709 value = values[propertyIndex];
708 } 710 }
709 // No point proceeding if there's not a value to look at. 711 // No point proceeding if there's not a value to look at.
710 if (!value) 712 if (!value)
711 continue; 713 continue;
712 714
713 // Special case for background-repeat. 715 // Special case for background-repeat.
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 builder.append(", "); 881 builder.append(", ");
880 882
881 const CSSValue* xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX; 883 const CSSValue* xValue = repeatXList ? repeatXList->item(i % repeatXList ->length()) : repeatX;
882 const CSSValue* yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY; 884 const CSSValue* yValue = repeatYList ? repeatYList->item(i % repeatYList ->length()) : repeatY;
883 appendBackgroundRepeatValue(builder, *xValue, *yValue); 885 appendBackgroundRepeatValue(builder, *xValue, *yValue);
884 } 886 }
885 return builder.toString(); 887 return builder.toString();
886 } 888 }
887 889
888 } // namespace blink 890 } // namespace blink
OLDNEW
« 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