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/ApplyStyleCommand.cpp

Issue 1249553002: CSSValue Immediates: Add move operators to CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_3_tagged_ptrs_with_copy_ops_mv_operators_ref_primvalue
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/dom/TextLinkColors.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ApplyStyleCommand.cpp
diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
index d773b8a65df4093f87f81c55a301d08369d01a52..198c63df23e9d8b7cd23fa92c5fbbba57b78cb9b 100644
--- a/Source/core/editing/ApplyStyleCommand.cpp
+++ b/Source/core/editing/ApplyStyleCommand.cpp
@@ -414,7 +414,7 @@ void ApplyStyleCommand::applyRelativeFontStyleChange(EditingStyle* style)
RefPtrWillBeRawPtr<MutableStylePropertySet> inlineStyle = copyStyleOrCreateEmpty(element->inlineStyle());
float currentFontSize = computedFontSize(node);
float desiredFontSize = max(MinimumFontSize, startingFontSizes.get(node) + style->fontSizeDelta());
- NullableCSSValue value = inlineStyle->getPropertyCSSValue(CSSPropertyFontSize);
+ const NullableCSSValue& value = inlineStyle->getPropertyCSSValue(CSSPropertyFontSize);
if (value) {
element->removeInlineStyleProperty(CSSPropertyFontSize);
currentFontSize = computedFontSize(node);
@@ -1548,7 +1548,7 @@ float ApplyStyleCommand::computedFontSize(Node* node)
if (!value)
return 0;
- CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*value);
+ const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
ASSERT(primitiveValue.primitiveType() == CSSPrimitiveValue::CSS_PX);
return primitiveValue.getFloatValue();
}
« no previous file with comments | « Source/core/dom/TextLinkColors.cpp ('k') | Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698