  }
  
  bool FileInputType::canChangeFromAnotherType() const
-@@ -217,7 +218,7 @@ bool FileInputType::canChangeFromAnotherType() const
+@@ -217,7 +219,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.

     params.directory = false;
 #endif
+    params.extractDirectory = fileChooser->settings().allowsDirectoryUpload;
     params.acceptTypes = fileChooser->settings().acceptTypes();
     params.selectedFiles = fileChooser->settings().selectedFiles;
     if (params.selectedFiles.size() > 0)

 }
 
diff --git a/Source/WebCore/html/HTMLAttributeNames.in b/Source/WebCore/html/HTMLAttributeNames.in
index 459078f..bfa3636 100644
--- a/Source/WebCore/html/HTMLAttributeNames.in
+++ b/Source/WebCore/html/HTMLAttributeNames.in
@@ -163,6 +163,8 @@ noresize
 noshade
 novalidate
 nowrap
+nwdirectory
+nwsaveas
 object
 onabort
 onbeforecopy
