servo/components
bors-servo c9480c8e07
Auto merge of #23661 - julientregoat:i-21289, r=jdm
Refactor ImageCache::find_image_or_metadata -> ImageCache::{get_image, track_image}

<!-- Please describe your changes on the following line: -->
Updated the `ImageCache` trait to replace `find_image_or_metadata` with two new functions `track_image` and `get_image`, as well as a new enum (`ImageCacheResult`).

As a result, I was able to refactor the functions that previously called `find_image_or_metadata` pretty cleanly. For a list of these functions, please see the commit information.

---
<!-- 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 #21289  (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because tests already exist for these components. I ran `cargo test` in `net`, `net_traits`, `layout`, and `script` successfully.

<!-- 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/23661)
<!-- Reviewable:end -->
2020-04-17 15:56:30 -04:00
..
allocator
atoms Selection interface working for synthetic operations 2020-02-13 20:09:27 -05:00
background_hang_monitor Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
bluetooth Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
bluetooth_traits Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
canvas Auto merge of #26147 - jdm:linewidth, r=nox 2020-04-14 18:54:00 -04:00
canvas_traits Auto merge of #26071 - servo:rustup, r=nox 2020-04-10 00:37:54 -04:00
compositing Remove WebVR 2020-04-08 20:23:41 -05:00
config Added first-cut implementation of XR layers 2020-04-13 13:57:58 -05:00
config_plugins
constellation Use hash_map::Entry to save a map lookup 2020-04-14 18:17:46 -04:00
debugger Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
deny_public_fields
derive_common
devtools Add support for launching devtools server on random port 2020-03-16 15:30:26 +05:30
devtools_traits Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
dom_struct
domobject_derive Introduce a new type MaybeUnreflectedDom<T> (fixes #25701) 2020-02-17 10:17:47 +01:00
embedder_traits Make it possible to add a title to context menu 2020-03-31 12:25:54 +02:00
fallible
geometry
gfx Update dwrote to 0.11. 2020-03-26 16:41:58 -04:00
gfx_traits
hashglobe
jstraceable_derive
layout Auto merge of #23661 - julientregoat:i-21289, r=jdm 2020-04-17 15:56:30 -04:00
layout_2020 Auto merge of #23661 - julientregoat:i-21289, r=jdm 2020-04-17 15:56:30 -04:00
layout_thread Some servo build fixes. 2020-04-16 18:29:30 +02:00
layout_thread_2020 Some servo build fixes. 2020-04-16 18:29:30 +02:00
layout_traits Make Background Hang Monitor Optional 2020-02-23 01:45:52 +05:30
malloc_size_of Update content-security-policy. 2020-03-25 09:11:09 -04:00
media Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
metrics Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
msg Make DOM own the style and layout data, in an UnsafeCell 2020-04-04 13:10:19 +02:00
net Don't continually re-request completed requests that had load errors. 2020-04-17 11:59:00 -04:00
net_traits Don't continually re-request completed requests that had load errors. 2020-04-17 11:59:00 -04:00
pixels
profile Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
profile_traits Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
rand
range
remutex
script Auto merge of #23661 - julientregoat:i-21289, r=jdm 2020-04-17 15:56:30 -04:00
script_layout_interface Remove unused #![feature(…)] attributes 2020-04-15 15:01:46 +02:00
script_plugins Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
script_traits Remove WebVR 2020-04-08 20:23:41 -05:00
selectors style: Reformat recent changes. 2020-04-16 17:50:17 +02:00
servo Update user agent strings 2020-04-08 23:58:46 -07:00
servo_arc
size_of_test
std_test_override
style Add an iterator for transition properties 2020-04-17 15:11:49 +02:00
style_derive style: Reformat recent changes. 2020-04-16 17:50:17 +02:00
style_traits style: Add CSS Error for DisallowedImportRule. 2020-04-16 16:35:07 +02:00
to_shmem
to_shmem_derive
url
webdriver_server Remove syn 0.15 from our crate graph (fixes #24421) 2020-03-05 13:01:13 +01:00
webgpu Fixing some style related issues in WebGPU. 2020-02-27 15:10:24 +01:00
webrender_traits