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
|
2022-02-10 02:58:52 +00:00
|
|
|
index e23ab93fdc031a022ae15d069017ebc2e6923e78..7e6d45d33fcc147d0b5b78cc2b254e1deb3cbf02 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
|
2021-06-03 08:05:04 +00:00
|
|
|
@@ -191,6 +191,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
|