Auto merge of #12426 - asajeffrey:mozbrowser-event-targets, r=SimonSapin

Allow window elements as well as iframes to the the target of mozbrowser events

<!-- Please describe your changes on the following line: -->
Allow mozbrowser events, in particular mozbrowsererror events, to target a window. Needed for https://github.com/browserhtml/browserhtml/issues/1182

---
<!-- 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
- [X] These changes fix #12420
- [X] These changes do not require tests because we're not testing our issue reporting system, which this is intended for.

<!-- 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/12426)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-20 04:41:34 -05:00 committed by GitHub
commit b6c0ed9a44
8 changed files with 162 additions and 152 deletions

View file

@ -178,8 +178,9 @@ pub enum ConstellationControlMsg {
NotifyVisibilityChange(PipelineId, PipelineId, bool),
/// Notifies script thread that a url should be loaded in this iframe.
Navigate(PipelineId, SubpageId, LoadData),
/// Requests the script thread forward a mozbrowser event to an iframe it owns
MozBrowserEvent(PipelineId, SubpageId, MozBrowserEvent),
/// Requests the script thread forward a mozbrowser event to an iframe it owns,
/// or to the window if no subpage id is provided.
MozBrowserEvent(PipelineId, Option<SubpageId>, MozBrowserEvent),
/// Updates the current subpage and pipeline IDs of a given iframe
UpdateSubpageId(PipelineId, SubpageId, SubpageId, PipelineId),
/// Set an iframe to be focused. Used when an element in an iframe gains focus.