Add API base url method to global objects
This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10502)
<!-- Reviewable:end -->
Avoid script execution when not found
Fix#8391
If the status code is an error or has not been received, we discard data and prevent the script from being executed.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10203)
<!-- Reviewable:end -->
Removed etc/ci/check_no_unwrap.sh from .travis.yml
Temporarily disable #10448 until all the uses of unwrap are removed from the constellation/compositor.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10495)
<!-- Reviewable:end -->
layout: Make inner scroll wrappers acquire the overflow region of their contents.
Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.
r? @mbrubeck
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10494)
<!-- Reviewable:end -->
geckolib: reupdate bindings to allow easy union modifications
This commit updates the current bindings with a m-c trunk build.
This improves quite a few things:
* It adds `Debug` support for structs, which should be easy.
* It generates unnamed structs definitions.
* And... It allows changing union types directly!
The way mutating a union works is as follows. Each union field has an
unsized field of type `__BindgenUnionField<T>`, where `T` is the type of
the field.
The field has two unsafe methods, `as_ref` and `as_mut`, that would work
as follows (assuming 64 bit pointers):
````rust
let u = nsStyleUnion {
mInt: Default::default(),
mFloat: Default::default(),
mPointer: Default::default(),
_bindgen_data_: 0,
};
unsafe {
assert_eq!(*u.mInt.as_ref() == 0);
*u.mPointer.as_mut() = !0 as *mut _;
assert_eq!(*u.mInt.as_ref() == !0);
*u.mInt.as_mut() = 0;
assert_eq!(*u.mInt.as_ref() == 0);
assert_eq!(*u.mPointer.as_ref() == (!0 << 32) as *mut _);
}
```
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10484)
<!-- Reviewable:end -->
This commit updates the current bindings with a m-c trunk build.
This improves quite a few things:
* It adds `Debug` support for structs, which should be easy.
* It generates unnamed structs definitions.
* And... It allows changing union types directly!
The way mutating a union works is as follows. Each union field has an
unsized field of type `__BindgenUnionField<T>`, where `T` is the type of
the field.
The field has two unsafe methods, `as_ref` and `as_mut`, that would work
as follows (assuming 64 bit pointers):
````
let u = nsStyleUnion {
mInt: Default::default(),
mFloat: Default::default(),
mPointer: Default::default(),
_bindgen_data_: 0,
};
unsafe {
assert_eq!(*u.mInt.as_ref() == 0);
*u.mPointer.as_mut() = !0 as *mut _;
assert_eq!(*u.mInt.as_ref() == !0);
*u.mInt.as_mut() = 0;
assert_eq!(*u.mInt.as_ref() == 0);
assert_eq!(*u.mPointer.as_ref() == (!0 << 32) as *mut _);
}
```
travis: add and run script which checks if listed files contain "unwrap". Should fix#10446.
Unfortunately there is a lot of python code in tidy.py that I don't understand yet, so I simply wrote a bash script to do the job and hooked it up in travis.yml.
Tests are expected to fail:
````
components/compositing/compositor.rs:758: self.pipeline_details.get_mut(&pipeline_id).unwrap()
components/compositing/compositor.rs:2194: RgbImage::from_raw(width as u32, height as u32, pixels).unwrap()
components/compositing/pipeline.rs:130: let (paint_shutdown_chan, paint_shutdown_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:131: let (layout_shutdown_chan, layout_shutdown_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:132: let (pipeline_chan, pipeline_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:133: let (script_to_compositor_chan, script_to_compositor_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:151: let (script_to_devtools_chan, script_to_devtools_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:154: let message: ScriptToDevtoolsControlMsg = message.to().unwrap();
components/compositing/pipeline.rs:155: devtools_chan.send(DevtoolsControlMsg::FromScript(message)).unwrap()
components/compositing/pipeline.rs:161: ipc::channel().unwrap();
components/compositing/pipeline.rs:174: pipeline_port: mem::replace(&mut pipeline_port, None).unwrap(),
components/compositing/pipeline.rs:180: .unwrap();
components/compositing/pipeline.rs:184: let (script_chan, script_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:190: ipc::channel().unwrap();
components/compositing/pipeline.rs:298: let (sender, receiver) = ipc::channel().unwrap();
components/compositing/pipeline.rs:300: receiver.recv().unwrap();
components/compositing/pipeline.rs:315: let _ = self.script_chan.send(ConstellationControlMsg::Freeze(self.id)).unwrap();
components/compositing/pipeline.rs:319: let _ = self.script_chan.send(ConstellationControlMsg::Thaw(self.id)).unwrap();
components/compositing/pipeline.rs:323: let _ = self.script_chan.send(ConstellationControlMsg::ExitPipeline(self.id)).unwrap();
components/compositing/pipeline.rs:326: let _ = layout_channel.send(LayoutControlMsg::ExitNow).unwrap();
components/compositing/pipeline.rs:343: let index = self.children.iter().position(|id| *id == frame_id).unwrap();
components/compositing/pipeline.rs:355: self.script_chan.send(event).unwrap();
components/compositing/pipeline.rs:402: control_port: mem::replace(&mut self.script_port, None).unwrap(),
components/compositing/pipeline.rs:423: self.pipeline_port.unwrap(),
components/compositing/pipeline.rs:437: self.script_content_process_shutdown_port.recv().unwrap();
components/compositing/pipeline.rs:438: self.layout_content_process_shutdown_port.recv().unwrap();
components/compositing/constellation.rs:464: IpcOneShotServer::<IpcSender<UnprivilegedPipelineContent>>::new().unwrap();
components/compositing/constellation.rs:468: let mut command = sandbox::Command::me().unwrap();
components/compositing/constellation.rs:474: let path_to_self = env::current_exe().unwrap();
components/compositing/constellation.rs:478: ChildProcess::Unsandboxed(child_process.spawn().unwrap())
components/compositing/constellation.rs:482: let (_receiver, sender) = server.accept().unwrap();
components/compositing/constellation.rs:835: stderr.write_all("Pipeline failed in hard-fail mode. Crashing!\n".as_bytes()).unwrap();
components/compositing/constellation.rs:1621: let (sender, receiver) = ipc::channel().unwrap();
components/compositing/constellation.rs:1657: let (sender, receiver) = ipc::channel().unwrap();
components/compositing/constellation.rs:1659: layout_chan.send(LayoutControlMsg::GetCurrentEpoch(sender)).unwrap();
components/compositing/constellation.rs:1660: let layout_thread_epoch = receiver.recv().unwrap();
components/compositing/constellation.rs:1838: let (chan, port) = ipc::channel().unwrap();
````
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10448)
<!-- Reviewable:end -->
Correct x and y input for origin_rect
Fix error in construction of the `origin_rect` for `UnioningFragmentBorderBoxIterator`.
r? @asajeffrey
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10444)
<!-- Reviewable:end -->
Add some machinery to allow us to disable CSS properties/values per-product
Here's an initial stab at solving the issues @SimonSapin brought up in #10408.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10461)
<!-- Reviewable:end -->