mirror of
https://github.com/servo/servo.git
synced 2025-07-08 16:03:40 +01:00
Add a sanitize_value implementation for the color input I had to change the test a little bit to avoid some failures due to color and text both having a sanitizedValue which was making the test use the first assertion instead of the second one in some cases. The sanitize_value implementation is pretty simple, we iterate over the content and checks that the content is 7 characters long, that the first character is a `#` and then that all the following characters are hexadecimal. If all those requirements are met, we lowercase the content, otherwise we put `#000000` in it. <!-- 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/19330) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
docs | ||
dom | ||
task_source | ||
body.rs | ||
build.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
CMakeLists.txt | ||
devtools.rs | ||
document_loader.rs | ||
fetch.rs | ||
layout_image.rs | ||
lib.rs | ||
mem.rs | ||
microtask.rs | ||
network_listener.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
serviceworker_manager.rs | ||
serviceworkerjob.rs | ||
stylesheet_loader.rs | ||
task.rs | ||
test.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |