Commit graph

185 commits

Author SHA1 Message Date
Gilbert Röhrbein
1fc46471ff script_trask, handle_msgs: factored out handle_msg_from_script 2014-12-12 23:54:52 +01:00
Gilbert Röhrbein
8da73afa06 script_trask, handle_msgs: factored out handle_msg_from_constellation 2014-12-12 23:51:14 +01:00
Gilbert Röhrbein
9b9f662732 script_task, handle_msgs: sort for pattern constructor 2014-12-12 23:37:42 +01:00
Greg Weng
a477893ab3 Return real page titles and URLs for devtools tab choices.
Fixes #4167.
2014-12-12 22:38:55 +01:00
Nathan E. Egge
b0552cb98e Sending key events through script task before processing them in the compositor.
Fixes #4163
2014-12-12 12:31:44 -05:00
Patrick Walton
8b2aadc30b ports/cef: Implement accelerated compositing for the CEF port. 2014-12-10 08:35:47 -08:00
Ms2ger
64b0a6b0b4 Reuse the final_url in ScriptTask::load.
In both the javascript and non-javascript url cases, final_url is set to the
same url as is stored by the Page.
2014-12-09 15:14:59 +01:00
Ms2ger
795327d5c4 Pass a borrowed Url to parse_html.
It does not need to take ownership, and I want to reuse final_url in the
caller.
2014-12-09 15:12:01 +01:00
Ms2ger
8838f2460e Rename base_url to final_url in ScriptTask::load.
This seems like a clearer name, as it's used for more than just as a base url.
2014-12-09 15:05:50 +01:00
Ms2ger
0fc65d4088 Remove the url from the InputUrl variant.
This url is the pre-redirect url, which is not particularly meaningful, and it
is used only in a panic message.
2014-12-09 01:07:16 +01:00
Ms2ger
e76c3386ce Move the load response into the HTMLInput enum.
It is None iff the parser input is an InputString variant, so it makes more
sense to pass it in the same enum.
2014-12-09 00:53:33 +01:00
Ms2ger
fbedf030d4 Combine two conditionals in ScriptTask::load.
Now that the code lives in the same function, I see no reason for them to
remain separate.
2014-12-09 00:53:33 +01:00
Ms2ger
3e031bdaf8 Make parse_html's base_url argument non-optional.
It turns out the case where it woul be None can't happen.
2014-12-08 12:44:49 +01:00
Ms2ger
c7c7dc03ee Move the networking code in parse_html into ScriptTask::load.
This doesn't really have anything to do with parsing HTML, and fits in better
with the code in ScriptTask::load. In particular, all changes to Page's url
now go through ScriptTask methods.
2014-12-08 12:44:49 +01:00
Ms2ger
5d0934d8ec Pass the load data to parse_html directly, rather than in an Option. 2014-12-08 12:44:49 +01:00
Ms2ger
69e13f3267 Cleanup last_loaded_url/last_url handling in ScriptTask::load. 2014-12-08 12:44:49 +01:00
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