gecko-dev/servo/components/constellation
Daniel Johnson 4a3e899ce4 servo: Merge #17083 - "javascript:" urls: execute in correct global scope (from danielj41:javascript-url-global-3); r=jdm
<!-- Please describe your changes on the following line: -->

#### Summary

This pull request makes `javascript:` urls execute in the correct global scope.

#### Example

```html
<script> var x = 4; </script>

<!-- this branch: logs "4" -->
<!-- master: undefined variable error -->
<a href="javascript:console.log(x)">link</a>
```

#### Questions

I'm new to servo and rust, so I'm unsure about these changes. In particular:
  * What's the appropriate place to evaluate the js?
    * I moved it to `handle_navigate`, but I'm not sure if this will catch all occurrences of `javascript:` urls. I also don't know if this will execute in the correct thread and the correct window.
  * What should I do with the result of the js evaluation?
    * I just ignored it. The previous behavior displayed it as the content of a new page load.

---
<!-- 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 #15147, #16718

<!-- Either: -->
- [x] There are tests for these changes

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 40c8a6389afdad8fdffdf4a5616627f9a51b1822

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : da92cf37bf7b879cc6766a5bd816c943e8b18b17
2017-09-09 04:39:43 -05:00
..
browsingcontext.rs servo: Merge #17184 - Bump euclid to 0.14.x (from nical:euclid-bump); r=SimonSapin 2017-06-14 07:25:05 -07:00
Cargo.toml servo: Merge #18189 - First step toward iOS Support (from JJayet:ios_support); r=larsbergstrom 2017-08-23 10:59:39 -05:00
constellation.rs servo: Merge #17083 - "javascript:" urls: execute in correct global scope (from danielj41:javascript-url-global-3); r=jdm 2017-09-09 04:39:43 -05:00
event_loop.rs servo: Merge #15588 - Update serde to 0.9 (from servo:serde); r=SimonSapin 2017-02-18 12:10:26 -08:00
lib.rs servo: Merge #18189 - First step toward iOS Support (from JJayet:ios_support); r=larsbergstrom 2017-08-23 10:59:39 -05:00
network_listener.rs servo: Merge #17521 - Update fetch methods (from KiChjang:update-fetch); r=jdm 2017-08-18 18:39:02 -05:00
pipeline.rs servo: Merge #18155 - Add paint metrics to Performance Timeline API (from ferjm:pwm.perf.timeline); r=jdm 2017-08-23 15:06:12 -05:00
sandboxing.rs servo: Merge #14592 - Remove the util crate (from asajeffrey:util-goodbye); r=mbrubeck 2016-12-14 16:48:42 -08:00
timer_scheduler.rs servo: Merge #16184 - Terminate timer scheduler thread during shutdown (from ferjm:issue-16153-terminate-time-scheduler-shutdown); r=jdm 2017-03-30 07:31:02 -05:00