Commit graph

300 commits

Author SHA1 Message Date
Tomas Cernaj
18632570cd servo: Merge #8909 - Move ScriptMsg to script_traits crate, Fixes #8833 (from cnaj:msg_refactoring); r=jdm
Review of documentation that was missing needed.

Fixes #8833.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7438bc0425749989b8aab084a34ff3fff2ea6679
2015-12-10 10:55:44 +05:01
Florian Strübe
3cce77e3f2 servo: Merge #8862 - Moved WorkerId type to devtools_traits (from fstr:move_workerid); r=Ms2ger
Fixes #8846.

Source-Repo: https://github.com/servo/servo
Source-Revision: 02f4be9c9f82a6e03942977eece39d98dcaff839
2015-12-08 00:24:40 +05:01
Roman Klauke
2609215b43 servo: Merge #8855 - move FocusType enum to the script crate (from romankl:move-focus-enum); r=Ms2ger
This commit moves the FocusType enum to the script crate and replaces all usages with the new `usage`.

Fixes #8840

Source-Repo: https://github.com/servo/servo
Source-Revision: e16c930f36582f40da4736f88675f559e7e47098
2015-12-06 19:47:23 +05:01
Jigesh Mehta
f86eaa8884 servo: Merge #8812 - M1504: Implement basic support for withCredentials API (from jitendra29:support-withCredentials); r=jdm
The pull request includes the following task:

* Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

Source-Repo: https://github.com/servo/servo
Source-Revision: 217a55a7854ec3a843bb94f50a8952c61d5fcc2a
2015-12-05 04:44:01 +05:01
ronak
e047c6ff80 servo: Merge #8829 - M1503 : Integrate XML Parser : First 2 of 4 Subsequent Steps (from jdm:xmlparser2); r=jdm
Rebase of #8746. Introduce and use an XML parser for text/xml network responses when loading web pages.

Source-Repo: https://github.com/servo/servo
Source-Revision: 368dd1dc53cd595bbbcf6f9fb139e9ac573a351b
2015-12-05 02:39:40 +05:01
Matt Brubeck
90c5caf1aa servo: Merge #8785 - Add slow path for hit testing of iframe behind positioned content layer (from mbrubeck:fixed-hit-test); r=pcwalton
Fixes browser.html blocker #8759. r? @pcwalton

This adds a slow path for cases where the compositor's layer-based hit testing is incorrect.  If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.

This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task.  This would be a more complicated change that I think we should save for a follow-up.

This only fixes mouse input for now.  A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.

Source-Repo: https://github.com/servo/servo
Source-Revision: bc62b5aadb62267582fbd65daa28438ce6c6ac9c
2015-12-04 02:25:22 +05:01
Josh Matthews
602578f515 servo: Merge #8558 - Dispatch load events for cross origin iframes. Resolves #6672 (from jdm:crossoriginiframeload); r=glennw
Splitting it out from #6677.

Source-Repo: https://github.com/servo/servo
Source-Revision: 51c19fd733a863f2fae05e693795dbecce69f2ed
2015-12-01 03:40:11 +05:01
David Raifaizen
9b3a99d3bd servo: Merge #8661 - Webdriver - GetWindowSize/IsEnabled/IsSelected (from craftytrickster:8623/some-webdriver-commands); r=jgraham
Added handlers for https://github.com/servo/servo/issues/8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

Source-Repo: https://github.com/servo/servo
Source-Revision: a877a56e0e603c6cc8e9f951c2ad14b6fe8f9b62
2015-11-30 03:13:54 +05:01
Alan Jeffrey
f4ab2bfdb5 servo: Merge #8667 - Update string cache (from asajeffrey:update-string-cache); r=SimonSapin
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.

r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: 188fa9378c103093f1f8dac24bff0d9d237fd2bc
2015-11-25 23:41:39 +05:01
Corey Farwell
142c7b7efe servo: Merge #8622 - Implement 'url!(..)' macro (from frewsxcv:url-plugin); r=SimonSapin
https://github.com/servo/rust-url/issues/136

https://github.com/servo/rust-url/pull/137

