Commit graph

330 commits

Author SHA1 Message Date
Connor Brewster
a9a47b0470 servo: Merge #11006 - Implement navigation events (from cbrewster:history_events); r=asajeffrey
fixes #11005

Events:
 * `PopStateEvent`
 * `HashChangeEvent`
 * `PageTransitionEvent`

Source-Repo: https://github.com/servo/servo
Source-Revision: bca625bd8e60685b92a56d42eab3599a056280f6
2016-05-12 07:27:12 -07:00
mrmiywj
6cee307af5 servo: Merge #11051 - 'closeevent' argument for Document::createEvent (from mrmiywj:closeevent-argument); r=Ms2ger
Add "close event" argument for Document::createEvent
Fixes #10737

Source-Repo: https://github.com/servo/servo
Source-Revision: a76db9af54692f47ca592b062c1165fbc5ed2433
2016-05-09 00:48:41 -07:00
askeing
fc61208984 servo: Merge #10821 - Checking the browsing_context before change title (from askeing:fix_10782); r=jdm
fix #10782

Source-Repo: https://github.com/servo/servo
Source-Revision: 17ba9fb5da73e6edd265c8e126344259e897c095
2016-05-06 14:20:45 -07:00
bd339
ce7ed8f01f servo: Merge #10946 - Disable scripting for documents created without a browsing context (from bd339:iss10940); r=nox
Goes towards closing #10940.

Source-Repo: https://github.com/servo/servo
Source-Revision: a54dedac1f8ebb960f844b617fcf0f4b108f1a80
2016-05-02 08:48:02 -07:00
Ms2ger
fc7055d9f4 servo: Merge #10918 - Avoid some clones (from Ms2ger:clones); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 9770e3c1e37a29c4b01ebfc243db2c7be58ec006
2016-04-29 06:33:34 -07:00
Keith Yeung
4afedbf0a7 servo: Merge #10890 - Remove extraneous script_chan parameter from Trusted::new (from servo:trusted); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 78e23f4c9b54c51012c672839545682b38455d67
2016-04-28 01:57:52 -07:00
SunyDays
3be282a328 servo: Merge #10816 - Implement the errorevent argument to Document::createEvent (from SunyDays:errorevent_argument); r=frewsxcv
new_uninitialized function on ErrorEvent has already been in components/script/dom/errorevent.rs

close #10738

Source-Repo: https://github.com/servo/servo
Source-Revision: 311dd0f930b9e8e90d08151f1956e2da25737d8a
2016-04-27 10:52:41 -07:00
Martin Broesamle
92bb89e398 servo: Merge #10866 - Move abstract parser infrastructure from servohtmlparser.rs to parse (from broesamle:issue10856-a); r=Ms2ger
Fixes #10856

Source-Repo: https://github.com/servo/servo
Source-Revision: 5fd93de7be21220ec309969e7795061d835b0e84
2016-04-27 03:29:50 -07:00
SunyDays
7058e90fa1 servo: Merge #10820 - Implement the "focusevent" argument to Document::createEvent (from SunyDays:focusevent_argument); r=Ms2ger
close #10739

Source-Repo: https://github.com/servo/servo
Source-Revision: aa078a0780465a4dbf3ce91494f8c55a57359fd3
2016-04-26 17:50:51 -07:00
Stephen (Ziyun) Li
0ee57a9156 servo: Merge #10844 - Implement the "progressevent" argument to Document::createEvent (from sliz1:10740); r=frewsxcv
Fixes https://github.com/servo/servo/issues/10740

Source-Repo: https://github.com/servo/servo
Source-Revision: 09b2efc7061337593d948c7fb11b9d80ba42df5a
2016-04-25 22:00:24 -07:00
Rebecca
c6a0cc3d7f servo: Merge #10696 - Referer header (from rebstar6:referrerPolicy); r=jdm
PR1 for https://github.com/servo/servo/issues/10311

This puts the code and data structures in place to set the Referer header based on the Referrer Policy for a given document. Note that document:: get_referrer_policy() always returns the 'No Referrer' option, so for now, this should have no impact on production code, and that policy requires that the Referer header is not added.

