Commit graph

261 commits

Author SHA1 Message Date
Glenn Watson
bf9b8f7050 Experimental implementation of (a small subset of) mozbrowser APIs. 2015-03-23 13:26:55 +10:00
Corey Farwell
5a780cb221 Stop abusing format! macro when construct a String
In these cases for `format!`, we're just constructing a String of the
single argument with no special format.
2015-03-22 18:54:56 -04:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Patrick Walton
2c22467d53 script: Stop rebuilding every flow in the document when an image
finishes loading.
2015-03-20 10:09:52 -07:00
Chris Paris
99286e4b4f Implement Element.innerHTML setter 2015-03-18 11:20:47 -10:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
bors-servo
7bd6cb0091 auto merge of #5219 : doublec/servo/view_source_protocol_and_plain_text, r=jdm
Implements view-source protocol by having a view-source handler, and modifying the content type to be text/plain if that is used. 

Implements text/plain handling. This allows view-source content to display as plain text.

Example usage:

    ./mach run http://cd.pn/x.txt
    ./mach run view-source:http://tinyvid.tv/

This fixes issue #4181. Issue #3649 includes "support text/plain" so this possibly fixes some of that issue as well.
2015-03-17 07:18:51 -06:00
Glenn Watson
84c5db900f Ensure that clicking a link in an iframe gets the existing iframe rect.
Otherwise, the new iframe may not get a valid window size until the
parent frame does another reflow.
2015-03-17 15:26:50 +10:00
Chris Double
618142fac7 Implement displaying of text/plain documents
This is done by detecting the content type as text/plain
and following the requirements from:
https://html.spec.whatwg.org/multipage/browsers.html#read-text
2015-03-17 18:11:33 +13:00
bors-servo
990a965ddf auto merge of #5244 : mattnenterprise/servo/page_load_thread_name, r=jdm 2015-03-16 20:36:49 -06:00
Matt McCoy
f083583132 Fixes #5215 Serializing the thread name for the page load task to make it a simple url 2015-03-16 22:08:37 -04:00
Glenn Watson
939a89568e First part of refactoring constellation to support iframe navigation.
The history is now recorded per frame, but needs to be exposed in a followup PR.

Also fixes a race condition that occurs loading iframes under heavy CPU load.

