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

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp

Issue 1377943005: Change StyleBuilderConverter functions to take const CSSValue&s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@style_map_references
Patch Set: Rebase Created 5 years, 2 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
Index: third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
index b191952d7e10f2eb2887c3880f93d4c52d1f092c..9791d32fe95a90f8533312f0d90ac88f995686f3 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
@@ -196,12 +196,11 @@ void CSSToStyleMap::mapFillSize(StyleResolverState& state, FillLayer* layer, con
if (value.isValuePair()) {
const CSSValuePair& pair = toCSSValuePair(value);
- // TODO(sashab): Make StyleBuilderConverter take const&s and remove these const_casts.
- firstLength = StyleBuilderConverter::convertLengthOrAuto(state, const_cast<CSSValue*>(&pair.first()));
- secondLength = StyleBuilderConverter::convertLengthOrAuto(state, const_cast<CSSValue*>(&pair.second()));
+ firstLength = StyleBuilderConverter::convertLengthOrAuto(state, pair.first());
+ secondLength = StyleBuilderConverter::convertLengthOrAuto(state, pair.second());
} else {
ASSERT(value.isPrimitiveValue());
- firstLength = StyleBuilderConverter::convertLengthOrAuto(state, const_cast<CSSValue*>(&value));
+ firstLength = StyleBuilderConverter::convertLengthOrAuto(state, value);
secondLength = Length();
}

Powered by Google App Engine
This is Rietveld 408576698