2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: Cheng Zhao <zcbenz@gmail.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:45:00 -0700
|
|
|
|
Subject: blink_file_path.patch
|
|
|
|
|
2018-10-18 18:40:16 +00:00
|
|
|
This is used by editors to obtain the filesystem path from a dragged file. See
|
|
|
|
documentation at https://electronjs.org/docs/api/file-object
|
2018-09-21 00:30:26 +00:00
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
|
2019-12-11 00:22:35 +00:00
|
|
|
index 7ea8ad8fd162fd6a97052188a8e8868dab1c1fe9..a64966e2db0e2e7b0390a322525522e05ddbb022 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/third_party/blink/renderer/core/fileapi/file.h
|
|
|
|
+++ b/third_party/blink/renderer/core/fileapi/file.h
|
2019-12-11 00:22:35 +00:00
|
|
|
@@ -193,6 +193,9 @@ class CORE_EXPORT File final : public Blob {
|
2018-09-14 05:02:16 +00:00
|
|
|
}
|
|
|
|
const String& name() const { return name_; }
|
|
|
|
|
|
|
|
+ // Getter for the path IDL attribute.
|
|
|
|
+ const String& path() const { return GetPath(); }
|
|
|
|
+
|
|
|
|
// Getter for the lastModified IDL attribute,
|
|
|
|
// http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
|
2019-03-21 22:45:52 +00:00
|
|
|
int64_t lastModified() const;
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
|
2019-12-11 00:22:35 +00:00
|
|
|
index e5cf6cc926ff2670f713018dd750e79c53ee76eb..60eca3cf100b31c3d2c0c68271d98c60321e69a7 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/third_party/blink/renderer/core/fileapi/file.idl
|
|
|
|
+++ b/third_party/blink/renderer/core/fileapi/file.idl
|
2019-04-20 17:20:37 +00:00
|
|
|
@@ -32,6 +32,7 @@
|
2019-01-12 01:00:43 +00:00
|
|
|
Serializable
|
2018-09-14 05:02:16 +00:00
|
|
|
] interface File : Blob {
|
|
|
|
readonly attribute DOMString name;
|
|
|
|
+ readonly attribute DOMString path;
|
|
|
|
readonly attribute long long lastModified;
|
|
|
|
|
|
|
|
// Non-standard APIs
|