Source-Repo: https://github.com/servo/servo
Source-Revision: ea690a2dff64d1cb4eb668473d62f1bbcb19f7c8
2015-11-21 20:41:52 +05:01
Rizky Luthfianto
746277306a servo: Merge #8633 - Remove 'Node::is_anchor_element' (from rilut:remove-node-is-anchor-element); r=nox
Should fixes #8631.

Source-Repo: https://github.com/servo/servo
Source-Revision: 28582bb9f55c89125ea2f4873e1ee079bcc5d092
2015-11-21 15:32:37 +05:01
Rizky Luthfianto
f1c2ebd293 servo: Merge #8627 - Move SetDOMProxyInformation() call from script_task.rs to script/lib.rs (from rilut:refactor-script); r=Ms2ger
Actually, I'm not sure whether to move `unsafe extern "C" fn shadow_check_callback` from script_task.rs to lib.rs or to keep it there. cc: @wenderen

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ccdc42a660bed7ac3bd3ad110567b79cba012ff
2015-11-21 14:57:38 +05:01
James Graham
0e8c63fadf servo: Merge #8621 - Add support for getting an element's computed style through WebDriver (from jgraham:webdriver_css); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 585d2d5c8c4e59be20ab9660dab75fc55438e247
2015-11-21 10:40:50 +05:01
Patrick Walton
8c7de61738 servo: Merge #8599 - compositing: Split Servo up into multiple sandboxed processes (from jdm:e10s-redux); r=metajack
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.

Rebase of #6884.

Source-Repo: https://github.com/servo/servo
Source-Revision: 8b39b9afed6ef8a3d7d3e6609fd301a37825d3e1
2015-11-20 03:30:48 +05:01
James Graham
1fd88ae360 servo: Merge #8564 - Implement Get Element Attribute WebDriver command (from jgraham:webdriver_attr); r=Ms2ger
This intentionally doesn't implement the special handling for boolean
attributes yet, since that requires some kind of exhaustive list of all
such attributes

Source-Repo: https://github.com/servo/servo
Source-Revision: 7f95693288eac546b7b31a51a6fcf80883ae533b
2015-11-19 22:47:25 +05:01
Keith Yeung
5b3f4b220a servo: Merge #8530 - Split ConstellationMsg into ScriptMsg and CompositorMsg (from KiChjang:split-constellation-msg); r=jdm
Fixes #8356.

Source-Repo: https://github.com/servo/servo
Source-Revision: acbe41305230a926458596444ca955eff063d9dd
2015-11-19 04:10:20 +05:01
James Graham
182556357b servo: Merge #8151 - Implement support for WebDriver send keys command (from jgraham:webdriver_sendkeys); r=jgraham
Supports sending keys to an element. The specification here is still
rather unfinished so the error handling and so on in this code will
need iteration as it becomes clearer what the expected behaviour is.

Source-Repo: https://github.com/servo/servo
Source-Revision: afe03870ce1a5a65b4c22f2e64155259da8b4609
2015-11-17 10:33:50 +05:01
Greg Guthe
c64559414c servo: Merge #7242 - Perf timing dom props (from g-k:perf-timing-dom-props); r=jdm
I think this is closer to what https://github.com/servo/servo/issues/7045 describes, but it panics trying to load a page (trace: https://gist.github.com/g-k/a9911467889cdb6fdbf9) and all reftests fail.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7de8b0a7ff2038f9fb643141d8759f40fb6ef093
2015-11-14 10:57:23 +05:01
Corey Farwell
a9fadcc121 servo: Merge #8500 - Consolidate 'subpage finding' script_task logic (from frewsxcv:subpage); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: ef74bf5d42e80f9420a197dbe3d7da609ba158b0
2015-11-13 08:23:18 +05:01
Alan Jeffrey
f8093754b7 servo: Merge #8477 - Opaque DOMString (from asajeffrey:opaque-domstring); r=asajeffrey
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).

The changes are:

* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.

This enables experimenting with other string representations in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 62acdd303b78951885c2c90747b31f318907d6c9
2015-11-13 06:48:30 +05:01
Patrick Walton
2d74e05b04 servo: Merge #8492 - script: Make timer events e10s-safe (from jdm:e10s-timer-events); r=jdm
Closes #8235.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9eaa8e7b1f2e462f62b73477c30183c836a18399
2015-11-13 04:50:48 +05:01
Ms2ger
3890fca29d servo: Merge #8428 - Update js (from Ms2ger:conversions); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: b40882093a306032d38ad02e30f0095e0a49ec21
2015-11-13 00:44:52 +05:01
Ravi Shankar
5145b0d710 servo: Merge #7844 - Cancelable network requests! (from Wafflespeanut:requests); r=jdm
fixes #4974

