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
Adenilson Cavalcanti
4e9bb15ba7
Instead of panicking on broken url, break from the loop and return.
2015-04-01 15:30:33 +02:00
Manish Goregaokar
3479d3fa7f
Replace unsafe_blocks by unsafe_code.
2015-03-21 10:27:32 +01:00
Ms2ger
1604515fd9
Fix various build warnings.
2015-03-20 17:57:49 +01:00
bors-servo
1236280bea
auto merge of #5029 : ChrisParis/servo/h5e-serialize, r=jdm
...
Fixes https://github.com/servo/servo/issues/3713 . Depends on https://github.com/servo/html5ever/pull/100 and https://github.com/servo/html5ever/pull/101 .
2015-03-18 18:06:49 -06:00
Chris Paris
a5d6c6a1fc
Serialize using html5ever
2015-03-18 12:17:56 -10:00
Chris Paris
99286e4b4f
Implement Element.innerHTML setter
2015-03-18 11:20:47 -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
Chris Double
82c52a7a1c
Implement view-source protocol. Fixes #4181 .
...
This follows the recommendation from issue #4181 . A handler
for 'view-source' delegates to the HTTP loader. In that
loader I check for view-source, adjust the URL to be the
URL to be viewed and modify the Content-Type header to be
text/plain.
This doesn't actually result in the source being
viewed as rendering text/plain is not yet implemented.
2015-03-17 11:06:44 +13:00
Simon Sapin
d5dd1d658e
Upgrade to rustc ba2f13ef0 2015-02-04
2015-02-11 14:48:34 -08:00
Ms2ger
a09a912178
Import net as net rather than servo_net.
2015-02-10 12:55:24 +01:00
Ms2ger
12be33efc9
Use JS<Node> rather than TrustedNodeAddress in the HTML parser.
2015-02-03 16:03:23 +01: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
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
edc1d89251
Deny unsafe blocks in script.
...
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Ms2ger
323daffbf0
Qualify resource_task enums.
2015-01-04 15:47:46 +01: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
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
Chris Paris
96f73d67d4
Use parse_html
in DOMParser.
2014-12-17 17:40:38 -10:00
Ms2ger
466faac2a5
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
2014-12-17 15:19:45 -05: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
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
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
de318ae8f1
Simplify the LoadData creation in parse_html.
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
Sean McArthur
4ee8c3a60b
convert script crate to use hyper
2014-12-04 10:06:41 -08:00
aakashjain
fab09a5137
Fixes #4123
2014-11-29 15:06:17 +05:30
Kshitij Parajuli
f5e9ae17cf
Shared Sniffer Task
...
- Added TargetedLoadResponse and ResponseSenders
- LoadData constructor contains the next consumer which means
SnifferManager doesn't need the next consumer to start
- New SnifferTask is created at new resource_task creation
- Update Unit Tests
2014-11-28 12:35:49 -05:00
Jack Moffitt
d1b433a3b3
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
2014-11-13 11:17:43 +10:00
Ms2ger
fbb00da212
Remove the glob import from the HTML parser.
...
Glob imports are frowned upon, and after the removal of
build_element_for_tag, only a few types are actually used.
2014-11-06 09:41:24 +01:00
Keegan McAllister
01ea963711
Only print HTML parse errors with RUST_LOG=script::parse
2014-11-05 10:36:20 -08:00
Ms2ger
82216fd5c0
Move build_element_from_tag out of the HTML parser.
...
This function is not particular to the parser, so should live in the DOM.
2014-10-30 18:03:19 +01:00
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
nchinth
6a736c7f3c
Adding initial version of parser trait
...
Added parse_chunk method declaration to parser
Removed unnecessary visibilty for parse_chunk function
Implemented parse_chunk function
Implemented parse_chunk fn for ServoHTMLParser
Moved parser trait to mod.rs and added finish fn
added licence header to mod.rs and other review comments
Fixed trailing space issue
Fixed failed tabular space test
2014-10-29 11:31:20 -04: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
Ms2ger
b9d8533760
Don't crash on invalid utf-8 in the HTML parser.
...
This was regressed by the html5ever landing.
2014-10-19 13:18:25 +02:00
Keegan McAllister
9da7679367
Use html5ever for HTML parsing
2014-10-16 13:06:34 -07:00