servo/components/script
bors-servo 9c2dffdf72 Auto merge of #17037 - cynicaldevil:impl-Sink, r=nox
Added Async HTML Tokenizer

Design: I realized having two different parsers for sync and async was wrong, because the API for both was fundamentally the same. All I needed to do was create another Tokenizer, because `ParseNode` ( representation for nodes which are yet to be created) is used by the TreeBuilder and the Sink, and the `Tokenizer` is the 'lowermost' type concerned with these two types.

Therefore, I created one and placed it in `async_html.rs`, and also created a new Sink which deals with `ParseNode`s. I changed the methods in ServoParser to take an `async` argument too, which decides which Tokenizer will be used. The Tokenizer isn't exactly *async* for now, but this PR separates action creation from execution, which allows the async behaviour to be implemented later. Right now, all actions are executed soon after they are created.

The Sink consists of two Hashmaps, `nodes`, which contains the actual nodes, with the key being their corresponding `ParseNode`'s id, and `parse_node_data`, which contains metadata about the nodes.

It's still a bit rough, (I can't figure out how to deal with `complete_script` and `is_mathml_annotation_xml_integration_point`, along with some other parts I wrote in a hurry), but I believe the overall design is sound. I'd like to hear what you think about it.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17037)
<!-- Reviewable:end -->
2017-06-17 02:21:19 -07:00
..
docs Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
dom Auto merge of #17037 - cynicaldevil:impl-Sink, r=nox 2017-06-17 02:21:19 -07:00
task_source Added Debug implementations. 2017-06-13 10:46:59 -05:00
body.rs Remove some usage of rust-encoding 2017-05-27 13:34:23 +02:00
build.rs Fix hardcoded path to link.exe 2017-02-03 13:33:37 +01:00
Cargo.toml Upgrade cssparser to 0.15 2017-06-16 15:05:46 +02:00
clipboard_provider.rs
CMakeLists.txt Fix doc build by resurrecting generation of supported DOM APIs.h 2016-09-24 15:06:06 -04:00
devtools.rs Added some same-origin-domain checks. 2017-03-14 14:36:03 -05:00
document_loader.rs Remove mutability requirement from fetch_async_background. 2017-02-28 10:23:23 -05:00
fetch.rs Remove all internal mutability from Request 2017-04-03 12:39:07 +02:00
layout_image.rs Make image cache per-document rather than global 2017-03-27 19:54:13 +02:00
layout_wrapper.rs Classes/IDs case-sensitivity: get quirks mode from matching context. 2017-06-13 00:27:41 +02:00
lib.rs EventSource: decode UTF-8 code points across network packets 2017-05-27 13:34:24 +02:00
mem.rs Rename Reflectable to DomObject. 2016-12-08 08:50:35 -10:00
microtask.rs improve spec compliance of update the image data 2017-05-25 08:01:25 +08:00
network_listener.rs Separate the async bluetooth handling from networking code. 2016-12-21 14:52:39 +01:00
script_runtime.rs Added Debug implementations. 2017-06-13 10:46:59 -05:00
script_thread.rs Bump serde to 1.0 2017-06-16 13:31:18 +02:00
serviceworker_manager.rs Removed util. 2016-12-14 18:04:37 -06:00
serviceworkerjob.rs Remove incorrect uses of asynchronous tasks from ServiceWorker job queue. 2017-02-01 12:54:33 -05:00
stylesheet_loader.rs Bug 1331291 part 1 - Set stylesheet url_data correctly for import rule. 2017-06-13 10:07:06 +10:00
test.rs Added compiletest to verify TrustedPromise does not implement Clone 2017-01-22 20:12:07 +00:00
textinput.rs Bring back clipboard support 2017-06-01 16:37:29 +02:00
timers.rs Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00
unpremultiplytable.rs
webdriver_handlers.rs Bump euclid to 0.14. 2017-06-14 16:00:59 +02:00