Auto merge of #18704 - mrobinson:wr-hit-testing, r=jdm,glennw,mbrubeck

Switch to using WebRender hit testing

This trades quite a bit of complicated code in Servo for few more
messages and a significant performance improvement. In particular,
WebRender can search the entire display list at once instead of
ping-ponging down the pipeline tree. This allows us to send mouse
events to the correct pipeline immediately.

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

---
<!-- 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: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they should not change behavior.

<!-- 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/18704)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-17 17:09:25 -05:00 committed by GitHub
commit ca08271345
20 changed files with 381 additions and 555 deletions

View file

@ -35,6 +35,15 @@ macro_rules! define_cursor {
_ => Err(())
}
}
/// From the C u8 value, get the corresponding Cursor enum.
pub fn from_u8(value: u8) -> Result<Cursor, ()> {
match value {
$( $c_value => Ok(Cursor::$c_variant), )+
$( #[cfg(feature = "gecko")] $g_value => Ok(Cursor::$g_variant), )+
_ => Err(())
}
}
}
impl ToCss for Cursor {