servo/components/layout
Till Schneidereit 543703e3d8 Move Stylesheet loading and ownership from the layout task into HTML elements
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
2015-11-07 18:11:29 +01:00
..
css Auto merge of #8299 - pcwalton:dont-reflow-on-hover, r=mbrubeck 2015-11-04 06:28:46 +05:30
animation.rs layout: Avoid flooding the compositor with animation state changes if 2015-11-02 16:34:17 -08:00
block.rs Eliminate LAYERS_NEEDED_FOR_DESCENDANTS flag 2015-11-04 15:29:47 -08:00
Cargo.toml Fix serde_macros 2015-10-28 21:53:15 +05:30
construct.rs replace InheritTypes imports with inheritance imports 2015-10-30 20:26:30 +09:00
context.rs layout: Store viewport and screen size separately. 2015-11-03 13:12:45 -08:00
data.rs layout: Make the compositor rather than layout determine the position of 2015-09-29 09:47:28 -07:00
display_list_builder.rs Remove DisplayListBuildingResult 2015-11-04 12:52:14 -08:00
flex.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
floats.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
flow.rs Auto merge of #8337 - mrobinson:remove-display-list-result, r=pcwalton 2015-11-06 05:36:35 +05:30
flow_list.rs Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
flow_ref.rs Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
fragment.rs Pass all the data layout needs from canvas elements at once. 2015-10-26 11:43:23 +01:00
generated_content.rs Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
incremental.rs Fix reported test-tidy errors for unmerged import blocks 2015-09-19 12:50:14 -04:00
inline.rs Change overflow calculation to be calculated after compute_absolute_position. 2015-11-03 20:10:06 +10:00
layout_debug.rs sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
layout_task.rs Move Stylesheet loading and ownership from the layout task into HTML elements 2015-11-07 18:11:29 +01:00
lib.rs Move EventState to rust-selectors. 2015-10-30 21:02:35 -07:00
list_item.rs Show overflow for #8118. 2015-10-27 15:07:59 -07:00
model.rs Implement calc expressions for more value types 2015-11-01 23:16:14 -08:00
multicol.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
opaque_node.rs Replace OpaqueNodeMethods::from_{threadsafe_,}layout_node by opaque methods. 2015-06-24 14:55:43 +02:00
parallel.rs Change overflow calculation to be calculated after compute_absolute_position. 2015-11-03 20:10:06 +10:00
query.rs Allow retrieving width/height for non-positioned elements 2015-11-03 20:13:09 -08:00
sequential.rs Change overflow calculation to be calculated after compute_absolute_position. 2015-11-03 20:10:06 +10:00
table.rs Auto merge of #8327 - Ms2ger:unused-arg, r=frewsxcv 2015-11-05 18:56:26 +05:30
table_caption.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
table_cell.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
table_colgroup.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
table_row.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
table_rowgroup.rs Remove unused argument from TableLikeFlow::assign_block_size_for_table_like_flow. 2015-11-04 09:57:01 +01:00
table_wrapper.rs Split Au type into separate crate, with minimal dependencies. 2015-10-01 07:16:11 +10:00
text.rs display input caret for textarea. fixes #7758 2015-10-21 22:38:23 +02:00
traversal.rs Change overflow calculation to be calculated after compute_absolute_position. 2015-11-03 20:10:06 +10:00
wrapper.rs Make DOMString a newtype around String, rather than a typedef. 2015-11-04 12:09:11 +01:00