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

Unified Diff: third_party/WebKit/Source/core/css/StylePropertySet.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/StylePropertySet.cpp
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
index 04da3ec817a457dbd5b40ff50f6c7899b34ec82f..d1403c0a78c9ea9fd1222fb532b343a52d1cfa73 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
@@ -42,10 +42,10 @@ namespace blink {
static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count)
{
- return sizeof(ImmutableStylePropertySet) - sizeof(void*) + sizeof(RawPtrWillBeMember<CSSValue>) * count + sizeof(StylePropertyMetadata) * count;
+ return sizeof(ImmutableStylePropertySet) - sizeof(void*) + sizeof(Member<CSSValue>) * count + sizeof(StylePropertyMetadata) * count;
}
-PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
+RawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode)
{
ASSERT(count <= MaxArraySize);
#if ENABLE(OILPAN)
@@ -53,10 +53,10 @@ PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::cre
#else
void* slot = WTF::Partitions::fastMalloc(sizeForImmutableStylePropertySetWithPropertyCount(count), "blink::ImmutableStylePropertySet");
#endif // ENABLE(OILPAN)
- return adoptRefWillBeNoop(new (slot) ImmutableStylePropertySet(properties, count, cssParserMode));
+ return (new (slot) ImmutableStylePropertySet(properties, count, cssParserMode));
}
-PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> StylePropertySet::immutableCopyIfNeeded() const
+RawPtr<ImmutableStylePropertySet> StylePropertySet::immutableCopyIfNeeded() const
{
if (!isMutable())
return toImmutableStylePropertySet(const_cast<StylePropertySet*>(this));
@@ -81,7 +81,7 @@ ImmutableStylePropertySet::ImmutableStylePropertySet(const CSSProperty* properti
: StylePropertySet(cssParserMode, length)
{
StylePropertyMetadata* metadataArray = const_cast<StylePropertyMetadata*>(this->metadataArray());
- RawPtrWillBeMember<CSSValue>* valueArray = const_cast<RawPtrWillBeMember<CSSValue>*>(this->valueArray());
+ Member<CSSValue>* valueArray = const_cast<Member<CSSValue>*>(this->valueArray());
for (unsigned i = 0; i < m_arraySize; ++i) {
metadataArray[i] = properties[i].metadata();
valueArray[i] = properties[i].value();
@@ -94,7 +94,7 @@ ImmutableStylePropertySet::ImmutableStylePropertySet(const CSSProperty* properti
ImmutableStylePropertySet::~ImmutableStylePropertySet()
{
#if !ENABLE(OILPAN)
- RawPtrWillBeMember<CSSValue>* valueArray = const_cast<RawPtrWillBeMember<CSSValue>*>(this->valueArray());
+ Member<CSSValue>* valueArray = const_cast<Member<CSSValue>*>(this->valueArray());
for (unsigned i = 0; i < m_arraySize; ++i) {
// Checking for nullptr here is a workaround to prevent crashing. http://crbug.com/449032
if (valueArray[i])
@@ -147,7 +147,7 @@ template CORE_EXPORT int ImmutableStylePropertySet::findPropertyIndex(AtomicStri
DEFINE_TRACE_AFTER_DISPATCH(ImmutableStylePropertySet)
{
- const RawPtrWillBeMember<CSSValue>* values = valueArray();
+ const Member<CSSValue>* values = valueArray();
for (unsigned i = 0; i < m_arraySize; i++)
visitor->trace(values[i]);
StylePropertySet::traceAfterDispatch(visitor);
@@ -179,7 +179,7 @@ static String serializeShorthand(const StylePropertySet&, const AtomicString& cu
template<typename T>
String StylePropertySet::getPropertyValue(T property) const
{
- RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(property);
+ RawPtr<CSSValue> value = getPropertyCSSValue(property);
if (value)
return value->cssText();
return serializeShorthand(*this, property);
@@ -188,15 +188,15 @@ template CORE_EXPORT String StylePropertySet::getPropertyValue<CSSPropertyID>(CS
template CORE_EXPORT String StylePropertySet::getPropertyValue<AtomicString>(AtomicString) const;
template<typename T>
-PassRefPtrWillBeRawPtr<CSSValue> StylePropertySet::getPropertyCSSValue(T property) const
+RawPtr<CSSValue> StylePropertySet::getPropertyCSSValue(T property) const
{
int foundPropertyIndex = findPropertyIndex(property);
if (foundPropertyIndex == -1)
return nullptr;
return propertyAt(foundPropertyIndex).value();
}
-template CORE_EXPORT PassRefPtrWillBeRawPtr<CSSValue> StylePropertySet::getPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const;
-template CORE_EXPORT PassRefPtrWillBeRawPtr<CSSValue> StylePropertySet::getPropertyCSSValue<AtomicString>(AtomicString) const;
+template CORE_EXPORT RawPtr<CSSValue> StylePropertySet::getPropertyCSSValue<CSSPropertyID>(CSSPropertyID) const;
+template CORE_EXPORT RawPtr<CSSValue> StylePropertySet::getPropertyCSSValue<AtomicString>(AtomicString) const;
DEFINE_TRACE(StylePropertySet)
{
@@ -324,7 +324,7 @@ bool MutableStylePropertySet::setProperty(const AtomicString& customPropertyName
return CSSParser::parseValueForCustomProperty(this, customPropertyName, value, important, contextStyleSheet);
}
-void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtrWillBeRawPtr<CSSValue> prpValue, bool important)
+void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, RawPtr<CSSValue> prpValue, bool important)
{
StylePropertyShorthand shorthand = shorthandForProperty(propertyID);
if (!shorthand.length()) {
@@ -334,7 +334,7 @@ void MutableStylePropertySet::setProperty(CSSPropertyID propertyID, PassRefPtrWi
removePropertiesInSet(shorthand.properties(), shorthand.length());
- RefPtrWillBeRawPtr<CSSValue> value = prpValue;
+ RawPtr<CSSValue> value = prpValue;
for (unsigned i = 0; i < shorthand.length(); ++i)
m_propertyVector.append(CSSProperty(shorthand.properties()[i], value, important));
}
@@ -373,7 +373,7 @@ void MutableStylePropertySet::parseDeclarationList(const String& styleDeclaratio
CSSParser::parseDeclarationList(context, this, styleDeclaration);
}
-bool MutableStylePropertySet::addParsedProperties(const WillBeHeapVector<CSSProperty, 256>& properties)
+bool MutableStylePropertySet::addParsedProperties(const HeapVector<CSSProperty, 256>& properties)
{
bool changed = false;
m_propertyVector.reserveCapacity(m_propertyVector.size() + properties.size());
@@ -505,17 +505,17 @@ void MutableStylePropertySet::removeEquivalentProperties(const CSSStyleDeclarati
removeProperty(propertiesToRemove[i]);
}
-PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::mutableCopy() const
+RawPtr<MutableStylePropertySet> StylePropertySet::mutableCopy() const
{
- return adoptRefWillBeNoop(new MutableStylePropertySet(*this));
+ return (new MutableStylePropertySet(*this));
}
-PassRefPtrWillBeRawPtr<MutableStylePropertySet> StylePropertySet::copyPropertiesInSet(const Vector<CSSPropertyID>& properties) const
+RawPtr<MutableStylePropertySet> StylePropertySet::copyPropertiesInSet(const Vector<CSSPropertyID>& properties) const
{
- WillBeHeapVector<CSSProperty, 256> list;
+ HeapVector<CSSProperty, 256> list;
list.reserveInitialCapacity(properties.size());
for (unsigned i = 0; i < properties.size(); ++i) {
- RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
+ RawPtr<CSSValue> value = getPropertyCSSValue(properties[i]);
if (value)
list.append(CSSProperty(properties[i], value.release(), false));
}
@@ -531,7 +531,7 @@ CSSStyleDeclaration* MutableStylePropertySet::ensureCSSStyleDeclaration()
ASSERT(!m_cssomWrapper->parentElement());
return m_cssomWrapper.get();
}
- m_cssomWrapper = adoptPtrWillBeNoop(new PropertySetCSSStyleDeclaration(*this));
+ m_cssomWrapper = (new PropertySetCSSStyleDeclaration(*this));
return m_cssomWrapper.get();
}
@@ -568,7 +568,7 @@ unsigned StylePropertySet::averageSizeInBytes()
}
// See the function above if you need to update this.
-struct SameSizeAsStylePropertySet : public RefCountedWillBeGarbageCollectedFinalized<SameSizeAsStylePropertySet> {
+struct SameSizeAsStylePropertySet : public GarbageCollectedFinalized<SameSizeAsStylePropertySet> {
unsigned bitfield;
};
static_assert(sizeof(StylePropertySet) == sizeof(SameSizeAsStylePropertySet), "StylePropertySet should stay small");
@@ -580,14 +580,14 @@ void StylePropertySet::showStyle()
}
#endif
-PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(CSSParserMode cssParserMode)
+RawPtr<MutableStylePropertySet> MutableStylePropertySet::create(CSSParserMode cssParserMode)
{
- return adoptRefWillBeNoop(new MutableStylePropertySet(cssParserMode));
+ return (new MutableStylePropertySet(cssParserMode));
}
-PassRefPtrWillBeRawPtr<MutableStylePropertySet> MutableStylePropertySet::create(const CSSProperty* properties, unsigned count)
+RawPtr<MutableStylePropertySet> MutableStylePropertySet::create(const CSSProperty* properties, unsigned count)
{
- return adoptRefWillBeNoop(new MutableStylePropertySet(properties, count));
+ return (new MutableStylePropertySet(properties, count));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698