diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-04 02:54:22 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-12-04 02:54:22 +0530 |
commit | bc62b5aadb62267582fbd65daa28438ce6c6ac9c (patch) | |
tree | 535a0f8a529fe0f76ee5b6e852a317b0f0d36203 /components/compositing/windowing.rs | |
parent | 5ee6fe120d43506e263cb4482b3a468d967a8386 (diff) | |
parent | 9551363bfba695b17c55cc551b87a6c0d16eb6a0 (diff) | |
download | servo-bc62b5aadb62267582fbd65daa28438ce6c6ac9c.tar.gz servo-bc62b5aadb62267582fbd65daa28438ce6c6ac9c.zip |
Auto merge of #8785 - mbrubeck:fixed-hit-test, r=pcwalton
Add slow path for hit testing of iframe behind positioned content layer
Fixes browser.html blocker #8759. r? @pcwalton
This adds a slow path for cases where the compositor's layer-based hit testing is incorrect. If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.
This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task. This would be a more complicated change that I think we should save for a follow-up.
This only fixes mouse input for now. A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8785)
<!-- Reviewable:end -->
Diffstat (limited to 'components/compositing/windowing.rs')
-rw-r--r-- | components/compositing/windowing.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/compositing/windowing.rs b/components/compositing/windowing.rs index d129a6deb5b..2a9dcb9bcb0 100644 --- a/components/compositing/windowing.rs +++ b/components/compositing/windowing.rs @@ -11,9 +11,9 @@ use euclid::size::TypedSize2D; use euclid::{Point2D, Size2D}; use layers::geometry::DevicePixel; use layers::platform::surface::NativeDisplay; -use msg::constellation_msg::{Key, KeyModifiers, KeyState}; +use msg::constellation_msg::{Key, KeyModifiers, KeyState, MouseButton}; use net_traits::net_error_list::NetError; -use script_traits::{MouseButton, TouchEventType, TouchId}; +use script_traits::{TouchEventType, TouchId}; use std::fmt::{Debug, Error, Formatter}; use std::rc::Rc; use url::Url; @@ -27,7 +27,6 @@ pub enum MouseWindowEvent { MouseUp(MouseButton, TypedPoint2D<DevicePixel, f32>), } - #[derive(Clone)] pub enum WindowNavigateMsg { Forward, |