File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Userland/Libraries/LibURL Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 9
9
namespace URL {
10
10
class URL ;
11
11
class Parser ;
12
+
13
+ struct BlobURLEntry ;
12
14
}
Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ enum class ApplyPercentDecoding {
58
58
No
59
59
};
60
60
61
+ // https://w3c.github.io/FileAPI/#blob-url-entry
62
+ // NOTE: This represents the raw bytes behind a 'Blob' (and does not yet support a MediaSourceQuery).
63
+ struct BlobURLEntry {
64
+ String type;
65
+ ByteBuffer byte_buffer;
66
+ };
67
+
61
68
void append_percent_encoded_if_necessary (StringBuilder&, u32 code_point, PercentEncodeSet set = PercentEncodeSet::Userinfo);
62
69
void append_percent_encoded (StringBuilder&, u32 code_point);
63
70
bool code_point_is_in_percent_encode_set (u32 code_point, PercentEncodeSet);
@@ -143,6 +150,9 @@ class URL {
143
150
String const & raw_username () const { return m_username; }
144
151
String const & raw_password () const { return m_password; }
145
152
153
+ Optional<BlobURLEntry> const & blob_url_entry () const { return m_blob_url_entry; }
154
+ void set_blob_url_entry (Optional<BlobURLEntry> entry) { m_blob_url_entry = move (entry); }
155
+
146
156
private:
147
157
bool compute_validity () const ;
148
158
@@ -174,6 +184,10 @@ class URL {
174
184
Optional<String> m_fragment;
175
185
176
186
bool m_cannot_be_a_base_url { false };
187
+
188
+ // https://url.spec.whatwg.org/#concept-url-blob-entry
189
+ // A URL also has an associated blob URL entry that is either null or a blob URL entry. It is initially null.
190
+ Optional<BlobURLEntry> m_blob_url_entry;
177
191
};
178
192
179
193
URL create_with_url_or_path (ByteString const &);
You can’t perform that action at this time.
0 commit comments