servo/components/script
bors-servo 6449c00fc9 Auto merge of #19007 - MortimerGoro:const_codegen, r=emilio
Fix Const IDL value compilation errors in codegen

<!-- Please describe your changes on the following line: -->

I found that some const WebIDL values fail at rust compile time.

Example:

const long long TIMEOUT_IGNORED  = -1;

```
906 |     ConstantSpec { name: b"TIMEOUT_IGNORED\0", value: ConstantVal::DoubleVal(-1) }]
    |                                                                              ^^ expected f64, found integral variable
    |
    = note: expected type `f64`
               found type `{integer}`
```

I added a explicit cast to to fix the problem in conversions that may fail to compile.

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/19007)
<!-- Reviewable:end -->
2017-10-25 06:48:43 -05:00
..
docs Rename Root<T> to DomRoot<T> 2017-09-26 09:49:10 +02:00
dom Auto merge of #19007 - MortimerGoro:const_codegen, r=emilio 2017-10-25 06:48:43 -05:00
task_source Remove use of unstable box syntax. 2017-10-16 17:16:20 +02:00
body.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
build.rs Use env::var_os to read paths from the environment 2017-10-20 09:03:21 -07:00
Cargo.toml Update offscreen_gl_context to v0.12 2017-10-20 19:30:14 +02:00
clipboard_provider.rs make use of ScriptToConstellationChan 2017-08-15 08:22:09 +02:00
CMakeLists.txt Fix doc build by resurrecting generation of supported DOM APIs.h 2016-09-24 15:06:06 -04:00
devtools.rs Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
document_loader.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
fetch.rs Merge request type and destination 2017-10-23 11:19:35 -07:00
layout_image.rs Merge request type and destination 2017-10-23 11:19:35 -07:00
lib.rs Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
mem.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
microtask.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
network_listener.rs Introduce TaskOnce 2017-09-20 10:37:09 +02:00
script_runtime.rs Do not trace Rust values when thread is shutting down. 2017-10-20 13:50:40 -04:00
script_thread.rs Auto merge of #18968 - mbrubeck:try, r=emilio 2017-10-21 03:31:21 -05:00
serviceworker_manager.rs remove extra spaces after keywords 2017-07-20 00:45:02 +03:00
serviceworkerjob.rs Rename DOMRefCell<T> to DomRefCell<T> 2017-09-26 09:49:08 +02:00
stylesheet_loader.rs Merge request type and destination 2017-10-23 11:19:35 -07:00
task.rs Make usage of core_intrinsics optional 2017-10-16 20:20:21 +02:00
test.rs Parse srcset attribute 2017-10-03 13:18:01 +02:00
textinput.rs Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE 2017-10-19 21:26:51 +00:00
timers.rs Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
unpremultiplytable.rs
webdriver_handlers.rs Rename Root<T> to DomRoot<T> 2017-09-26 09:49:10 +02:00