servo/components
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
..
allocator Stop relying on linking details of std’s default allocator 2017-10-19 09:52:50 +02:00
atoms Use env::var_os to read paths from the environment 2017-10-20 09:03:21 -07:00
bluetooth Auto merge of #18968 - mbrubeck:try, r=emilio 2017-10-21 03:31:21 -05:00
bluetooth_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
canvas Update offscreen_gl_context to v0.12 2017-10-20 19:30:14 +02:00
canvas_traits Update offscreen_gl_context to v0.12 2017-10-20 19:30:14 +02:00
compositing Update WR (render notifier API changes). 2017-10-24 09:22:21 +10:00
config Use env::var_os to read paths from the environment 2017-10-20 09:03:21 -07:00
constellation Merge request type and destination 2017-10-23 11:19:35 -07:00
debugger
deny_public_fields deny_public_fields: display field identifier in help message 2017-06-25 18:12:43 +01:00
devtools Auto merge of #18968 - mbrubeck:try, r=emilio 2017-10-21 03:31:21 -05:00
devtools_traits 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
dom_struct Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
domobject_derive Fix quote dependency version 2017-08-23 18:35:42 +02:00
fallible Bug 1400754 - stylo: crash on Win64 Asan build. r=manishearth, dmajor. 2017-10-02 20:53:23 +02:00
geometry Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
gfx Auto merge of #19011 - mbrubeck:realloc, r=glennw 2017-10-24 18:40:20 -05:00
gfx_traits Auto merge of #18921 - mrobinson:incremental-stacking-context-ids, r=emilio 2017-10-18 21:34:23 -05:00
hashglobe Revert "Poison hashtable buffers." 2017-10-23 13:51:51 -07:00
jstraceable_derive Fix quote dependency version 2017-08-23 18:35:42 +02:00
layout Auto merge of #19002 - emilio:kill-more-mako, r=jdm 2017-10-24 12:02:05 -05:00
layout_thread Auto merge of #18968 - mbrubeck:try, r=emilio 2017-10-21 03:31:21 -05:00
layout_traits Update WR (details below): 2017-10-16 16:33:24 +10:00
lru_cache Hoist lookup() into lru_cache. 2017-09-20 23:22:33 -07:00
malloc_size_of Revert "Diagnostic map semantics." 2017-10-23 13:51:08 -07:00
malloc_size_of_derive Overhaul MallocSizeOf and related things. 2017-09-12 12:37:51 +10:00
metrics Update WR (details below): 2017-10-16 16:33:24 +10:00
msg 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
net Auto merge of #18981 - KiChjang:fold-type-destination, r=avadacatavra 2017-10-24 17:02:18 -05:00
net_traits Merge request type and destination 2017-10-23 11:19:35 -07:00
nonzero Replace NonZeroU32 and NonZeroUsize with a generic NonZero 2017-10-16 20:19:19 +02:00
profile Use try syntax for Option where appropriate 2017-10-20 08:25:35 -07:00
profile_traits Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
rand
range Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
remutex Replace NonZeroU32 and NonZeroUsize with a generic NonZero 2017-10-16 20:19:19 +02:00
script Auto merge of #19007 - MortimerGoro:const_codegen, r=emilio 2017-10-25 06:48:43 -05:00
script_layout_interface Auto merge of #18946 - cynicaldevil:update-h5e, r=nox 2017-10-20 08:49:09 -05:00
script_plugins Remove usage of unstable box syntax, except in the script crate 2017-10-12 12:10:56 +02:00
script_traits Auto merge of #18933 - mrobinson:wr-text-index, r=jdm 2017-10-19 02:36:32 -05:00
selectors style: Make invalidations with offset zero "universal" invalidations. 2017-10-23 08:22:46 +02:00
servo Update WR (render notifier API changes). 2017-10-24 09:22:21 +10:00
servo_arc Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
size_of_test
style Auto merge of #19005 - emilio:less-mako-more-joy, r=jdm 2017-10-24 15:29:21 -05:00
style_derive style: Remove HasViewportPercentage. 2017-08-29 23:51:21 +02:00
style_traits style: Do not require to import ToCss in define_css_keyword_enum. 2017-10-24 14:30:51 +02:00
url Replace all uses of the heapsize crate with malloc_size_of. 2017-10-18 22:20:37 +11:00
webdriver_server 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
webvr Update WR (details below): 2017-10-16 16:33:24 +10:00
webvr_traits Update WR (details below): 2017-10-16 16:33:24 +10:00