Index: Source/core/dom/SomeDictionaryUser.cpp |
diff --git a/Source/core/dom/SomeDictionaryUser.cpp b/Source/core/dom/SomeDictionaryUser.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e768e82f4026869e96b84ed958a49cb6f6b0c190 |
--- /dev/null |
+++ b/Source/core/dom/SomeDictionaryUser.cpp |
@@ -0,0 +1,46 @@ |
+// NOT FOR LAND |
+#include "config.h" |
+#include "SomeDictionaryUser.h" |
+ |
+namespace WebCore { |
+ |
+SomeDictionaryUser::SomeDictionaryUser() |
+ : m_a(0) |
+ , m_b(2) |
+{ |
+ ScriptWrappable::init(this); |
+} |
+ |
+SomeDictionaryUser::~SomeDictionaryUser() |
+{ |
+} |
+ |
+void SomeDictionaryUser::set(const SomeDictionary* someDictionary) |
+{ |
+ if (someDictionary->hasA()) |
+ m_a = someDictionary->a(); |
+ m_b = someDictionary->b(); |
+ m_stringMember = someDictionary->stringMember(); |
+ m_element = someDictionary->element(); |
+ if (someDictionary->hasNullableBooleanMember()) |
+ m_nullableBooleanMember = someDictionary->nullableBooleanMember(); |
+ m_stringSequenceMember = someDictionary->stringSequenceMember(); |
+ m_elementArrayMember = someDictionary->elementArrayMember(); |
+} |
+ |
+SomeDictionary* SomeDictionaryUser::get() |
+{ |
+ SomeDictionary* result = SomeDictionary::create(); |
+ if (m_a) |
+ result->setA(m_a.get()); |
+ result->setB(m_b); |
+ result->setStringMember(m_stringMember); |
+ result->setElement(m_element); |
+ if (m_nullableBooleanMember) |
+ result->setNullableBooleanMember(m_nullableBooleanMember); |
+ result->setStringSequenceMember(m_stringSequenceMember); |
+ result->setElementArrayMember(m_elementArrayMember); |
+ return result; |
+} |
+ |
+} |