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-01-08 23:59:47 +00:00
|
|
|
index 2ca09ab8903d56b466e186203279e865ed4dd058..d522b53111a1c452220a1ca08ffcc7206adaa309 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-01-08 23:59:47 +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
|
|
|
|
long long lastModified() const;
|
|
|
|
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
|
2019-01-12 01:00:43 +00:00
|
|
|
index 940f8e62ce228beaf71f5a4be88539a431415ab1..0cf315636afe0e5e1533b3372cdfe2c09ec581e1 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-01-12 01:00:43 +00:00
|
|
|
@@ -33,6 +33,7 @@
|
|
|
|
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
|