Auto merge of #13633 - glennw:forward-touch-events, r=mbrubeck

Send touch events to root pipeline, and allow forwarding to iframes.

Instead of letting the compositor try to find the correct scroll
layer for a touch event, switch touch events to work the same way
that mouse events do.

Touch events are now dispatched to the root pipeline, and then
forwarded to child iframes as required.

<!-- 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/13633)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-07 19:07:24 -05:00 committed by GitHub
commit 9d3fc76463
5 changed files with 118 additions and 71 deletions

View file

@ -3,10 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use AnimationState;
use CompositorEvent;
use DocumentState;
use IFrameLoadInfo;
use MouseButton;
use MouseEventType;
use MozBrowserEvent;
use WorkerGlobalScopeInit;
use WorkerScriptLoadOrigin;
@ -72,10 +71,8 @@ pub enum ScriptMsg {
IpcSender<Result<(IpcSender<CanvasMsg>, GLLimits), String>>),
/// Notifies the constellation that this frame has received focus.
Focus(PipelineId),
/// Re-send a mouse button event that was sent to the parent window.
ForwardMouseButtonEvent(PipelineId, MouseEventType, MouseButton, Point2D<f32>),
/// Re-send a mouse move event that was sent to the parent window.
ForwardMouseMoveEvent(PipelineId, Point2D<f32>),
/// Forward an event that was sent to the parent window.
ForwardEvent(PipelineId, CompositorEvent),
/// Requests that the constellation retrieve the current contents of the clipboard
GetClipboardContents(IpcSender<String>),
/// <head> tag finished parsing