      return true;
  }
  
+diff --git a/Source/WebCore/html/HTMLAttributeNames.in b/Source/WebCore/html/HTMLAttributeNames.in
+index 459078f..41d0a57 100644
+--- a/Source/WebCore/html/HTMLAttributeNames.in
++++ b/Source/WebCore/html/HTMLAttributeNames.in
+@@ -163,6 +163,7 @@ noresize
+ noshade
+ novalidate
+ nowrap
++nwdirectory
+ object
+ onabort
+ onbeforecopy
+diff --git a/Source/WebCore/html/HTMLInputElement.idl b/Source/WebCore/html/HTMLInputElement.idl
+index 879a34f..5c9bfa1 100644
+--- a/Source/WebCore/html/HTMLInputElement.idl
++++ b/Source/WebCore/html/HTMLInputElement.idl
+@@ -91,6 +91,7 @@ module html {
+         // Non-standard attributes
+         attribute [Reflect] DOMString align;
+         attribute [Conditional=DIRECTORY_UPLOAD, Reflect] boolean webkitdirectory;
++        attribute [Reflect] boolean nwdirectory;
+         attribute [Reflect] DOMString useMap;
+         attribute [Reflect] boolean incremental;
+         attribute [Conditional=INPUT_SPEECH, Reflect, V8EnabledAtRuntime] boolean webkitSpeech;
 diff --git a/Source/WebCore/loader/CrossOriginAccessControl.cpp b/Source/WebCore/loader/CrossOriginAccessControl.cpp
 index aba2ba0..ec76d5a 100644
 --- a/Source/WebCore/loader/CrossOriginAccessControl.cpp

 }
 
 bool FileInputType::canChangeFromAnotherType() const
@@ -217,7 +217,7 @@ bool FileInputType::canChangeFromAnotherType() const
     // field's value to something like /etc/passwd and then change it to a file input.
     // I don't think this would actually occur in WebKit, but this rule still may be
     // important for compatibility.

         readonly attribute Date lastModifiedDate;
 #endif
diff --git a/Source/WebCore/html/FileInputType.cpp b/Source/WebCore/html/FileInputType.cpp
index f7896ba..f16aa36 100644
--- a/Source/WebCore/html/FileInputType.cpp
+++ b/Source/WebCore/html/FileInputType.cpp
@@ -184,6 +184,7 @@ void FileInputType::handleDOMActivateEvent(Event* event)
         FileChooserSettings settings;
         HTMLInputElement* input = element();
 #if ENABLE(DIRECTORY_UPLOAD)
+        settings.directoryChooser = input->fastHasAttribute(nwdirectoryAttr);
         settings.allowsDirectoryUpload = input->fastHasAttribute(webkitdirectoryAttr);
         settings.allowsMultipleFiles = settings.allowsDirectoryUpload || input->fastHasAttribute(multipleAttr);
 #else
@@ -207,7 +208,7 @@ RenderObject* FileInputType::createRenderer(RenderArena* arena, RenderStyle*) co
 
 bool FileInputType::canSetStringValue() const
 {
