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

Unified Diff: Source/core/editing/EditingStyle.cpp

Issue 1238943004: CSSValue Immediates: Replace CSSValue usage with const references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
Patch Set: Rebase Created 5 years, 5 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/resolver/TransformBuilder.cpp ('k') | Source/core/page/PageSerializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/EditingStyle.cpp
diff --git a/Source/core/editing/EditingStyle.cpp b/Source/core/editing/EditingStyle.cpp
index d19952dffcffc379d73042d7a9befd39c5d83cc8..17bb1b7b8ff0c8c6fff05462c3548e7693610ff0 100644
--- a/Source/core/editing/EditingStyle.cpp
+++ b/Source/core/editing/EditingStyle.cpp
@@ -149,7 +149,7 @@ 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 bool isTransparentColorValue(const NullableCSSValue&);
static bool hasTransparentBackgroundColor(CSSStyleDeclaration*);
static bool hasTransparentBackgroundColor(StylePropertySet*);
static NullableCSSValue backgroundColorInEffect(Node*);
@@ -1200,7 +1200,7 @@ void EditingStyle::mergeStyleFromRulesForSerialization(Element* element)
unsigned propertyCount = m_mutableStyle->propertyCount();
for (unsigned i = 0; i < propertyCount; ++i) {
StylePropertySet::PropertyReference property = m_mutableStyle->propertyAt(i);
- CSSValue value = property.value();
+ const CSSValue& value = property.value();
if (!value.isPrimitiveValue())
continue;
if (toCSSPrimitiveValue(value).isPercentage()) {
@@ -1570,7 +1570,7 @@ static void diffTextDecorations(MutableStylePropertySet* style, CSSPropertyID pr
setTextDecorationProperty(style, newTextDecoration.get(), propertyID);
}
-static bool fontWeightIsBold(CSSValue fontWeight)
+static bool fontWeightIsBold(const CSSValue& fontWeight)
{
if (!fontWeight.isPrimitiveValue())
return false;
@@ -1599,7 +1599,7 @@ static bool fontWeightIsBold(CSSValue fontWeight)
return false;
}
-static bool fontWeightNeedsResolving(CSSValue fontWeight)
+static bool fontWeightNeedsResolving(const CSSValue& fontWeight)
{
if (!fontWeight.isPrimitiveValue())
return true;
@@ -1681,7 +1681,7 @@ int legacyFontSizeFromCSSValue(Document* document, CSSPrimitiveValue* value, boo
return 0;
}
-bool isTransparentColorValue(NullableCSSValue cssValue)
+bool isTransparentColorValue(const NullableCSSValue& cssValue)
{
if (!cssValue)
return true;
« no previous file with comments | « Source/core/css/resolver/TransformBuilder.cpp ('k') | Source/core/page/PageSerializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698