This ensures that iframes never do a reflow / layout until they have a valid
window size set from their parent frame.
2015-03-17 09:35:41 +10:00
Martin Schröder
5c8b617715 Refactored optional argument "last_modified" for Document
Fixes #4981
2015-03-16 17:53:19 +01:00
Rohan Prinja
5651ea06c6 make MouseEvent::new() and UIEvent::new() take enums for the bubbles and cancelable arguments 2015-03-15 10:05:36 +05:30
Glenn Watson
e265b6b15b Remove unused subpage field from page 2015-03-11 14:13:30 +10:00
Avi Weinstock
7803f2b216 Subsume ScriptMsg::WorkerDispatchErrorEvent into ScriptMsg::RunnableMsg via introduction of Worker::WorkerErrorHandler (Closes #5171). 2015-03-09 09:24:40 -04:00
bors-servo
4f3feed2be auto merge of #5150 : Adenilson/servo/reflowNotifications03, r=jdm 2015-03-06 21:48:50 -07:00
Adenilson Cavalcanti
618f56410d Implements reflow events debugging.
Start servo with -Z relayout-event and you should have
reflow events printed to the terminal.
2015-03-06 12:27:18 -08:00
Guro Bokum
bf26d61d5e ScriptTask::mouse_over_targets is not traced #4985 2015-03-06 20:22:41 +07:00
Adenilson Cavalcanti
a31d3d7f70 Due to changes on Page/Window interfaces, we no longer have use
for flush_layout().
2015-03-04 11:39:29 -08:00
Josh Matthews
1fb12b11f4 Remove the newly-created Page from the tree if loading fails. 2015-03-03 16:25:40 -05:00
Josh Matthews
4972b623e1 Separate disposing of layout data from the GCing of the DOM object reflectors. Change the order of operations when shutting down the script task to ensure that Window globals aren't used after they've been GCed. 2015-03-03 16:25:40 -05:00
Josh Matthews
c816975750 Documentation and cleanup. 2015-03-03 16:25:40 -05:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
Josh Matthews
d9f04180a5 Split page load into separate network and parsing stages. Delay Page creation until the load is finished. Make session history traversal simply activate existing pipelines, rather than potentially loading them from the network. 2015-03-03 16:25:40 -05:00
Ms2ger
fde91b19ff Remove unused import from script_task. 2015-02-28 22:03:40 +01:00
Guro Bokum
94e7f89524 Move body of ScriptTask::handle_mouse_move_event into a method on #5073 2015-02-28 12:26:46 +07:00
Keith Yeung
d79e422a8f Moved dispatch_key_event method from script_task.rs to document.rs, fixes #4982 2015-02-26 19:14:17 +08:00
Glenn Watson
93088e84f0 If root html element contains "reftest-wait" class, don't mark document as ready until it's removed.
This allows reftests to perform tests for incremental layout and other bugs that require rendering multiple frames.
2015-02-26 13:01:12 +10:00
Dae-seon Moon
d7fab117c2 Remove ScriptMsg::Navigate (fixes #4948). 2015-02-25 15:25:02 +01:00
bors-servo
a3ea3eed47 auto merge of #4960 : pkondzior/servo/add-script-timers-suspend-resume-functionality, r=jdm
Adds free/thaw methods to script_task that let you send suspend/resume messages to web content timers. Fixes #4907
2015-02-23 21:45:46 -07:00
Pawel Kondzior
c2961c94b4 Add thaw/freeze messages that can suspend/resume webcontent timers #4907 2015-02-24 05:33:27 +01:00
bors-servo
576158d08d auto merge of #4959 : glennw/servo/fix-hover, r=jdm
Specifically:
 - Use inclusive_ancestors instead of ancestors, to detect hover on elements like divs.
 - Send the mousemove event after all the hover states have been set correctly.
 - Correctly handle removing hover state from elements when mouse is not over any elements.
 - Correctly detect when a reflow is required (previous code failed in several edge cases).
2015-02-23 19:18:51 -07:00
Keith Yeung
7162c872de script_task.rs now utilizes hyper's LastModified header, removed old implementation (fixes #4986) 2015-02-23 04:19:14 +08:00
bors-servo
f1f8265449 auto merge of #4956 : psdh/servo/interfail, r=jdm
Fixes #4923
2015-02-21 12:51:44 -07:00
Prabhjyot Singh Sodhi
cc48797999 Fixing Intermittent failure in pages with timers
Fixes #4923
2015-02-22 00:27:16 +05:30
bors-servo
939b13f436 auto merge of #5007 : Ms2ger/servo/warnings, r=saneyuki 2015-02-21 11:33:46 -07:00
Ms2ger
b5b58bba24 Remove unused imports. 2015-02-21 18:46:29 +01:00
Ms2ger
226e059370 Cleanup ScriptTask::load. 2015-02-21 18:21:26 +01:00
Tetsuharu OHZEKI
749ebbba71 Move DocumentProgressHandler to document.rs. 2015-02-22 00:29:05 +09:00
Keith Yeung
b855bc4716 Changed js_runtime to be of type *mut JSRuntime 2015-02-21 20:01:27 +08:00
Keith Yeung
c7ddab2efb Removed unused crates 2015-02-21 18:09:30 +08:00
Keith Yeung
e715f0958b Moved handle_click_event from script_task.rs to document.rs 2015-02-21 17:58:23 +08:00
Glenn Watson
451512aa29 Fixes a number of issues with setting hover state, and simplifies the code.
Specifically:
 - Use inclusive_ancestors instead of ancestors, to detect hover on elements like divs.
 - Send the mousemove event after all the hover states have been set correctly.
 - Correctly handle removing hover state from elements when mouse is not over any elements.
 - Correctly detect when a reflow is required (previous code failed in several edge cases).
2015-02-19 09:39:11 +10:00
Ruud van Asseldonk
6ff3a5a3c1 Do not glob-export DevtoolScriptControlMsg variants. 2015-02-13 14:51:10 +01:00
Ruud van Asseldonk
1452614e28 Do not glob-export DevtoolsControlMsg variants. 2015-02-13 14:51:10 +01:00
bors-servo
29d24a5049 auto merge of #4866 : KiChjang/servo/trigger-fragment-string, r=jdm
Fixes #4863
2015-02-12 10:18:45 -07:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
bors-servo
fcfa00f4df auto merge of #4884 : glennw/servo/iframe-load, r=jdm 2015-02-11 03:51:47 -07:00
Glenn Watson
980b1efb72 Dispatch a load event at iframes. Fixes #4350. 2015-02-11 09:07:05 +10:00