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

Unified Diff: Source/core/css/CSSValue.h

Issue 184853009: Revert of Move all RefPtr's to CSSValue to oilpan transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/core/css/CSSProperty.cpp ('k') | Source/core/css/CSSValueList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValue.h
diff --git a/Source/core/css/CSSValue.h b/Source/core/css/CSSValue.h
index 8fac4cdab47d162ed6d9ca8c4d733e8de88abe3c..797ad4f5b7ffa7fd91df9316c3b038477b0aad42 100644
--- a/Source/core/css/CSSValue.h
+++ b/Source/core/css/CSSValue.h
@@ -224,15 +224,15 @@
};
template<typename CSSValueType, size_t inlineCapacity>
-inline bool compareCSSValueVector(const WillBeHeapVector<RefPtrWillBeMember<CSSValueType>, inlineCapacity>& firstVector, const WillBeHeapVector<RefPtrWillBeMember<CSSValueType>, inlineCapacity>& secondVector)
+inline bool compareCSSValueVector(const Vector<RefPtr<CSSValueType>, inlineCapacity>& firstVector, const Vector<RefPtr<CSSValueType>, inlineCapacity>& secondVector)
{
size_t size = firstVector.size();
if (size != secondVector.size())
return false;
for (size_t i = 0; i < size; i++) {
- const RefPtrWillBeMember<CSSValueType>& firstPtr = firstVector[i];
- const RefPtrWillBeMember<CSSValueType>& secondPtr = secondVector[i];
+ const RefPtr<CSSValueType>& firstPtr = firstVector[i];
+ const RefPtr<CSSValueType>& secondPtr = secondVector[i];
if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals(*secondPtr)))
continue;
return false;
@@ -240,6 +240,25 @@
return true;
}
+// FIXME: oilpan: this will be merged with the above compareCSSVector method
+// once CSSValue is moved to the transition types.
+template<typename CSSValueType, size_t inlineCapacity>
+inline bool compareCSSValueVector(const HeapVector<Member<CSSValueType>, inlineCapacity>& firstVector, const HeapVector<Member<CSSValueType>, inlineCapacity>& secondVector)
+{
+ size_t size = firstVector.size();
+ if (size != secondVector.size())
+ return false;
+
+ for (size_t i = 0; i < size; i++) {
+ const Member<CSSValueType>& firstPtr = firstVector[i];
+ const Member<CSSValueType>& secondPtr = secondVector[i];
+ if (firstPtr == secondPtr || (firstPtr && secondPtr && firstPtr->equals(*secondPtr)))
+ continue;
+ return false;
+ }
+ return true;
+}
+
template<typename CSSValueType>
inline bool compareCSSValuePtr(const RefPtr<CSSValueType>& first, const RefPtr<CSSValueType>& second)
{
« no previous file with comments | « Source/core/css/CSSProperty.cpp ('k') | Source/core/css/CSSValueList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698