2010-07-30  Kinuko Yasuda  <kinuko@chromium.org>

        Reviewed by Dumitru Daniliuc.

        Add idl and mock implementation for HTML5 FileSystem API
        https://bugs.webkit.org/show_bug.cgi?id=43134

        Add idl for: FileSystem (as DOMFileSystem), Entry, Flags, Metadata,
        FileSystemCallback, EntryCallback and ErrorCallback.
        http://dev.w3.org/2009/dap/file-system/file-dir-sys.html

        They are added only for Mac and chromium.

        Tests will be added when we expose the entry point and add implementation.

        * DerivedSources.make:
        * WebCore.gypi:
        * WebCore.xcodeproj/project.pbxproj:

        * storage/DOMFileSystem.cpp: Added.
        * storage/DOMFileSystem.h: Added.
        * storage/DOMFileSystem.idl: Added.
        * storage/Entry.cpp: Added.
        * storage/Entry.h: Added.
        * storage/Entry.idl: Added.
        * storage/EntryCallback.h: Added.
        * storage/EntryCallback.idl: Added.
        * storage/ErrorCallback.h: Added.
        * storage/ErrorCallback.idl: Added.
        * storage/FileSystemCallback.h: Added.
        * storage/FileSystemCallback.idl: Added.
        * storage/Flags.h: Added.
        * storage/Flags.idl: Added.
        * storage/Metadata.h: Added.
        * storage/Metadata.idl: Added.
        * storage/MetadataCallback.h: Added.
        * storage/MetadataCallback.idl: Added.

        * bindings/scripts/CodeGenerator.pm: Added special case handlings for generating setter/getter names for CREATE/EXCLUSIVE attributes in Flags.idl.

        * bindings/scripts/test/TestObj.idl: Updated.
        * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated.
        * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated.
        * bindings/scripts/test/CPP/WebDOMTestObj.h: Updated.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
        * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Updated.
        * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
        * bindings/scripts/test/JS/JSTestObj.h: Updated.
        * bindings/scripts/test/ObjC/DOMTestObj.h: Updated.
        * bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64414 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/bindings/scripts/CodeGenerator.pm b/WebCore/bindings/scripts/CodeGenerator.pm
index 363fdc5..adc47d0 100644
--- a/WebCore/bindings/scripts/CodeGenerator.pm
+++ b/WebCore/bindings/scripts/CodeGenerator.pm
@@ -343,6 +343,11 @@
     my ($object, $param) = @_;
     my $ret = ucfirst($param);
     $ret =~ s/Xml/XML/ if $ret =~ /^Xml[^a-z]/;
+
+    # For HTML5 FileSystem API Flags attributes.
+    $ret =~ s/^CREATE/Create/ if $ret =~ /^CREATE$/;
+    $ret =~ s/^EXCLUSIVE/Exclusive/ if $ret =~ /^EXCLUSIVE$/;
+
     return $ret;
 }
 
@@ -357,6 +362,11 @@
     $ret =~ s/jS/js/ if $ret =~ /^jS/;
     $ret =~ s/xML/xml/ if $ret =~ /^xML/;
     $ret =~ s/xSLT/xslt/ if $ret =~ /^xSLT/;
+
+    # For HTML5 FileSystem API Flags attributes.
+    $ret =~ s/^cREATE/isCreate/ if $ret =~ /^cREATE$/;
+    $ret =~ s/^eXCLUSIVE/isExclusive/ if $ret =~ /^eXCLUSIVE$/;
+
     return $ret;
 }
 
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
index 179b301..6e5326f 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
@@ -29,8 +29,10 @@
 #include "TestObj.h"
 #include "WebDOMIDBKey.h"
 #include "WebDOMString.h"
+#include "WebDOMbool.h"
 #include "WebExceptionHandler.h"
 #include "WebNativeEventListener.h"
+#include "bool.h"
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -176,6 +178,38 @@
     impl()->setTestObjAttr(toWebCore(newTestObjAttr));
 }
 