Later PRs will determine the policy and edit that get_referrer_policy() accordingly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 34900814fca3b21fbb27bed58d4f4af8a8e307e9
2016-04-25 13:52:01 -07:00
Maciej Skrzypkowski
831ed37a78 servo: Merge #10831 - "storageevent" argument for Document::createEvent (from mskrzypkows:storageevent); r=Ms2ger
Fixes  #10736

Source-Repo: https://github.com/servo/servo
Source-Revision: 8bf732e633cc63dd56a8b6a9f503d694e4b569fe
2016-04-25 03:44:24 -07:00
Tyler Southwick
984a700e82 servo: Merge #10805 - implement webglcontextevent (from tylersouthwick:webglcontextevent); r=Ms2ger
fixes #10742

Source-Repo: https://github.com/servo/servo
Source-Revision: 59205323da10b5867d4386a50a290c3a7500c217
2016-04-25 01:50:52 -07:00
SunyDays
e9a0413a8c servo: Merge #10814 - Implement the svgevents argument to Document::createEvent (from SunyDays:svgevents_argument); r=Ms2ger
close #10741

Source-Repo: https://github.com/servo/servo
Source-Revision: 4b8f1260b9e8fa875dd8055dd5f60f06d053a843
2016-04-24 22:49:26 -07:00
Simon Sapin
15f5299fe5 servo: Merge #9840 - Update to rust-url 1.0 (from servo:url-1.0); r=asajeffrey
**Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage.

Depends on:

* <s>https://github.com/servo/rust-url/pull/176</s>
* <s>https://github.com/alexcrichton/cookie-rs/pull/42</s>
* <s>https://github.com/hyperium/hyper/pull/740</s>
* https://github.com/cyderize/rust-websocket/pull/70
* https://github.com/jgraham/webdriver-rust/pull/28

Source-Repo: https://github.com/servo/servo
Source-Revision: 84ab7e9fe8f4a6528995eff3eb6e814cb724c364
2016-04-23 11:28:31 -07:00
Tetsuharu OHZEKI
5c15edec1e servo: Merge #10769 - Drop support for keyevents in Document::createEvent (from saneyuki:keyevents); r=frewsxcv
Fix #10735

Source-Repo: https://github.com/servo/servo
Source-Revision: e12fc2a6f70b44784baee7ec2d27879b2b38afe9
2016-04-22 15:56:49 -07:00
Ms2ger
828c6b2e34 servo: Merge #10750 - Use num's constituent crates (from servo:num); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 89b276c889ce76f8fe43c22779835af138472dac
2016-04-20 20:11:24 +05:01
Rizky Luthfianto
17ed0bc790 servo: Merge #10649 - Fix Document#elementFromPoint no viewport available test (from rilut:fix-elementFromPoint-no-viewport-available-test); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: e0a100cacb812113a43b7425d8878fb1c6d153db
2016-04-16 16:10:06 +05:01
Rizky Luthfianto
e2b0095765 servo: Merge #10426 - Fix Document#elementsFromPoint no viewport available test (from rilut:fix-elementsFromPoint-no-viewport-available-test); r=nox
Fixes #10093 and improves #10034.

Source-Repo: https://github.com/servo/servo
Source-Revision: 44d7657487797575bb47aa295a13b496dd2cd69c
2016-04-15 23:32:23 +05:01
Simon Sapin
031eaaddbf servo: Merge #10606 - Remove the url! plugin (from servo:remove-url-plugin); r=nox
In rust-url 1.0 the `Url` struct is going to have private fields, and there is no way to to create an aribitrary one without going through the parser.

The plugin never had a clear demonstrated performance benefit, it was made mostly because it was possible and relatively easy at the time.

This commit was originally part of #9840, but it’s taking a while to land and I keep removing new uses of `url!` when rebasing.

r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 3368565b3c6c76e5ce2d170d5c5cfb2f52a56956
2016-04-14 18:45:35 +05:01
Josh Matthews
c57148a88d servo: Merge #8658 - Implement origin concept and browsing contextless documents (from jdm:origin2); r=Ms2ger+jdm
These pave the way for implementing other parts of specifications more thoroughly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9b57d8d686d361c0dfba1056523cbea12abd148b
2016-04-13 15:40:38 +05:01
Zhen Zhang
abd44774f2 servo: Merge #10538 - Improve PerformanceTiming Interface (from izgzhen:performance_timing); r=Ms2ger
Solving https://github.com/servo/servo/issues/10428

