Index: third_party/WebKit/Source/core/style/MemberCopy.h |
diff --git a/third_party/WebKit/Source/core/style/MemberCopy.h b/third_party/WebKit/Source/core/style/MemberCopy.h |
index 93631e8109743eb38fe64c4a4fe431ed3c8db519..4fef934f9171108001a020e89bd0c7a1216bdf37 100644 |
--- a/third_party/WebKit/Source/core/style/MemberCopy.h |
+++ b/third_party/WebKit/Source/core/style/MemberCopy.h |
@@ -5,6 +5,10 @@ |
#ifndef MemberCopy_h |
#define MemberCopy_h |
+#include <memory> |
+#include "core/style/ContentData.h" |
+#include "core/style/DataPersistent.h" |
+#include "core/style/DataRef.h" |
#include "platform/heap/Persistent.h" |
#include "platform/wtf/RefPtr.h" |
@@ -20,6 +24,27 @@ Persistent<T> MemberCopy(const Persistent<T>& v) { |
return v; |
} |
+template <typename T> |
+std::unique_ptr<T> MemberCopy(const std::unique_ptr<T>& v) { |
+ return v ? v->Clone() : nullptr; |
+} |
+ |
+template <typename T> |
+DataPersistent<T> MemberCopy(const DataPersistent<T>& v) { |
+ return v; |
+} |
+ |
+// TODO(shend): Remove this once all subgroups of StyleRareNonInheritedData are |
+// generated |
+template <typename T> |
+DataRef<T> MemberCopy(const DataRef<T>& v) { |
+ return v; |
+} |
+ |
+inline Persistent<ContentData> MemberCopy(const Persistent<ContentData>& v) { |
+ return v ? v->Clone() : nullptr; |
+} |
+ |
} // namespace blink |
#endif // MemberCopy_h |