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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/StyleResolver.h ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 00a6932783cb37c7cff22d9e5a54b52d6e90fcb8..26002b980722fe06a4318b784865a91cf3d9db16 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -639,17 +639,17 @@ PassRefPtr<ComputedStyle> StyleResolver::styleForElement(Element* element, const
// This function is used by the WebAnimations JavaScript API method animate().
// FIXME: Remove this when animate() switches away from resolution-dependent parsing.
-PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, CSSValue* value)
+PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(Element& element, const ComputedStyle* baseStyle, CSSPropertyID property, NullableCSSValue value)
{
StyleResolverState state(element.document(), &element);
state.setStyle(baseStyle ? ComputedStyle::clone(*baseStyle) : ComputedStyle::create());
return createAnimatableValueSnapshot(state, property, value);
}
-PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(StyleResolverState& state, CSSPropertyID property, CSSValue* value)
+PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(StyleResolverState& state, CSSPropertyID property, NullableCSSValue value)
{
if (value) {
- StyleBuilder::applyProperty(property, state, value);
+ StyleBuilder::applyProperty(property, state, *value);
state.fontBuilder().createFont(state.document().styleEngine().fontSelector(), state.mutableStyleRef());
}
return CSSAnimatableValueFactory::create(property, *state.style());
@@ -1153,7 +1153,7 @@ static bool shouldIgnoreTextTrackAuthorStyle(Document& document)
// This method expands the 'all' shorthand property to longhand properties
// and applies the expanded longhand properties.
template <CSSPropertyPriority priority>
-void StyleResolver::applyAllProperty(StyleResolverState& state, CSSValue* allValue, bool inheritedOnly)
+void StyleResolver::applyAllProperty(StyleResolverState& state, CSSValue allValue, bool inheritedOnly)
{
unsigned startCSSProperty = CSSPropertyPriorityData<priority>::first();
unsigned endCSSProperty = CSSPropertyPriorityData<priority>::last();
@@ -1208,7 +1208,7 @@ void StyleResolver::applyProperties(StyleResolverState& state, const StyleProper
// If the property value is explicitly inherited, we need to apply further non-inherited properties
// as they might override the value inherited here. For this reason we don't allow declarations with
// explicitly inherited properties to be cached.
- ASSERT(!current.value()->isInheritedValue());
+ ASSERT(!current.value().isInheritedValue());
continue;
}
@@ -1402,7 +1402,7 @@ void StyleResolver::computeFont(ComputedStyle* style, const StylePropertySet& pr
for (CSSPropertyID property : properties) {
if (property == CSSPropertyLineHeight)
updateFont(state);
- StyleBuilder::applyProperty(property, state, propertySet.getPropertyCSSValue(property).get());
+ StyleBuilder::applyProperty(property, state, *propertySet.getPropertyCSSValue(property));
}
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698