- Fix timing precision in old `update_with_current_time`
- Correct time unit in `navigation_start`
- Add `LoadEventStart` and `LoadEventEnd` timing properties

There are still many properties left unimplemented. I tend to leave the for future PRs.

Welcome comments!

Source-Repo: https://github.com/servo/servo
Source-Revision: 421dcc92f05532e5d8bda850c8d14c9375da2bd9
2016-04-13 01:16:10 +05:01
Corey Farwell
4db88605d6 servo: Merge #10514 - Various 'element.rs' cleanup (from frewsxcv:element-cleanup); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 5aa62b3621f4793c559f6c7eb77e06259b0a00ea
2016-04-11 08:58:11 +05:01
shubham_jain
3256246329 servo: Merge #10257 - #10141 : Document::location set null for documents without a browsing context (from slayerjain:first_bug); r=KiChjang
Fixes #10141.

Source-Repo: https://github.com/servo/servo
Source-Revision: c33bf4987af3479c515351195a55c12dacfcc871
2016-04-10 00:10:51 +05:01
Rahul Sharma
2c5ce6248a servo: Merge #10342 - Refactors some entities from script_thread into script_runtime (from creativcoder:script-runtime-module); r=Ms2ger
Fixes #10271.

Source-Repo: https://github.com/servo/servo
Source-Revision: 883cde424b61f4a06d52da5448da0095503b29b8
2016-04-06 12:52:21 +05:01
Paul Rouget
e3fd7bc0f2 servo: Merge #9811 - forcetouch events (from paulrouget:forceTouch); r=mbrubeck
https://developer.apple.com/library/mac/documentation/AppleApplications/Conceptual/SafariJSProgTopics/RespondingtoForceTouchEventsfromJavaScript.html

Not sure how we want to land that yet. Maybe reproduce the webkit events (as in this PR), or as touch/mousemouse events.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0ff8adb09778402e88fe0d0ad92f4b399ca8ca01
2016-04-05 20:38:05 +05:01
Adrian Utrilla
340cfcacf8 servo: Merge #10391 - Inlined content_changed (from autrilla:inline-content-changed); r=Ms2ger
cc @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: b568b72d760623462fe1a19544e1ad59f98e4480
2016-04-05 01:08:55 +05:01
Emilio Cobos Álvarez
74d1661a85 servo: Merge #10365 - servo: Clean up unused variables and imports (from emilio:warnings); r=Wafflespeanut
Source-Repo: https://github.com/servo/servo
Source-Revision: a29da7b48e41327aa7226bda8bea7b00dac88b6c
2016-04-04 23:10:31 +05:01
Rizky Luthfianto
629a825885 servo: Merge #10034 - Implement Document#elementsFromPoint (from rilut:implement-elementsfrompoint); r=emilio
Fixes #9859.

I'm trying to implement Document#elementsFromPoint, which I need to reuse the `get_nodes_under_mouse` and `mouse_over` function which have been removed a days ago in #9715. So I added it back while I'm not sure if my implementation is correct. Any advice will be greatly appreciated.

Source-Repo: https://github.com/servo/servo
Source-Revision: 241518a7d2c26da421d0273f101550215576c5a7
2016-04-04 12:19:39 +05:01
Corey Farwell
491d163fd9 servo: Merge #10327 - Remove get_* on getters as per RFC 0344 (from frewsxcv:get-prefix); r=ms2ger
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

https://github.com/servo/servo/issues/6224

Source-Repo: https://github.com/servo/servo
Source-Revision: 0760e56bb66e38a16543ed24385c29fd7c4a034b
2016-04-02 13:50:39 +05:01
Ms2ger
8531be300e servo: Merge #10304 - Implement Document::cookie correctly for cookie-averse documents (from Ms2ger:cookie-averse); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 7d79df4a05948e0ce6e3abc6bef0f833d8bf541e
2016-04-01 22:22:51 +05:01
Mohamed Albashir
8446a0072d servo: Merge #10292 - Initial steps for CSSOM (from jdm:cssom); r=jdm
Squashed and rebased #10133.

