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
|
2020-01-17 18:41:52 +00:00
|
|
|
index 888fb19b976194c173286f92b26c4bc9362bcf9c..9d243bc70089685f018b14eba0025cfd11bb82f6 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
|
2020-01-21 17:39:37 +00:00
|
|
|
index 4339a27e87c12279b2a2f08a7c3d181e7265a986..6aebb1ba4f74a4cfdc546fe5903032f4bc23dd30 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
|
2020-01-17 18:41:52 +00:00
|
|
|
@@ -31,6 +31,7 @@
|
2018-09-14 05:02:16 +00:00
|
|
|
] interface File : Blob {
|
2020-01-21 17:39:37 +00:00
|
|
|
[CallWith=ExecutionContext] constructor(sequence<BlobPart> fileBits, USVString fileName, optional FilePropertyBag options = {});
|
2018-09-14 05:02:16 +00:00
|
|
|
readonly attribute DOMString name;
|
|
|
|
+ readonly attribute DOMString path;
|
|
|
|
readonly attribute long long lastModified;
|
|
|
|
|
|
|
|
// Non-standard APIs
|