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 -->
This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.
This also adds back in the options that were accidentally deleted when
\#10342 was rebased, which moved things from script_thread.rs to
script_runtime.rs.
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 -->
Fixes for insertion point caret rendering
This contains several fixes for the code to position and render the insertion point. The main effect is that the insertion point is now rendered correctly when in an empty input field. See the individual commit messages for more detais. r? @pcwalton
<!-- 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/10361)
<!-- Reviewable:end -->
Before this fix, if a TextRun containing an insertion point was split into
multiple ScannedText fragments, text layout would draw an insertion point
inside of each of the fragments. This patch records the insertion point
position at most once per TextRun, and copies it only into the appropriate
ScannedText fragment.
This PR mistakenly removed JIT enabling/disabling by preference:
https://github.com/servo/servo/pull/10342/files
Look for `get_pref`.
I'm putting the missing piece of code into the appropriate place in
script_runtime.rs
layout: Allow non-absolutely-positioned elements with `overflow: scroll` set to be scrolled.
This makes them establish stacking contexts, which is a CSS 2.1 spec
violation. However, we were already violating the spec here for
absolutely-positioned elements with `overflow: scroll`. It will probably
be easier to fix this spec violation once we either switch entirely to
WebRender or we have multiple layers per stacking context.
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/10450)
<!-- Reviewable:end -->