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

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

Issue 2044023005: Make PropertyReference value() return a const CSSValue& (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_remove_style_property_set_mutable_overload
Patch Set: Rebase Created 4 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
Index: third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index a2ecbec2f127243ed5afe9675bcaa1d22679c6c9..125366cb0ae615e8c79079d5de0ed9bfe53dbced 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -117,7 +117,7 @@ bool cacheCustomPropertiesForApplyAtRules(StyleResolverState& state, const Match
StylePropertySet::PropertyReference current = properties.propertyAt(i);
if (current.id() != CSSPropertyApplyAtRule)
continue;
- AtomicString name(toCSSCustomIdentValue(current.value())->value());
+ AtomicString name(toCSSCustomIdentValue(current.value()).value());
CSSVariableData* variableData = state.style()->variables()->getVariable(name);
if (!variableData)
continue;
@@ -1395,7 +1395,7 @@ static inline bool isPropertyInWhitelist(PropertyWhitelistType propertyWhitelist
// This method expands the 'all' shorthand property to longhand properties
// and applies the expanded longhand properties.
template <CSSPropertyPriority priority>
-void StyleResolver::applyAllProperty(StyleResolverState& state, const CSSValue* allValue, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
+void StyleResolver::applyAllProperty(StyleResolverState& state, const CSSValue& allValue, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
{
// The 'all' property doesn't apply to variables:
// https://drafts.csswg.org/css-variables/#defining-variables
@@ -1429,16 +1429,16 @@ void StyleResolver::applyAllProperty(StyleResolverState& state, const CSSValue*
if (inheritedOnly && !CSSPropertyMetadata::isInheritedProperty(propertyId))
continue;
- StyleBuilder::applyProperty(propertyId, state, *allValue);
+ StyleBuilder::applyProperty(propertyId, state, allValue);
}
}
template <CSSPropertyPriority priority>
-void StyleResolver::applyPropertiesForApplyAtRule(StyleResolverState& state, const CSSValue* value, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
+void StyleResolver::applyPropertiesForApplyAtRule(StyleResolverState& state, const CSSValue& value, bool isImportant, bool inheritedOnly, PropertyWhitelistType propertyWhitelistType)
{
if (!state.style()->variables())
return;
- const String& name = toCSSCustomIdentValue(value)->value();
+ const String& name = toCSSCustomIdentValue(value).value();
const StylePropertySet* propertySet = state.customPropertySetForApplyAtRule(name);
if (propertySet)
applyProperties<priority>(state, propertySet, isImportant, inheritedOnly, propertyWhitelistType);
@@ -1472,14 +1472,14 @@ 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());
+ DCHECK(!current.value().isInheritedValue());
continue;
}
if (!CSSPropertyPriorityData<priority>::propertyHasPriority(property))
continue;
- StyleBuilder::applyProperty(current.id(), state, *current.value());
+ StyleBuilder::applyProperty(current.id(), state, current.value());
}
}
« no previous file with comments | « third_party/WebKit/Source/core/css/resolver/StyleResolver.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698