+WebDOMTestObj WebDOMTestObj::XMLObjAttr() const
+{
+    if (!impl())
+        return WebDOMTestObj();
+
+    return toWebKit(WTF::getPtr(impl()->xmlObjAttr()));
+}
+
+void WebDOMTestObj::setXMLObjAttr(const WebDOMTestObj& newXMLObjAttr)
+{
+    if (!impl())
+        return;
+
+    impl()->setXMLObjAttr(toWebCore(newXMLObjAttr));
+}
+
+WebDOMbool WebDOMTestObj::CREATE() const
+{
+    if (!impl())
+        return WebDOMbool();
+
+    return toWebKit(WTF::getPtr(impl()->isCreate()));
+}
+
+void WebDOMTestObj::setCREATE(const WebDOMbool& newCREATE)
+{
+    if (!impl())
+        return;
+
+    impl()->setCreate(toWebCore(newCREATE));
+}
+
 WebDOMString WebDOMTestObj::reflectedStringAttr() const
 {
     if (!impl())
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index 09c77db..acc93eb 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -34,6 +34,7 @@
 class WebDOMIDBKey;
 class WebDOMString;
 class WebDOMTestObj;
+class WebDOMbool;
 
 class WebDOMTestObj : public WebDOMObject {
 public:
@@ -69,6 +70,10 @@
     void setStringAttr(const WebDOMString&);
     WebDOMTestObj testObjAttr() const;
     void setTestObjAttr(const WebDOMTestObj&);
+    WebDOMTestObj XMLObjAttr() const;
+    void setXMLObjAttr(const WebDOMTestObj&);
+    WebDOMbool CREATE() const;
+    void setCREATE(const WebDOMbool&);
     WebDOMString reflectedStringAttr() const;
     void setReflectedStringAttr(const WebDOMString&);
     int reflectedIntegralAttr() const;
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
index b4b6787..82b90ad 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -28,6 +28,7 @@
 #include "JSMainThreadExecState.h"
 #include "TestObj.h"
 #include "WebKitDOMBinding.h"
+#include "bool.h"
 #include "gobject/ConvertToUTF8String.h"
 #include "webkit/WebKitDOMIDBKey.h"
 #include "webkit/WebKitDOMIDBKeyPrivate.h"
@@ -35,6 +36,8 @@
 #include "webkit/WebKitDOMSerializedScriptValuePrivate.h"
 #include "webkit/WebKitDOMTestObj.h"
 #include "webkit/WebKitDOMTestObjPrivate.h"
+#include "webkit/WebKitDOMbool.h"
+#include "webkit/WebKitDOMboolPrivate.h"
 #include "webkitmarshal.h"
 #include "webkitprivate.h"
 
@@ -475,6 +478,52 @@
     item->setTestObjAttr(converted_value);
 }
 
+WebKitDOMTestObj* 
+webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(self, 0);
+    WebCore::TestObj * item = WebKit::core(self);
+    PassRefPtr<WebCore::TestObj> g_res = WTF::getPtr(item->xmlObjAttr());
+    WebKitDOMTestObj*  res = static_cast<WebKitDOMTestObj* >(WebKit::kit(g_res.get()));
+    return res;
+}
+
+void
+webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*  value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(self);
+    WebCore::TestObj * item = WebKit::core(self);
+    g_return_if_fail(value);
+    WebCore::TestObj * converted_value = WebKit::core(value);
+    g_return_if_fail(converted_value);
+    item->setXMLObjAttr(converted_value);
+}
+
+WebKitDOMbool* 
+webkit_dom_test_obj_get_create(WebKitDOMTestObj* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(self, 0);
+    WebCore::TestObj * item = WebKit::core(self);
+    PassRefPtr<WebCore::bool> g_res = WTF::getPtr(item->isCreate());
+    WebKitDOMbool*  res = static_cast<WebKitDOMbool* >(WebKit::kit(g_res.get()));
+    return res;
+}
+
+void
+webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, WebKitDOMbool*  value)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(self);
+    WebCore::TestObj * item = WebKit::core(self);
+    g_return_if_fail(value);
+    WebCore::bool * converted_value = WebKit::core(value);
+    g_return_if_fail(converted_value);
+    item->setCreate(converted_value);
+}
+
 gchar* 
 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self)
 {
@@ -932,6 +981,8 @@
     PROP_UNSIGNED_LONG_LONG_ATTR,
     PROP_STRING_ATTR,
     PROP_TEST_OBJ_ATTR,
+    PROP_XML_OBJ_ATTR,
+    PROP_CREATE,
     PROP_REFLECTED_STRING_ATTR,
     PROP_REFLECTED_INTEGRAL_ATTR,
     PROP_REFLECTED_BOOLEAN_ATTR,
@@ -1155,6 +1206,18 @@
         g_value_set_object(value, WebKit::kit(ptr.get()));
         break;
     }
+    case PROP_XML_OBJ_ATTR:
+    {
+        RefPtr<WebCore::TestObj> ptr = coreSelf->xmlObjAttr();
+        g_value_set_object(value, WebKit::kit(ptr.get()));
+        break;
+    }
+    case PROP_CREATE:
+    {
+        RefPtr<WebCore::bool> ptr = coreSelf->isCreate();
+        g_value_set_object(value, WebKit::kit(ptr.get()));
+        break;
+    }
     case PROP_REFLECTED_STRING_ATTR:
     {
         g_value_take_string(value, convertToUTF8String(coreSelf->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr)));
