diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-04-29 03:57:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-29 03:57:46 -0400 |
commit | bf667677f75cd3f56fff3a91f73c21ba1e4705af (patch) | |
tree | e6e562f9ea39897db35ebf5fecaa26885dce82d1 /components/bluetooth_traits/Cargo.toml | |
parent | 0ff6f32d7d4eb597a1ea9ea7480c0371b79386b4 (diff) | |
parent | d94def6b4a9ba3779869edf6409d29e8817ddc42 (diff) | |
download | servo-bf667677f75cd3f56fff3a91f73c21ba1e4705af.tar.gz servo-bf667677f75cd3f56fff3a91f73c21ba1e4705af.zip |
Auto merge of #20480 - kwonoj:refactor-file-manager, r=paulrouget
refactor(net): removes direct ui invocation from filemgr thread
<!-- Please describe your changes on the following line: -->
- relates to https://github.com/servo/servo/issues/20428.
This PR tries to refactor `net::filemanager_thread` implementation, removes direct ui-related code invocation but ask constellation. I believe overall organization might need to be refactored still as I took my own liberty to wire up dots and dots between components, which could be non-recommended practices.
Probably point of review / need to be updated are
1. Communication between components
Currently it's wired as like below:
```
+----------------+ +---------------+ +---------+
| | constellationMsg | | embedderMsg | |
| filemgr_thread +------------------->+ constellation +------------->+ browser |
| | | | | |
+-----+----------+ +---------------+ +----+----+
^ |
+-------------------------------------------------------------------+
filelist: Vec(String)
```
- is this feasible approach?
- does organization of message / fn (where to put consteallation / embedder msg & fns) are legit?
2. Removal of `filemanger_thread::UIProvider`
- As filemanager_thread no longer need to aware actual ui, this PR removes `UIProvider` completely and let invoke tinyfiledialog directly in message listener. Maybe UIProvider itself still being needed?
3. Overall fn organization
- To reduce duplicated code it takes single msg with boolean flag to distinguish selecting multiple files, may feasible / or better to create explicit paths between two.
4. Invoking tfd in a separate thread
- This was mainly to align behavior to previous implentation, where tfd was invoked inside of filemanager_thread so does not block main. It may possibly just let block instead.
and of course, a lot of other codes need to follow better practices.
---
<!-- 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
- [x] These changes fix #20428 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
- Manually verified file picker `<input type=files>` can pick up files.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- 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/20480)
<!-- Reviewable:end -->
Diffstat (limited to 'components/bluetooth_traits/Cargo.toml')
0 files changed, 0 insertions, 0 deletions