João Oliveira
9c11781880
replace .len() == 0 with is_empty()
...
closes #7198
2015-08-14 04:00:33 +01:00
Bogdan Cuza
45145108da
Measure heap memory usage for more types. Fixes #6951
2015-08-13 21:44:41 +03:00
Patrick Walton
2aa5174246
script: Make the resource task communication use IPC channels.
2015-07-31 11:28:09 -07:00
Patrick Walton
44d13f7fd4
net: Use a thread for each AsyncResponseTarget
to avoid having to send
...
trait objects across process boundaries.
2015-07-31 11:27:49 -07:00
Patrick Walton
9c9d7dc93b
net: Make most of the resource task messages serializable.
2015-07-31 11:27:49 -07:00
Anthony Ramine
7b40cc9fd7
Introduce VirtualMethods::children_changed()
...
This virtual method mimics the behaviour of mutation observers and make it more
viable than the older child_inserted(), which didn't cover removed nodes and
was called as many times as there were inserted nodes.
A few other shortcomings where remove_child() was called directly instead of
Node::remove() were also fixed while at it.
2015-07-25 19:09:40 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Corey Farwell
8e3f4bba85
Reduce max line length from 150 to 120 characters
...
Part of https://github.com/servo/servo/issues/6041
2015-05-24 00:01:49 -04:00
Josh Matthews
ef8a127156
Update test expectations. Mark script loads as complete when the response is complete.
2015-05-21 09:53:19 -04:00
Josh Matthews
8082df7d0d
Make external script sources load asynchronously, yet still block further parsing. Hook up document loading to async networking events.
2015-05-20 14:22:09 -04:00
Josh Matthews
7f0706ed42
Implement a DocumentLoader type that tracks pending loads and notifies the script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification.
2015-05-11 13:41:51 -04:00
Anthony Ramine
7197052c0d
Uniformise root() methods
...
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Manish Goregaokar
dcb0a0eab6
Fix some no_move errors
2015-04-28 04:20:45 +05:30
Ms2ger
a862479ca8
Remove as_slice() calls from script.
2015-04-26 10:52:55 +02:00
Corey Farwell
8b08c6f43f
Don't link to specific WHATWG multipage page
...
"Links to the multipage version of the specification are unfortunately
likely to break over time."
-- https://html.spec.whatwg.org/multipage/asefij.html
This commit removes all references to the specific pages when viewing
WHATWG using multipage mode. I went through all these links and they
redirect fine.
Regex used to generate this commit:
`s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`
2015-04-16 22:39:25 -04:00
Corey Farwell
5eaa922045
Update WHATWG links to use HTTPS
...
Extracted this out of #5649
This commit was created with the following commands:
```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Anthony Ramine
cdb3efec87
Use a Temporary iterator in Node::collect_text_contents()
2015-04-07 20:27:30 +02:00
Anthony Ramine
254207730e
Make Element::get_attribute() take its namespace by reference
2015-04-06 14:31:27 +02:00
Gilles Leblanc
ba36a108c1
Split out shared networking code into net_traits crate
...
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
c8106da277
Rewrite NodeChildrenIterator to return Temporary.
2015-04-02 13:07:51 +02:00
Keith Yeung
fdcf9618cb
Handle the for and event attributes on a script element correctly when one of them is present ( fixes #5258 ).
2015-04-01 12:43:17 +02:00
Brandon DeRosier
ccc55d658f
Use box syntax instead of Box::new()
...
Closes #5417
2015-03-29 13:41:14 -04:00
Zack Slayton
08ac0766ed
Use new if let
syntax wherever possible. Fixes #4153 .
2015-03-10 09:18:55 -04:00
bors-servo
73e5bbec43
auto merge of #5054 : psdh/servo/scriptimplementation, r=jdm
...
Fixes #4089
2015-03-06 13:36:53 -07:00
Prabhjyot Singh Sodhi
64ba4a914e
implement missing steps from "prepare a script" algorithm
...
Fixes #4089
2015-03-06 03:16:59 +05:30
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
James Gilbertson
5f5d1246ef
Implement Document.currentScript
2015-02-27 11:11:02 -07:00
James Gilbertson
0b085df1bc
Implement 'beforescriptexecute' and 'afterscriptexecute' events.
...
Spec: https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block , sections 2.b.2 & 2.b.9
2015-02-25 15:37:54 -07:00
Ms2ger
ada6a088d1
Split the 'Execute a script block' code out of prepare().
...
This also adds comments for missing steps.
The only change in behaviour should be the debug message when an external
script fails to load.
2015-02-23 10:28:49 +01:00
Tetsuharu OHZEKI
36722182c0
Introduce dom::htmlscriptelement::EventDispatcher.
2015-02-23 05:35:26 +09:00
Prabhjyot Singh Sodhi
cc48797999
Fixing Intermittent failure in pages with timers
...
Fixes #4923
2015-02-22 00:27:16 +05:30
bors-servo
0be6389158
auto merge of #4939 : KiChjang/servo/script-element-error-events, r=jdm
...
Fixes #4506
2015-02-21 08:42:46 -07:00
Keith Yeung
52f8b0ceb7
Script elements now fire async error events ( fixes #4506 )
2015-02-21 22:59:48 +08:00
Prabhjyot Singh Sodhi
44e2e2747c
implementing step 12 of 'prepare a script' algorithm
2015-02-21 04:58:27 +05:30
Ms2ger
a09a912178
Import net as net rather than servo_net.
2015-02-10 12:55:24 +01:00
Gilles Leblanc
a1804effaf
Initialize trusted-ness of DOM events properly
...
Fixes #3740
2015-02-03 21:40:07 -05:00
Ms2ger
505159a464
Import the util crate as util rather than servo_util.
...
This used to conflict with the util crate from the standard library, which
has long since been removed.
The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
f8ac1777ff
Don't shadow lifetimes in script.
2015-01-28 13:48:28 +01:00
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
Tetsuharu OHZEKI
4629b7ccf0
fixup! Make script load event asynchronous for internal scripts
2015-01-11 03:38:57 +09:00
Tetsuharu OHZEKI
b984815b98
Make script load event asynchronous for internal scripts
2015-01-11 03:38:57 +09:00
Tetsuharu OHZEKI
f627b35ef6
Add the enum to describe the script origin.
2015-01-11 03:38:57 +09:00
Guillaume Bort
5fe3a3e54f
Fix #3936 – {Window,WorkerGlobalScope}.set{Timeout,Interval}(DOMString)
2015-01-07 11:39:15 +01:00
bors-servo
2e17cae5d0
auto merge of #4495 : MeghaGupta/servo/typeid, r=Ms2ger
2015-01-04 12:12:48 -07:00
Ms2ger
b51e83819d
Fix obsolete format traits.
...
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
Megha Gupta
f85b9e37cc
Add HTMLElementTypeId enum ( fixes #3625 )
2015-01-02 23:10:31 +05:30
Ms2ger
d09d245ee1
Remove unsound Root::deref() calls in HTML elements.
2015-01-01 20:36:45 +01:00
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +01:00
Ms2ger
b6117a57aa
Replace the remaining to_string calls by into_string calls.
2014-12-31 10:34:44 +01:00