Source-Repo: https://github.com/servo/servo
Source-Revision: f335586ff538004c708d836876b359704ebed86a
2016-04-01 04:00:08 +05:01
Connor Brewster
a24820d19d servo: Merge #10202 - Added a mapping between nodes and stylesheets (from cbrewster:stylesheet-node-mapping); r=nox
Currently a work in progress solution for #10143.

I am not sure how to make the stylesheets() func return a `Ref<Vec<Arc<Stylesheet>>>` or if this way work just as well.

If anyone has any feedback, that would be great.

Source-Repo: https://github.com/servo/servo
Source-Revision: b38fafcf11d2588fecc565c581260106411ad484
2016-03-31 20:19:03 +05:01
Ms2ger
5d89cb8c05 servo: Merge #10287 - Include square brackets for IPv6 addresses in Document::domain (from Ms2ger:domain); r=jdm
The specification changed out from under us.

It's unfortunately impossible to write a test for this right now.

Source-Repo: https://github.com/servo/servo
Source-Revision: af06d32628bafe50e82a17e50d3daea2981974f2
2016-03-31 05:15:10 +05:01
Ms2ger
fb70f27034 servo: Merge #10079 - Implement encoding determination for external scripts (from servo:script-encoding); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e95f54501efd74007bb19009b6d2b7522872d57
2016-03-20 05:59:25 +05:01
Rebecca
1d9a694577 servo: Merge #9930 - Remove activatable element filter within HTMLElement#click() (from rebstar6:htmlclick); r=jdm
Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

Source-Repo: https://github.com/servo/servo
Source-Revision: f2f6787189d8ea021cbd4ea3425d39ef8b1b8f93
2016-03-11 09:37:24 +05:01
Keith Yeung
f7c5861d34 servo: Merge #9217 - Redesign ScriptMsg to be more specific to DOMManipulationTaskSource (from KiChjang:dom-manipulation-msg); r=jdm
This is a large-ish PR that contains the following:
* A new directory is created under `components/script/` called `task_source`, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.
* A `DOMManipulationTaskMsg` which eliminates some usage of `Runnable`s to fire events. Instead, they send event information to the `DOMManipulationTaskSource` and lets the `ScriptTask` handle all the event firing.
* Re-added `fn script_chan`, since I can't think of any other way to give `Trusted` values an appropriate sender.
* Rewrote step 7 of [the end](https://html.spec.whatwg.org/multipage/syntax.html#the-end) to make use of the `DOMManipulationTaskSource`

Partial #7959

Source-Repo: https://github.com/servo/servo
Source-Revision: 740965e39f4d62e5807d21734ed9a7a881eca392
2016-03-11 01:09:27 +05:01
Jack Moffitt
7d68aad107 servo: Merge #9832 - Suppress reflows before RefreshTick or FirstLoad (from metajack:suppress-reflows); r=mbrubeck
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37bcc161fe45bf8c1cb1172b8e0d12c7d03371b6
2016-03-04 03:31:30 +05:01
Emilio Cobos Álvarez
fef86e7406 servo: Merge #9715 - script: Fix MouseOver handling (from emilio:mousemove); r=mbrubeck
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.

This fixes things like #9705, where the hover state was applied only to
the children.

This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.

For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.

```html
<style>
div {
  padding: 10px;
  margin: 10px;
  height: 15px;
  background: blue;
}

div:hover {
  background: red;
}
</style>

<div>
  <div></div>
</div>
```

Fixes #9705

Source-Repo: https://github.com/servo/servo
Source-Revision: 056a7cf1a2284063e5d32c6627b86f6931957a74
2016-03-03 22:26:35 +05:01
Anthony Ramine
0afd393fe0 servo: Merge #9837 - Use a BTreeMap for Document::animation_frame_list (fixes #9834) (from nox:deterministic-raf); r=mbrubeck
The callbacks must stay ordered.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ceda7de509d3dff01a766077011207f94ffadfd
2016-03-02 20:55:38 +05:01
Rizky Luthfianto
2e6459eeb6 servo: Merge #8932 - Implement Document#elementFromPoint (from rilut:add-elementfrompoint); r=nox
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)) to implement elementsFromPoint because it may cause GC hazards.