@@ -1355,6 +1418,20 @@
                                                            WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
                                                            WEBKIT_PARAM_READWRITE));
     g_object_class_install_property(gobjectClass,
+                                    PROP_XML_OBJ_ATTR,
+                                    g_param_spec_object("xml-obj-attr", /* name */
+                                                           "test_obj_xml-obj-attr", /* short description */
+                                                           "read-write  WebKitDOMTestObj*  TestObj.xml-obj-attr", /* longer - could do with some extra doc stuff here */
+                                                           WEBKIT_TYPE_DOM_TEST_OBJ, /* gobject type */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
+                                    PROP_CREATE,
+                                    g_param_spec_object("create", /* name */
+                                                           "test_obj_create", /* short description */
+                                                           "read-write  WebKitDOMbool*  TestObj.create", /* longer - could do with some extra doc stuff here */
+                                                           WEBKIT_TYPE_DOM_BOOL, /* gobject type */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
                                     PROP_REFLECTED_STRING_ATTR,
                                     g_param_spec_string("reflected-string-attr", /* name */
                                                            "test_obj_reflected-string-attr", /* short description */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
index baf278c..6408823 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
@@ -163,6 +163,18 @@
 WEBKIT_API void
 webkit_dom_test_obj_set_test_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*  value);
 
+WEBKIT_API WebKitDOMTestObj* 
+webkit_dom_test_obj_get_xml_obj_attr(WebKitDOMTestObj* self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_xml_obj_attr(WebKitDOMTestObj* self, WebKitDOMTestObj*  value);
+
+WEBKIT_API WebKitDOMbool* 
+webkit_dom_test_obj_get_create(WebKitDOMTestObj* self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_create(WebKitDOMTestObj* self, WebKitDOMbool*  value);
+
 WEBKIT_API gchar* 
 webkit_dom_test_obj_get_reflected_string_attr(WebKitDOMTestObj* self);
 
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 6d184b6..11b9d7b 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -28,11 +28,13 @@
 #include "JSEventListener.h"
 #include "JSTestCallback.h"
 #include "JSTestObj.h"
+#include "JSbool.h"
 #include "JSlog.h"
 #include "KURL.h"
 #include "ScriptCallStack.h"
 #include "SerializedScriptValue.h"
 #include "TestObj.h"
+#include "bool.h"
 #include <runtime/Error.h>
 #include <runtime/JSNumberCell.h>
 #include <runtime/JSString.h>
@@ -51,7 +53,7 @@
 #define THUNK_GENERATOR(generator)
 #endif
 
-static const HashTableValue JSTestObjTableValues[32] =
+static const HashTableValue JSTestObjTableValues[34] =
 {
     { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) },
     { "readOnlyStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t)0 THUNK_GENERATOR(0) },
@@ -61,6 +63,8 @@
     { "unsignedLongLongAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjUnsignedLongLongAttr), (intptr_t)setJSTestObjUnsignedLongLongAttr THUNK_GENERATOR(0) },
     { "stringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjStringAttr), (intptr_t)setJSTestObjStringAttr THUNK_GENERATOR(0) },
     { "testObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjTestObjAttr), (intptr_t)setJSTestObjTestObjAttr THUNK_GENERATOR(0) },
+    { "XMLObjAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjXMLObjAttr), (intptr_t)setJSTestObjXMLObjAttr THUNK_GENERATOR(0) },
+    { "CREATE", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t)setJSTestObjCreate THUNK_GENERATOR(0) },
     { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr THUNK_GENERATOR(0) },
     { "reflectedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t)setJSTestObjReflectedIntegralAttr THUNK_GENERATOR(0) },
     { "reflectedBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t)setJSTestObjReflectedBooleanAttr THUNK_GENERATOR(0) },
@@ -94,7 +98,7 @@
 };
 
 #undef THUNK_GENERATOR
-static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 68, 63, JSTestObjTableValues, 0 };
+static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 132, 127, JSTestObjTableValues, 0 };
 /* Hash table for constructor */
 #if ENABLE(JIT)
 #define THUNK_GENERATOR(generator) , generator
@@ -342,6 +346,24 @@
     return result;
 }
 
+JSValue jsTestObjXMLObjAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->xmlObjAttr()));
+    return result;
+}
+
+JSValue jsTestObjCreate(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->isCreate()));
+    return result;
+}
+
 JSValue jsTestObjReflectedStringAttr(ExecState* exec, JSValue slotBase, const Identifier&)
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
@@ -590,6 +612,20 @@
     imp->setTestObjAttr(toTestObj(value));
 }
 
+void setJSTestObjXMLObjAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    imp->setXMLObjAttr(toTestObj(value));
+}
+
+void setJSTestObjCreate(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    imp->setCreate(tobool(value));
+}
+
 void setJSTestObjReflectedStringAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