Source-Repo: https://github.com/servo/servo
Source-Revision: 4848e37e2e0da2f83b1d7f0d231d59047012ff95
2015-11-12 18:30:58 +05:01
benshu
dd16b3c251 servo: Merge #8475 - Execute XHR timeout callbacks directly. (Fixes #8468.) (from benschulz:xhr-timeout-ordering2); r=jdm
This is a fix for #8468.

Currently XHR timeouts schedule themselves for execution via `CommonScriptMsg::RunnableMsg`s. This was necessary when these timeouts used a separate thread to schedule themselves. Now it's a potential race that should have been eliminated as part of #8168.

Source-Repo: https://github.com/servo/servo
Source-Revision: 49d48a8680003267f29ebf8cd47c244b07f4c4d2
2015-11-12 04:02:13 +05:01
Eli Friedman
86523168cb servo: Merge #8286 - Remove unnecessary uses of #[no_move] (from eefriedman:no-move); r=nox
The patch makes RootCollection a bit safer by making the StackRootTLS hold
it in place.

RootedVec was doing an extremely delicate dance and just hoping nobody
messed it up; switch to a Box to be safe.

CodeGenRust seemed to be using no_move for no particularly good reason.

Source-Repo: https://github.com/servo/servo
Source-Revision: 92f9e58310f1b7c3925882979ae9352967866b66
2015-11-08 12:22:00 +05:01
Till Schneidereit
6b102412c1 servo: Merge #8039 - Move Stylesheet loading and ownership from the layout task into HTML elements (from tschneidereit:script-owns-stylesheets); r=jdm
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.

Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff3a17524e0e703e3ac279441729c185444be24
2015-11-08 00:42:54 +05:01
Ms2ger
d1fefa91f1 servo: Merge #8355 - Cleanup exit messages and related code (from Ms2ger:Exit); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: 9a465c58429547b59b8a6e1258eaaea46bf7e5a2
2015-11-07 22:05:45 +05:01
Benjamin Herr
256176dcfb servo: Merge #8359 - Append query string + fragment to javascript: url (from ben0x539:js-url-query-fragment); r=eefriedman
When loading a URL whose scheme is javascript, we should do what
https://html.spec.whatwg.org/multipage/browsers.html#javascript-protocol
says and append the URL's query and fragment components to the scheme
data, as well as percent- and utf-8-decode the whole thing, before
evaluating it as javascript.

Source-Repo: https://github.com/servo/servo
Source-Revision: 33bbed7dc1d3e4f26fbf87e02d2f821015590743
2015-11-07 03:34:35 +05:01
Josh Matthews
a341dc56b0 servo: Merge #8138 - Implement cancellable runnables, and make image load events cancellab… (from jdm:createelementintermittent); r=nox
…le. Resolves #7731.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4113302c262dc4fedb67a6d6d68284f14fe9b9bc
2015-11-06 23:07:57 +05:01
Ms2ger
7cb2a13f43 servo: Merge #8312 - Make DOMString a newtype around String, rather than a typedef (from Ms2ger:DOMString); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: abfd1fb1bf071961bc8a581927eaa96a2d3e2cba
2015-11-04 16:18:41 +05:01
David Zbarsky
ed7fd17b12 servo: Merge #8305 - Get rid of a bunch of explicit derefs (from dzbarsky:roots); r=Ms2ger,
Source-Repo: https://github.com/servo/servo
Source-Revision: 4b9fa13f2f6a1aa38d180367426498f01f6414c9
2015-11-04 10:34:54 +05:01
rohan.prinja
e8b504412b servo: Merge #8221 - move modules around (from ajnirp:8130-reorganise); r=jdm
for #8130