By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?

[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bcdbe6d56d4d4e2a679ad7e0e27f2caf71f4d22
2016-03-01 02:32:50 +05:01
Paul Rouget
760de9998e servo: Merge #9740 - Support Browser API event mozbrowserconnected (from paulrouget:mozbrowserconnected); r=jdm
Fixes https://github.com/servo/servo/issues/9382

This new event is not yet documented. If this lands, I will add documentation to MDN.

Source-Repo: https://github.com/servo/servo
Source-Revision: 42f17128461f8da56a510b3454406cb74e3bba1a
2016-02-25 15:27:24 +05:01
Anthony Ramine
69b87ee72d servo: Merge #9742 - Make use of From<String> for Atom (from nox:atom-from-string); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: b3b6f092062eed2f323da88991553d0285da6a16
2016-02-25 08:10:44 +05:01
Josh Matthews
a73840d9c8 servo: Merge #9714 - Improvements to Documents' browsing contexts (from servo:browsingcontext); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: f5193ebd82b7d4daf2e5aa30948845bab7a696ea
2016-02-21 04:04:32 +05:01
Ms2ger
de2a28770a servo: Merge #9603 - Store a pointer to the browsing context in the Document (from Ms2ger:document-bc); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ee158cc65f117f8fa10c4b706ff4009c579c7775
2016-02-19 12:20:35 +05:01
Paul Rouget
9bfde7b59b servo: Merge #9529 - Implement focus, blur, focusin and focusout events (from paulrouget:focusEvents); r=asajeffrey
Based on https://github.com/servo/servo/pull/7985

Fixes https://github.com/servo/servo/issues/7981

Source-Repo: https://github.com/servo/servo
Source-Revision: d8ffa3d0b85815a5ff62491f9f3bc7445834fc0e
2016-02-18 08:34:42 +05:01
Peter
77f0496d57 servo: Merge #9632 - Addresses Issue #1716. Indicated part of the document (from peterjoel:issue_1716); r=KiChjang
Fixes #1716.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8d63eff463417cdc739dd291d0ae4ab225b8dce5
2016-02-17 14:54:21 +05:01
Emilio Cobos Álvarez
b1dd4fcd79 servo: Merge #9567 - style: Make the whole style crate independent of the implementation (from emilio:general-pseudo-element-parsing); r=bholley,SimonSapin
This allows, among other things, having different implementations for parsing pseudo{elements, classes} in both `ports/geckolib` and in servo.

Source-Repo: https://github.com/servo/servo
Source-Revision: c11844cbf28054784c8d65781cff20045d8ee48b
2016-02-14 03:30:59 +05:01
Josh Matthews
401a4eb0e3 servo: Merge #6677 - Make iframes block the enclosing document's load event (from jdm:iframeblockonload); r=Ms2ger
It occurs to me as I write this that this doesn't handle the case of removing the iframe from the document before it's finished loading. Consider this an early feedback release!

Source-Repo: https://github.com/servo/servo
Source-Revision: a31f31e81977be5215f31851885e8ab46890c556
2016-02-10 19:21:29 +05:01
Paul Rouget
177aa965b3 servo: Merge #9244 - mozbrowsersecuritychange event (from paulrouget:securitychange); r=jdm
Fixes #8544

No test yet. Is there a way to mock a https connection?

Also, I wish I could use the `HTTPSState` enum instead of a `String` when calling `trigger_mozbrowser_event` (https://github.com/servo/servo/compare/master...paulrouget:securitychange?expand=1#diff-30a18e04d7e0b66aafdf192e416cad44R306) but that would require `constellation_msg.rs` to know about `HTTPSState`, which is defined in `document.rs`, which would add a dependency to `components/msg`. I could define `HTTPSState` somewhere else maybe? Or maybe it's fine to use a `String`. But then, should I use the HTTPSState strings (`"modern/deprecated/none"`) or the mozbrowser strings (`"secure/insecure/broken"`) (as it is now)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d63f09361afa80b9d5c4f6b192c9bd8936094b7
2016-02-09 12:31:29 +05:01