Commit graph

219 commits

Author SHA1 Message Date
Ms2ger
6374d74d6e Simplify the content_changed call in ScriptTask::load. 2014-12-08 12:44:49 +01:00
Ms2ger
10e39161f7 Create the root frame before evaluating the javascript URL.
This prevents a crash when the script in the javascript URL accesses the
document attribute.
2014-12-06 15:04:37 +01:00
Manish Goregaokar
5511e02a78 Add Comparable trait to js.rs; fixups 2014-12-06 02:51:52 -08:00
Manish Goregaokar
e7ac792ed6 Switch to NodeFlags (the footprint has not changed) 2014-12-05 18:34:53 -08:00
Manish Goregaokar
a2f7e0fbd6 Address review comments 2014-12-05 18:34:51 -08:00
Manish Goregaokar
6482e313d6 Implement implicit form submission 2014-12-05 18:34:49 -08:00
Manish Goregaokar
c89ec3910f Hook up synthetic click activation to script_task and <>.click() 2014-12-05 18:33:03 -08:00
Manish Goregaokar
03207dea81 Hook up authentic click activation to the script task 2014-12-05 18:32:12 -08:00
Shanil Puri
72a5ae7210 Implemeneted ModifyAttribute handler to update DOM elements. 2014-12-03 18:58:44 -08:00
nkdalmia
f6fb9f862d Implement Window.sessionStorage: Storage Task, Storage Methods (excluding Storage event, QuotaExceededError) 2014-12-03 18:31:50 -05:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
Mukilan Thiyagarajan
4b2b0d0723 Allow passing arguments to setTimeout/setInterval callbacks 2014-11-15 18:32:12 +05:30
Manish Goregaokar
cdddf6465c Remove unused arguments from LoadComplete and LoadCompleteMsg 2014-11-14 02:14:00 +05:30
Manish Goregaokar
d5f1bb2df5 Don't overwrite redirected URL in script_task (fixes #3970) 2014-11-14 02:10:04 +05:30
Keegan McAllister
642a3592c7 Fix interfaces test 2014-11-13 12:53:54 -05:00
Josh Matthews
80764f65e3 Add single-line text input with no visible cursor. 2014-11-13 12:53:54 -05:00
Josh Matthews
84bc17e7ad Implement document focus context and hook it up to click events. 2014-11-13 11:27:15 -05:00
Josh Matthews
329ba56fca Dispatch keydown, keyup, and keypress events at appropriate times. 2014-11-13 11:27:15 -05:00
Josh Matthews
1c64dabb15 Pass all key events to the current constellation frame. 2014-11-13 11:24:14 -05:00
Glenn Watson
0a0b4c657c Rebase and fix up compile errors for rust upgrade. 2014-11-13 11:25:19 +10:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Martin Robinson
c7327450ef Clip display list based on frame viewport
Instead of creating a display list for the entire page, only create one
for an area that expands around the viewport. On my machine this makes
incremental layout of http://timecube.com 50% faster.
2014-11-11 08:46:16 -08:00
Shing Lyu
783c6703ca Bug #3811 - Extracted the script task handlers into methods 2014-11-10 10:38:12 +08:00
Patrick Walton
10f7b49cf7 Invert control flow, fix resizing, and improve checkerboarding
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
bors-servo
4e24e4d8e9 auto merge of #3732 : mukilan/servo/xhr-issue-3630, r=jdm
This fixes issue #3630
A short summary of the changes:
* Use atomic generation id to cancel inflight requests
* Handles nested calls to abort, open, send inside handlers
* Adds XHRReleaseMsg to delay freeing XHR object till all
  inflight events are processed
* Handles both timeout, errors and abort/open in a symmetric fashion
  i.e All inflight events will be cancelled for timeouts, aborts,
    errors and on calling open.
* Change the ErroredMsg enum to be more symmetric with the returned
  Error enum

I noticed a few possible changes that could make the code for fetch task simpler:
* We can remove the additional timer task and let the fetch task manage 
  its own timer (or maybe the resource loader can do this.)
* The CORS related steps could also be moved into the resource loader.
* Right now upload events are not support. This requires some support 
  from resource loader.