Source-Repo: https://github.com/servo/servo
Source-Revision: daad09d44245228fba9118316937add71bec7c58
2015-11-04 02:27:02 +05:01
Matt Brubeck
4b6e081f7b servo: Merge #8232 - Correct event dispatching for multiple simultaneous touch points (from mbrubeck:glutin-touch); r=glennw
Instead of just converting the mouse into a single "touch" input, Servo can now listen for multi-touch events from Glutin, maintain a list of active touch points, and dispatch events for all of them.

r? @glennw (for the compositor changes) and @jdm (for the DOM changes)

Source-Repo: https://github.com/servo/servo
Source-Revision: 3fdaa6e3f32f6996c416e75119177b98d404adb2
2015-11-03 22:16:21 +05:01
Ms2ger
0df5833603 servo: Merge #8239 - Remove unused code around ScriptReflow (from Ms2ger:ScriptReflow); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 9a800becdf7f6b3b3524d204485cb7c593b506f5
2015-11-03 15:00:17 +05:01
Eli Friedman
3d84958c1f servo: Merge #8056 - Fix the implementation of JSTraceable for RefCell (from eefriedman:trace-refcell); r=jdm
The existing implementation could panic; make sure that doesn't
happen by requiring that the contents of a RefCell are trivially
traceable (i.e. the value don't contain any traceable objects).

I'm not sure whether the TriviallyJSTraceable trait is actually
worthwhile; maybe we should just never use RefCell in the DOM.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5
2015-11-03 06:38:40 +05:01
nxnfufunezn
cba28409a5 servo: Merge #8262 - Removed JS::root #8251 (from nxnfufunezn:Remove_JS_root); r=Ms2ger
Fixes #8251

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 37c03c78165fbb77eb024f2c3376d5e33cd7e446
2015-10-31 17:55:23 +05:01
Martin Robinson
fcd7ccb3e0 servo: Merge #8276 - Snap fragment scroll points to pixel boundaries (from mrobinson:fragment-ticks); r=mbrubeck
These don't match hardware pixels, but work well enough when the device
pixel ratio is a whole number.

Source-Repo: https://github.com/servo/servo
Source-Revision: 84bf368c3bb8ec3550fe158a874e68e02bb0d2be
2015-10-31 05:19:00 +05:01
Ms2ger
4c8234b842 servo: Merge #8267 - Various improvements (from Ms2ger:cleanup); r=frewsxcv
Source-Repo: https://github.com/servo/servo
Source-Revision: 1dfc0481efd4687658ab34e68c883caeadd8b20f
2015-10-30 23:26:34 +05:01
Rohan Prinja
83a9340c66 servo: Merge #8217 - remove DocumentProgressTask enum (from ajnirp:8211-remove-documentprogresstask); r=Manishearth
for #8211

Source-Repo: https://github.com/servo/servo
Source-Revision: a6e2c138db156a7b817107b22c482010ebcdcf2a
2015-10-27 00:12:02 -05:00
Till Schneidereit
f0ce107fb5 servo: Merge #7979 - Improve spec-compliance of script loading and execution during document startup (from tschneidereit:script-loading-fixes); r=jdm
Including proper support for async and deferred scripts.

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 704c5ef25a846ac4321cd136d9747dee9513f98b
2015-10-26 15:48:23 -05:00
Ms2ger
ce05956312 servo: Merge #8155 - Remove Window::layout_join_port (from Ms2ger:join); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 4d737b51bb2053e9bb970b31b0516ac8810a061b
2015-10-23 04:50:38 -06:00
Matt Brubeck
a4f7ce3218 servo: Merge #7204 - Very basic touch events and touch scrolling (from mbrubeck:touchevent); r=jdm
This implements just enough of [Touch Events](http://w3c.github.io/touch-events/) to enable scrolling on Android without regressing basic single-touch interaction like clicking on links.

Dragging a page will scroll it, unless the page calls `preventDefault` on the "touchstart" event.

Does **not** yet support pinch zooming or other multi-touch gestures or events.

Includes a `-Z convert-mouse-to-touch` command line flag for testing on non-touch platforms.  This is also enabled by default on Android because Glutin currently translates touch input to mouse events on Android.

Source-Repo: https://github.com/servo/servo
Source-Revision: dcd207f9bf15c9ecf5d043385ba93277e69201f6
2015-10-22 15:54:01 -06:00
benshu
7eac66ba86 servo: Merge #7450 - Ordering guarantees for timers (from benschulz:constellation-timer); r=jdm
This is an rough solution to the issue described in #3396. XHRs still do their own thing and an overall clean up is in order. Before I do that, though, I'd really like someone to sign off on the overall idea.

There's one major difference to what jdm layed out #3396: The timers remain with the window/worker and only the earliest expiring one is coordinated with the dedicated timer thread.
That means both the timer thread and the window/worker have to keep track of which timer expires next, which feels a bit wonky. However, the upshot is that there's no need for communication with the timer thread when a pipeline is frozen, thawed or dropped.

Most relvant parts are
 - the [`TimerScheduler`](6f5f661958 (diff-74137a6f50ab38e7a1e4d16920a66ce7R73)), which is the new per-constellation timer task and
 - the [`ActiveTimers`](6f5f661958 (diff-86707d952414a2860b78bcf6c1db8e2eR34)) which is what's left on the window/worker side.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2de5407cdabef67ed03b2ad4edf4a22541d77875
2015-10-21 09:07:30 -06:00
Anthony Ramine
bb8125a3da servo: Merge #8041 - Introduce trait Castable (from nox:castable); r=jdm
Removes all those messy FooCast structures in InheritTypes.rs.

Source-Repo: https://github.com/servo/servo
Source-Revision: 674589c370d978f543e71f995d58c5b28e6e9842
2015-10-21 07:57:32 -06:00
Bobby Holley
ad33b14737 servo: Merge #7935 - Move event state from Node to Element (from bholley:eventstate_element); r=nox
Just getting my feet wet with Rust here. Please feel free to nit the hell out of it stylistically and idiomatically. :-)

Source-Repo: https://github.com/servo/servo
Source-Revision: ff2151b8bbc62fa29c90a429b7a4f12520420b6e
2015-10-19 02:47:21 -06:00
Stephen Li
29eb94b080 servo: Merge #8035 - Issue 8028: parse_html should take Url rather than &Url (from sliz1:issues/8028); r=Manishearth
fixes #8028

Source-Repo: https://github.com/servo/servo
Source-Revision: 96ca6b6c6d1a7681e8b16fb313d548fc93753c67
2015-10-16 11:24:08 -06:00
Anthony Ramine
9be943ec1a servo: Merge #7972 - Introduce DOMClass::heap_size_of (from nox:codegen-heapsize); r=Ms2ger
It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.

This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5a0a91eba794af027723051c7f039cb22088aa65
2015-10-15 07:13:55 -06:00
Michael Wu
e4dfd5fc9a servo: Merge #7727 - Support the updated spidermonkey bindings (from michaelwu:update-bindings); r=jdm
Still need to finish the rust-mozjs update and make cargo use it, but it's close enough that I don't expect much to change on the servo side.

Some changes here
- bools are properly translated now
- char16_t is handled as u16 now
- JS_GlobalObjectTraceHook isn't mangled now
- JSJitInfo has been adjusted
- A const fn is used to generate bitfields in JSJitInfo
- Manually generating handles now requires calling an unsafe function. It's not actually required, but it's too much of a hassle to generate them manually now due to bindgen++ adding base classes now.

Source-Repo: https://github.com/servo/servo
Source-Revision: b34fd5bd7e55be1d577df5cf70b41af8a6cc716b
2015-10-14 14:48:44 -06:00
Glenn Watson
5130b51a6c servo: Merge #7807 - Make it possible for iframes to create their own pipeline ID (from glennw:pid); r=jdm
This doesn't change any functionality, but it's the first step towards removing SubpageId.

Adding this change now will allow us to gradually change over code referencing subpage id rather than in one massive PR.

Introduces a namespace for pipeline ID generation - there is a namespace for the constellation thread, and one per script thread.

Source-Repo: https://github.com/servo/servo
Source-Revision: 098bdb5f22500a6e856b085a1140090f63ef8645
2015-10-06 01:08:32 -06:00
Patrick Walton
da504ba30c servo: Merge #7596 - layout: Load Web fonts asynchronously (from pcwalton:async-web-font-loading); r=mbrubeck
Improves page load times significantly.

Closes #7343.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7933b484300131d3de79edbcf399288b22010616
2015-09-28 12:11:50 -06:00