| Index: Source/core/editing/EditingStyle.cpp
|
| diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
|
| index 16e2bcf61ac9825437f68c010054c806b79bdee0..82f1cc9196c08c42792b47c147066962004996ae 100644
|
| --- a/Source/core/editing/EditingStyle.cpp
|
| +++ b/Source/core/editing/EditingStyle.cpp
|
| @@ -148,8 +148,8 @@ static PassRefPtrWillBeRawPtr<MutableStylePropertySet> editingStyleFromComputedS
|
|
|
| static PassRefPtrWillBeRawPtr<MutableStylePropertySet> getPropertiesNotIn(StylePropertySet* styleWithRedundantProperties, CSSStyleDeclaration* baseStyle);
|
| enum LegacyFontSizeMode { AlwaysUseLegacyFontSize, UseLegacyFontSizeOnlyIfPixelValuesMatch };
|
| -static int legacyFontSizeFromCSSValue(Document*, CSSPrimitiveValue, bool, LegacyFontSizeMode);
|
| -static bool isTransparentColorValue(NullableCSSValue);
|
| +static int legacyFontSizeFromCSSValue(Document*, const CSSPrimitiveValue&, bool, LegacyFontSizeMode);
|
| +static bool isTransparentColorValue(const NullableCSSValue&);
|
| static bool hasTransparentBackgroundColor(CSSStyleDeclaration*);
|
| static bool hasTransparentBackgroundColor(StylePropertySet*);
|
| static NullableCSSValue backgroundColorInEffect(Node*);
|
| @@ -391,7 +391,7 @@ static RGBA32 cssValueToRGBA(NullableCSSValue colorValue)
|
| if (!colorValue || !colorValue->isPrimitiveValue())
|
| return Color::transparent;
|
|
|
| - CSSPrimitiveValue primitiveColor = toCSSPrimitiveValue(*colorValue);
|
| + const CSSPrimitiveValue& primitiveColor = toCSSPrimitiveValue(*colorValue);
|
| if (primitiveColor.isRGBColor())
|
| return primitiveColor.getRGBA32Value();
|
|
|
| @@ -523,7 +523,7 @@ void EditingStyle::extractFontSizeDelta()
|
| if (!value || !value->isPrimitiveValue())
|
| return;
|
|
|
| - CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(*value);
|
| + const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*value);
|
|
|
| // Only PX handled now. If we handle more types in the future, perhaps
|
| // a switch statement here would be more appropriate.
|
| @@ -1555,9 +1555,9 @@ void StyleChange::extractTextStyles(Document* document, MutableStylePropertySet*
|
| }
|
| }
|
|
|
| -static void diffTextDecorations(MutableStylePropertySet* style, CSSPropertyID propertyID, NullableCSSValue refTextDecoration)
|
| +static void diffTextDecorations(MutableStylePropertySet* style, CSSPropertyID propertyID, const NullableCSSValue& refTextDecoration)
|
| {
|
| - NullableCSSValue textDecoration = style->getPropertyCSSValue(propertyID);
|
| + const NullableCSSValue& textDecoration = style->getPropertyCSSValue(propertyID);
|
| if (!textDecoration || !textDecoration->isValueList() || !refTextDecoration || !refTextDecoration->isValueList())
|
| return;
|
|
|
| @@ -1660,7 +1660,7 @@ CSSValueID getIdentifierValue(CSSStyleDeclaration* style, CSSPropertyID property
|
| return toCSSPrimitiveValue(*value).getValueID();
|
| }
|
|
|
| -int legacyFontSizeFromCSSValue(Document* document, CSSPrimitiveValue value, bool isMonospaceFont, LegacyFontSizeMode mode)
|
| +int legacyFontSizeFromCSSValue(Document* document, const CSSPrimitiveValue& value, bool isMonospaceFont, LegacyFontSizeMode mode)
|
| {
|
| CSSPrimitiveValue::LengthUnitType lengthType;
|
| if (CSSPrimitiveValue::unitTypeToLengthUnitType(value.primitiveType(), lengthType)
|
| @@ -1681,13 +1681,13 @@ int legacyFontSizeFromCSSValue(Document* document, CSSPrimitiveValue value, bool
|
| return 0;
|
| }
|
|
|
| -bool isTransparentColorValue(NullableCSSValue cssValue)
|
| +bool isTransparentColorValue(const NullableCSSValue& cssValue)
|
| {
|
| if (!cssValue)
|
| return true;
|
| if (!cssValue->isPrimitiveValue())
|
| return false;
|
| - CSSPrimitiveValue value = toCSSPrimitiveValue(*cssValue);
|
| + const CSSPrimitiveValue& value = toCSSPrimitiveValue(*cssValue);
|
| if (value.isRGBColor())
|
| return !alphaChannel(value.getRGBA32Value());
|
| return value.getValueID() == CSSValueTransparent;
|
|
|