index a6eb56f..993df8c 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -134,6 +134,10 @@
 void setJSTestObjStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjTestObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 void setJSTestObjTestObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjXMLObjAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjCreate(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjCreate(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
index a96b499..21c664e 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -30,6 +30,7 @@
 
 @class DOMIDBKey;
 @class DOMTestObj;
+@class DOMbool;
 @class DOMlog;
 @class NSString;
 @protocol DOMEventListener;
@@ -62,6 +63,10 @@
 - (void)setStringAttr:(NSString *)newStringAttr;
 - (DOMTestObj *)testObjAttr;
 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr;
+- (DOMTestObj *)XMLObjAttr;
+- (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr;
+- (DOMbool *)CREATE;
+- (void)setCREATE:(DOMbool *)newCREATE;
 - (NSString *)reflectedStringAttr;
 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
 - (int)reflectedIntegralAttr;
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
index 99c3cc6..e23d5a5 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
@@ -37,6 +37,7 @@
 #import "DOMNodeInternal.h"
 #import "DOMStyleSheetInternal.h"
 #import "DOMTestObjInternal.h"
+#import "DOMboolInternal.h"
 #import "DOMlogInternal.h"
 #import "EventListener.h"
 #import "ExceptionHandlers.h"
@@ -50,6 +51,7 @@
 #import "ThreadCheck.h"
 #import "WebCoreObjCExtras.h"
 #import "WebScriptObjectPrivate.h"
+#import "bool.h"
 #import "log.h"
 #import <wtf/GetPtr.h>
 
@@ -154,6 +156,34 @@
     IMPL->setTestObjAttr(core(newTestObjAttr));
 }
 
+- (DOMTestObj *)XMLObjAttr
+{
+    WebCore::JSMainThreadNullState state;
+    return kit(WTF::getPtr(IMPL->xmlObjAttr()));
+}
+
+- (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr
+{
+    WebCore::JSMainThreadNullState state;
+    ASSERT(newXMLObjAttr);
+
+    IMPL->setXMLObjAttr(core(newXMLObjAttr));
+}
+
+- (DOMbool *)CREATE
+{
+    WebCore::JSMainThreadNullState state;
+    return kit(WTF::getPtr(IMPL->isCreate()));
+}
+
+- (void)setCREATE:(DOMbool *)newCREATE
+{
+    WebCore::JSMainThreadNullState state;
+    ASSERT(newCREATE);
+
+    IMPL->setCreate(core(newCREATE));
+}
+
 - (NSString *)reflectedStringAttr
 {
     WebCore::JSMainThreadNullState state;
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index 47a2487..4966137 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -41,6 +41,11 @@
         attribute DOMString                stringAttr;
         attribute TestObj                  testObjAttr;
 
+        JS, V8
+        // WK_ucfirst, WK_lcfirst exceptional cases.
+        attribute TestObj                  XMLObjAttr;
+        attribute bool                     CREATE;
+
         // Reflected DOM attributes
         attribute [Reflect] DOMString reflectedStringAttr;
         attribute [Reflect] long reflectedIntegralAttr;
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index d078c04..026d94c 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -34,6 +34,7 @@
 #include "V8IsolatedContext.h"
 #include "V8Proxy.h"
 #include "V8TestCallback.h"
+#include "V8bool.h"
 #include "V8log.h"
 #include <wtf/GetPtr.h>
 #include <wtf/RefCounted.h>
@@ -155,6 +156,38 @@
     return;
 }
 
+static v8::Handle<v8::Value> XMLObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.XMLObjAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return toV8(imp->xmlObjAttr());
+}
+
+static void XMLObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.XMLObjAttr._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    TestObj* v = V8TestObj::HasInstance(value) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+    imp->setXMLObjAttr(WTF::getPtr(v));
+    return;
+}
+
+static v8::Handle<v8::Value> CREATEAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.CREATE._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return toV8(imp->isCreate());
+}
+
+static void CREATEAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.CREATE._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    bool* v = V8bool::HasInstance(value) ? V8bool::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+    imp->setCreate(WTF::getPtr(v));
+    return;
+}
+
 static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.TestObj.reflectedStringAttr._get");
@@ -977,6 +1010,10 @@
     {"stringAttr", TestObjInternal::stringAttrAttrGetter, TestObjInternal::stringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: '')
     {"testObjAttr", TestObjInternal::testObjAttrAttrGetter, TestObjInternal::testObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'XMLObjAttr' (Type: 'attribute' ExtAttr: '')
+    {"XMLObjAttr", TestObjInternal::XMLObjAttrAttrGetter, TestObjInternal::XMLObjAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'CREATE' (Type: 'attribute' ExtAttr: '')
+    {"CREATE", TestObjInternal::CREATEAttrGetter, TestObjInternal::CREATEAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedStringAttr' (Type: 'attribute' ExtAttr: 'Reflect')
     {"reflectedStringAttr", TestObjInternal::reflectedStringAttrAttrGetter, TestObjInternal::reflectedStringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')