Index: third_party/WebKit/Source/core/css/FontFace.cpp |
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp |
index 669f361eb6f3d817e15bec8215e86f4d4458f8d6..771bba6e42a68c62a8f2ae00a02f75f6b0dea82a 100644 |
--- a/third_party/WebKit/Source/core/css/FontFace.cpp |
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp |
@@ -63,7 +63,7 @@ |
namespace blink { |
-static CSSValue* parseCSSValue(const Document* document, const String& value, CSSPropertyID propertyID) |
+static const CSSValue* parseCSSValue(const Document* document, const String& value, CSSPropertyID propertyID) |
{ |
CSSParserContext context(*document, UseCounter::getFrom(document)); |
return CSSParser::parseFontFaceDescriptor(propertyID, value, context); |
@@ -85,7 +85,7 @@ FontFace* FontFace::create(ExecutionContext* context, const AtomicString& family |
{ |
FontFace* fontFace = new FontFace(context, family, descriptors); |
- CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc); |
+ const CSSValue* src = parseCSSValue(toDocument(context), source, CSSPropertySrc); |
if (!src || !src->isValueList()) |
fontFace->setError(DOMException::create(SyntaxError, "The source provided ('" + source + "') could not be parsed as a value list.")); |
@@ -228,7 +228,7 @@ void FontFace::setFeatureSettings(ExecutionContext* context, const String& s, Ex |
void FontFace::setPropertyFromString(const Document* document, const String& s, CSSPropertyID propertyID, ExceptionState* exceptionState) |
{ |
- CSSValue* value = parseCSSValue(document, s, propertyID); |
+ const CSSValue* value = parseCSSValue(document, s, propertyID); |
if (value && setPropertyValue(value, propertyID)) |
return; |
@@ -244,7 +244,7 @@ bool FontFace::setPropertyFromStyle(const StylePropertySet& properties, CSSPrope |
return setPropertyValue(properties.getPropertyCSSValue(propertyID), propertyID); |
} |
-bool FontFace::setPropertyValue(CSSValue* value, CSSPropertyID propertyID) |
+bool FontFace::setPropertyValue(const CSSValue* value, CSSPropertyID propertyID) |
{ |
switch (propertyID) { |
case CSSPropertyFontStyle: |
@@ -510,7 +510,7 @@ size_t FontFace::approximateBlankCharacterCount() const |
return 0; |
} |
-static FontDisplay CSSValueToFontDisplay(CSSValue* value) |
+static FontDisplay CSSValueToFontDisplay(const CSSValue* value) |
{ |
if (value && value->isPrimitiveValue()) { |
switch (toCSSPrimitiveValue(value)->getValueID()) { |
@@ -531,10 +531,10 @@ static FontDisplay CSSValueToFontDisplay(CSSValue* value) |
return FontDisplayAuto; |
} |
-static CSSFontFace* createCSSFontFace(FontFace* fontFace, CSSValue* unicodeRange) |
+static CSSFontFace* createCSSFontFace(FontFace* fontFace, const CSSValue* unicodeRange) |
{ |
Vector<UnicodeRange> ranges; |
- if (CSSValueList* rangeList = toCSSValueList(unicodeRange)) { |
+ if (const CSSValueList* rangeList = toCSSValueList(unicodeRange)) { |
unsigned numRanges = rangeList->length(); |
for (unsigned i = 0; i < numRanges; i++) { |
const CSSUnicodeRangeValue& range = toCSSUnicodeRangeValue(rangeList->item(i)); |
@@ -545,7 +545,7 @@ static CSSFontFace* createCSSFontFace(FontFace* fontFace, CSSValue* unicodeRange |
return new CSSFontFace(fontFace, ranges); |
} |
-void FontFace::initCSSFontFace(Document* document, CSSValue* src) |
+void FontFace::initCSSFontFace(Document* document, const CSSValue* src) |
{ |
m_cssFontFace = createCSSFontFace(this, m_unicodeRange.get()); |
if (m_error) |
@@ -554,7 +554,7 @@ void FontFace::initCSSFontFace(Document* document, CSSValue* src) |
// Each item in the src property's list is a single CSSFontFaceSource. Put them all into a CSSFontFace. |
ASSERT(src); |
ASSERT(src->isValueList()); |
- CSSValueList* srcList = toCSSValueList(src); |
+ const CSSValueList* srcList = toCSSValueList(src); |
int srcLength = srcList->length(); |
for (int i = 0; i < srcLength; i++) { |