Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"javascript:" urls: execute in correct global scope #17083

Merged
merged 8 commits into from Sep 9, 2017

Commits on Aug 23, 2017

  1. "javascript:" urls: run in correct global

    Make some changes to javascript scheme url evaluation to bring it
    closer to
    https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents
    
    - Evaluate the js before the page load so that it happens in the
      correct `window` global.
    - If the result is not a string, the response should be a 204.
    
    This required saving some data in load_data, since it's not
    possible to modify the response at the point where we're evaluating
    the js.
    danielj41 committed Aug 23, 2017
  2. "javascript:" urls: add web-platform-test

    danielj41 committed Aug 23, 2017

Commits on Aug 28, 2017

  1. "javascript:" urls: clean up after aborting a page load

    Problem:
      After aborting on a 204 or 205 status code, you could no longer
      follow links on the page.
    
    Cause:
      `constellation.rs` ignores new LoadUrl requests since the aborted
      one is in its `pending_changes` list.
    
    Solution:
      Send a message to constellation that lets it clean up its
      `pending_changes` list.
    danielj41 committed Aug 28, 2017
  2. "javascript:" urls: move test to correct location

    - move test to correct directory
    - update it to be more concise
    
    I also confirmed that this test passes in Firefox.
    danielj41 committed Aug 28, 2017
  3. "javascript:" urls: clean up js evaluation code

    - move it to its own function
    - move the `url = "about:blank" code into the same block
    - move the `use` statement to the top of the file
    danielj41 committed Aug 28, 2017

Commits on Aug 29, 2017

  1. "javascript:" urls: evaluate in iframe src attribute

    - generalize the eval_js_url function so it can be called from
      multiple places.
    - call it in htmliframeelement.
    - if the js eval results in a non-string result, then it won't
      navigate to a new page, so don't block on the new page loading.
    danielj41 committed Aug 29, 2017

Commits on Sep 8, 2017

  1. "javascript:" urls: remove unnecessary block

    Remove this block and unindent the code one level.
    
    Doing this required cloning `load_data.url` so that we could
    later mutate `load_data.url` in the same block.
    danielj41 committed Sep 8, 2017

Commits on Sep 9, 2017

  1. "javascript:" urls: update test expectations

    danielj41 committed Sep 9, 2017
You can’t perform that action at this time.