2014-11-04 05:06:34 -07:00
Martin Robinson
2d72f00ccf Have ContentBox(es)Queries consult the flow tree
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.
2014-11-03 10:30:28 -08:00
Mukilan Thiyagarajan
7435db26ac Fix race condition in XHR and handle other abort/open scenarios
This fixes issue #3630
A short summary of the changes:
* Use generation id to cancel inflight requests
* Handles nested calls to abort, open, send inside handlers
* Adds XHRReleaseMsg to delay freeing XHR object till all
  inflight events are processed
* Change the ErroredMsg enum to be more symmetric with the returned
  Error enum
2014-11-03 22:06:17 +05:30
Matt Brubeck
fe123ad07c Switch to synchronous script loading
This removes the old code for asyncronously loading scripts during HTML
parsing and then executing them afterward.

Fixes #3356.
2014-10-29 14:31:47 -07:00
Matt Brubeck
65a0d1fe9a Infrastructure for synchronous script loading
This implements the parts of the "prepare a script element" algorithm that are
required for synchronous scripts.  It also adds some infrastructure for future
support of the `async` and `defer` attributes.
2014-10-29 14:30:42 -07:00
Keegan McAllister
49234484d6 Ignore the HTML parser's borrow flag in GC tracing
Adds some other dynamic checks in debug builds.
2014-10-24 16:27:37 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Ray Clanan
85f746f9b9 Rename untraceable!() to no_jsmanaged_fields!(). References issue #3671 2014-10-23 21:33:32 -04:00
Josh Matthews
539c21f380 Implement Document.readyState. Prevent iframes from notifying the compositor after the initial parse. Fixes #1720. Fixes #3738. 2014-10-23 10:55:59 -04:00
Tetsuharu OHZEKI
072bb5b965 Use DOMRefCell for ScriptTask. 2014-10-22 10:01:01 +09:00
Keegan McAllister
9da7679367 Use html5ever for HTML parsing 2014-10-16 13:06:34 -07:00
Mukilan Thiyagarajan
0d7e13f646 Issue #3236 - Implement timers (setTimeout/setInterval) for workers 2014-10-16 05:59:44 +05:30
Tim Taubert
5080c0d86e Make Event::new take enumerated values instead of booleans (fixes #3643) 2014-10-11 16:57:00 +02:00
Manish Goregaokar
b28a4c8858 Implement extremely basic form submission (fixes #3554) 2014-10-11 16:00:16 +05:30
bors-servo
2f9808e130 auto merge of #3626 : Manishearth/servo/form-prep, r=jdm
Framework for form submission
2014-10-09 16:00:34 -06:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Manish Goregaokar
ad16c52a6b Allow passing a method, request body, and headers to the pipeline in LoadUrlMsg 2014-10-09 14:09:29 +05:30
bors-servo
06489fcc42 auto merge of #3571 : Ms2ger/servo/rewrite-js-url, r=jdm
This should make it clearer that we always pass a URL to Document::new, and
avoids an unnecessary unwrap() call.
2014-10-06 12:21:30 -06:00
bors-servo
f60e985e6b auto merge of #3570 : Ms2ger/servo/rc-scripttask, r=metajack
The ScriptTask is owned by the proc in ScriptTaskFactory::create.

We started using a managed box for what would eventually become ScriptTask in
d21d27e086.
2014-10-06 11:00:37 -06:00
Manish Goregaokar
707a2870fa Remove Traceable/Untraceable from page.rs 2014-10-05 22:53:50 +05:30
Ms2ger
31f8100b9d Cleanup URL handling in ScriptTask::load a bit.
This should make it clearer that we always pass a URL to Document::new, and
avoids an unnecessary unwrap() call.
2014-10-04 15:19:08 +02:00
Ms2ger
208afda890 Stop reference-counting the ScriptTask.
The ScriptTask is owned by the proc in ScriptTaskFactory::create.

We started using a managed box for what would eventually become ScriptTask in
d21d27e086.
2014-10-04 13:14:23 +02:00
Ms2ger
4cc24e727b Clear the fragment_name field when resizing.
This reinstates the behaviour from before the change in
a1bf49c1ce.
2014-10-02 18:07:41 +02:00
Ms2ger
7508ca94b3 Remove the fragment_node field from Page (fixes #3543).
Since Page isn't reflected, it cannot be rooted, and pointers to JS-managed
objects inside it are not guaranteed to be traced. This may cause the pointer
to become dangling.
2014-10-02 15:31:26 +02:00
Josh Matthews
08cac68d5a Check if the immediate node is an element before looking at ancestors when clicking, and flush pending layout changes after dispatching the event. 2014-10-01 15:03:15 -04:00