servo/components/script
bors-servo f65cb94b9e
Auto merge of #24674 - servo:jdm-patch-34, r=nox
Correct inverted logic for available image checks.

From https://html.spec.whatwg.org/multipage/images.html#updating-the-image-data:
Step 3 says to initialize selected source to null.
Step 4 says to set the selected source to the image element's src value if it's not using responsive images and it has a non-empty src value.
Step 6 performs some steps if selected source is not null.

The existing code tried to do the step 6 check in a roundabout way which caused us to always check for an available image when using responsive images, which is incorrect. The new code is easier to read and matches the specification text.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it's not worth writing a test to verify that an image cache check that would always fail does not happen.
2019-11-13 19:19:59 -05:00
..
docs
dom Auto merge of #24674 - servo:jdm-patch-34, r=nox 2019-11-13 19:19:59 -05:00
task_source continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
body.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
build.rs Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
canvas_state.rs Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions 2019-11-10 18:37:14 -05:00
Cargo.toml Update rand to 0.7 (fixes #24448) 2019-10-23 15:34:48 +02:00
clipboard_provider.rs Remove not needed DummyClipboardContext 2019-06-13 20:20:25 +02:00
compartments.rs Use safe JSContext in compartments 2019-08-09 00:02:10 +01:00
devtools.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
document_loader.rs Remove unused code from script* crates 2019-06-02 07:12:26 +02:00
euclidext.rs Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions 2019-11-10 18:37:14 -05:00
fetch.rs Add simple implementation of content-security-policy on scripts / styles 2019-10-16 19:46:45 +00:00
image_listener.rs
init.rs Move items at the root of the script crate to a module 2019-10-26 12:59:17 +02:00
layout_image.rs
lib.rs Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions 2019-11-10 18:37:14 -05:00
mem.rs
microtask.rs Use safe JSContext in MicrotaskQueue 2019-08-09 00:02:10 +01:00
network_listener.rs Let resources timing entries be added to performance entry buffer. 2019-06-11 09:40:31 -07:00
script_runtime.rs Add consume stream callback 2019-11-11 16:48:52 -05:00
script_thread.rs Implement srcdoc support for iframes. 2019-11-12 13:57:54 -05:00
serviceworker_manager.rs continue messageport, transferable, postmessage options 2019-10-19 14:28:18 +08:00
serviceworkerjob.rs Update Worker webidl to support WorkerOptions 2019-05-11 12:14:25 +09:00
stylesheet_loader.rs Support CORS attributes for image elements. 2019-10-04 15:08:40 -04:00
stylesheet_set.rs
task.rs Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
task_manager.rs begin messageport, transferable objects, impl 2019-10-19 14:12:22 +08:00
task_queue.rs
test.rs
textinput.rs Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
timers.rs update timer scheduler to use crossbeam 2019-10-20 23:42:34 +08:00
unpremultiplytable.rs
webdriver_handlers.rs Implement ElementClick wd command 2019-08-31 10:14:40 +03:00