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

Unified Diff: Source/core/css/FontFace.cpp

Issue 333163004: Remove explicit bounds check from CSSValueList::item (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comment Created 6 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 | « Source/core/css/CSSValueList.idl ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontFace.cpp
diff --git a/Source/core/css/FontFace.cpp b/Source/core/css/FontFace.cpp
index c12f49e72675b61aa48061826edf9e6868701392..31e7ad8f328dd06bb1c856da405d7a637d06338d 100644
--- a/Source/core/css/FontFace.cpp
+++ b/Source/core/css/FontFace.cpp
@@ -319,7 +319,7 @@ bool FontFace::setFamilyValue(CSSValueList* familyList)
if (familyList->length() != 1)
return false;
- CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->itemWithoutBoundsCheck(0));
+ CSSPrimitiveValue* familyValue = toCSSPrimitiveValue(familyList->item(0));
AtomicString family;
if (familyValue->isString()) {
family = AtomicString(familyValue->getStringValue());
@@ -515,7 +515,7 @@ FontTraits FontFace::traits() const
return 0;
for (unsigned i = 0; i < numVariants; ++i) {
- switch (toCSSPrimitiveValue(variantList->itemWithoutBoundsCheck(i))->getValueID()) {
+ switch (toCSSPrimitiveValue(variantList->item(i))->getValueID()) {
case CSSValueNormal:
variant = FontVariantNormal;
break;
@@ -537,7 +537,7 @@ static PassOwnPtrWillBeRawPtr<CSSFontFace> createCSSFontFace(FontFace* fontFace,
if (CSSValueList* rangeList = toCSSValueList(unicodeRange)) {
unsigned numRanges = rangeList->length();
for (unsigned i = 0; i < numRanges; i++) {
- CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->itemWithoutBoundsCheck(i));
+ CSSUnicodeRangeValue* range = toCSSUnicodeRangeValue(rangeList->item(i));
ranges.append(CSSFontFace::UnicodeRange(range->from(), range->to()));
}
}
@@ -557,7 +557,7 @@ void FontFace::initCSSFontFace(Document* document, PassRefPtrWillBeRawPtr<CSSVal
for (int i = 0; i < srcLength; i++) {
// An item in the list either specifies a string (local font name) or a URL (remote font to download).
- CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->itemWithoutBoundsCheck(i));
+ CSSFontFaceSrcValue* item = toCSSFontFaceSrcValue(srcList->item(i));
OwnPtrWillBeRawPtr<CSSFontFaceSource> source = nullptr;
#if ENABLE(SVG_FONTS)
« no previous file with comments | « Source/core/css/CSSValueList.idl ('k') | Source/core/css/StylePropertySerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698