New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patches of File API #12544
Patches of File API #12544
Conversation
Heads up! This PR modifies the following files:
|
Two simple fixes addressing:
The first fix is no problem; For the second one, I used an empty string before because first I am lazy and second it is easier to debug if something goes wrong. But that doesn't quite fit in with spec, though either an empty string or a random ID would have the same actual effect. |
@@ -73,7 +73,8 @@ impl File { | |||
let ref typeString = blobPropertyBag.type_; | |||
|
|||
let modified = filePropertyBag.lastModified; | |||
Ok(File::new(global, BlobImpl::new_from_bytes(bytes), filename, modified, typeString)) | |||
let replaced_filename = DOMString::from_string(filename.replace("/", ":")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the spec bug here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by "spec bug"? Regarding link, this tiny replace operation is specified in the url above this function pub fn Constructor
(which I unfortunately neglected at first)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I was talking about w3c/FileAPI#41 (the bug that wishes to remove this behavior)
r=me with the link |
@@ -73,7 +73,10 @@ impl File { | |||
let ref typeString = blobPropertyBag.type_; | |||
|
|||
let modified = filePropertyBag.lastModified; | |||
Ok(File::new(global, BlobImpl::new_from_bytes(bytes), filename, modified, typeString)) | |||
// NOTE: Following behaviour might be removed in future, | |||
// see https://github.com/w3c/FileAPI/issues/41 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Manishearth added
@bors-servo r+ thanks! |
📌 Commit f598b5f has been approved by |
Patches of File API r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12544) <!-- Reviewable:end -->
💔 Test failed - linux-rel |
⚡ Previous build results for android, arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev are reusable. Rebuilding only linux-rel... |
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, windows-dev |
r? @Manishearth
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is