mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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 --> |
||
---|---|---|
.. | ||
docs | ||
dom | ||
task_source | ||
body.rs | ||
build.rs | ||
canvas_state.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
devtools.rs | ||
document_loader.rs | ||
euclidext.rs | ||
fetch.rs | ||
image_listener.rs | ||
init.rs | ||
layout_image.rs | ||
lib.rs | ||
mem.rs | ||
microtask.rs | ||
network_listener.rs | ||
realms.rs | ||
script_module.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
serviceworker_manager.rs | ||
serviceworkerjob.rs | ||
stylesheet_loader.rs | ||
stylesheet_set.rs | ||
task.rs | ||
task_manager.rs | ||
task_queue.rs | ||
test.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |